summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure392
1 files changed, 343 insertions, 49 deletions
diff --git a/configure b/configure
index ba2cc3815..12860c38d 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 367e95d.
+# From configure.ac 6a3c3cc.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -692,6 +692,7 @@ enable_option_checking
enable_manager
enable_packetver
enable_packetver_re
+enable_epoll
with_key1
with_key2
with_key3
@@ -1342,6 +1343,7 @@ Optional Features:
--enable-packetver=ARG Sets the PACKETVER define. (see src/common/mmo.h)
--enable-packetver-re Sets or unsets the PACKETVER_RE define - see
src/common/mmo.h (currently disabled by default)
+ --enable-epoll use epoll(4) on Linux
--enable-debug[=ARG] Compiles extra debug code. (yes by default)
(available options: yes, no, gdb)
--enable-buildbot[=ARG] (available options: yes, no)
@@ -3444,6 +3446,51 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+# Root-check
+host_is="`uname`"
+case $host_os in
+CYGWIN*)
+ ;;
+*)
+ if type id >/dev/null 2>&1; then
+ euid="`id -u`"
+ if test "$euid" == "0"; then
+ echo ""
+ echo "********************************************************************************"
+ echo '* W A R N I N G /!\ *'
+ echo "********************************************************************************"
+ echo "* It appears that you're planning to run Hercules with root privileges. That's *"
+ echo "* not necessary, nor recommended, and it may open your machine to unnecessary *"
+ echo "* security risks. You should never ever run software as root unless it *"
+ echo "* requires the extra privileges (which Hercules does not.) *"
+ echo "* *"
+ echo "* More info: *"
+ echo "* http://www.tldp.org/HOWTO/Security-HOWTO/local-security.html *"
+ echo "* https://wiki.debian.org/sudo *"
+ echo "* http://wiki.centos.org/TipsAndTricks/BecomingRoot *"
+ echo "* http://fedoraproject.org/wiki/Configuring_Sudo *"
+ echo "* https://help.ubuntu.com/community/RootSudo *"
+ echo "* http://www.freebsdwiki.net/index.php/Root *"
+ echo "* *"
+ echo "* If your service provider forces (or encourages) you to run server software *"
+ echo "* as root, please complain to them. It is a very bad idea. *"
+ echo "********************************************************************************"
+ echo "Execution will be paused for 60 seconds... Press Ctrl-C now if you wish to stop."
+ for j in 1 2 3 4 5 6; do
+ for i in 1 2 3 4 5 6 7 8 9 10; do
+ printf "\a. "
+ sleep 1
+ done
+ echo ""
+ done
+ echo ""
+ echo "Resuming as root. If anything breaks, you'll get to keep the pieces."
+ sleep 2
+ fi
+ fi
+ ;;
+esac
+
#
# Memory managers
#
@@ -3502,6 +3549,54 @@ fi
#
+# Epoll
+#
+# Check whether --enable-epoll was given.
+if test "${enable_epoll+set}" = set; then :
+ enableval=$enable_epoll; enable_epoll=$enableval
+else
+ enable_epoll=no
+
+fi
+
+if test x$enable_epoll = xno; then
+ have_linux_epoll=no
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(4)" >&5
+$as_echo_n "checking for Linux epoll(4)... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #ifndef __linux__
+ #error This is not Linux
+ #endif
+ #include <sys/epoll.h>
+
+int
+main ()
+{
+epoll_create1 (EPOLL_CLOEXEC);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_linux_epoll=yes
+else
+ have_linux_epoll=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_linux_epoll" >&5
+$as_echo "$have_linux_epoll" >&6; }
+fi
+if test x$enable_epoll,$have_linux_epoll = xyes,no; then
+ as_fn_error $? "epoll support explicitly enabled but not available" "$LINENO" 5
+fi
+
+
+#
# Obfuscation keys
#
@@ -4603,6 +4698,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# -Wunused-parameter -Wunused-but-set-parameter unused parameters
# -Wunused-macros unused macro warnings, but it also enable unused parameters
# -Wstrict-prototypes show warning in grammar.y
+# -wdiscarded-qualifiers show different const removal
# attributes suggestion
# -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=pure
@@ -5537,6 +5633,54 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=bounds-strict" >&5
+$as_echo_n "checking whether $CC supports -fsanitize=bounds-strict... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fsanitize=bounds-strict"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=bounds-strict"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict" >&5
+$as_echo_n "checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict... " >&6; }
+ CFLAGS="$CFLAGS -fsanitize-undefined-trap-on-error"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=object-size" >&5
$as_echo_n "checking whether $CC supports -fsanitize=object-size... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -6938,11 +7082,12 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
#AC_CHECK_COMPILER_WFLAG(cast-align)
+#AC_CHECK_COMPILER_WFLAG(logical-op) # some useless warnings
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wlogical-op" >&5
-$as_echo_n "checking whether $CC supports -Wlogical-op... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wnested-externs" >&5
+$as_echo_n "checking whether $CC supports -Wnested-externs... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wlogical-op"
+ CFLAGS="$CFLAGS -Werror -Wnested-externs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -6951,12 +7096,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wlogical-op"
+ CFLAGS="$OLD_CFLAGS -Wnested-externs"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wlogical-op" >&5
-$as_echo_n "checking whether $CC can actually use -Wlogical-op... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wlogical-op"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wnested-externs" >&5
+$as_echo_n "checking whether $CC can actually use -Wnested-externs... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wnested-externs"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -6970,7 +7115,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wlogical-op"
+ CFLAGS="$OLD_CFLAGS -Wnested-externs"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -6988,10 +7133,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wnested-externs" >&5
-$as_echo_n "checking whether $CC supports -Wnested-externs... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wold-style-definition" >&5
+$as_echo_n "checking whether $CC supports -Wold-style-definition... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wnested-externs"
+ CFLAGS="$CFLAGS -Werror -Wold-style-definition"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -7000,12 +7145,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wnested-externs"
+ CFLAGS="$OLD_CFLAGS -Wold-style-definition"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wnested-externs" >&5
-$as_echo_n "checking whether $CC can actually use -Wnested-externs... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wnested-externs"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wold-style-definition" >&5
+$as_echo_n "checking whether $CC can actually use -Wold-style-definition... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wold-style-definition"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7019,7 +7164,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wnested-externs"
+ CFLAGS="$OLD_CFLAGS -Wold-style-definition"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7037,10 +7182,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wold-style-definition" >&5
-$as_echo_n "checking whether $CC supports -Wold-style-definition... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Woverlength-strings" >&5
+$as_echo_n "checking whether $CC supports -Woverlength-strings... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wold-style-definition"
+ CFLAGS="$CFLAGS -Werror -Woverlength-strings"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -7049,12 +7194,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wold-style-definition"
+ CFLAGS="$OLD_CFLAGS -Woverlength-strings"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wold-style-definition" >&5
-$as_echo_n "checking whether $CC can actually use -Wold-style-definition... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wold-style-definition"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Woverlength-strings" >&5
+$as_echo_n "checking whether $CC can actually use -Woverlength-strings... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Woverlength-strings"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7068,7 +7213,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wold-style-definition"
+ CFLAGS="$OLD_CFLAGS -Woverlength-strings"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7086,10 +7231,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Woverlength-strings" >&5
-$as_echo_n "checking whether $CC supports -Woverlength-strings... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wredundant-decls" >&5
+$as_echo_n "checking whether $CC supports -Wredundant-decls... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Woverlength-strings"
+ CFLAGS="$CFLAGS -Werror -Wredundant-decls"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -7098,12 +7243,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Woverlength-strings"
+ CFLAGS="$OLD_CFLAGS -Wredundant-decls"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Woverlength-strings" >&5
-$as_echo_n "checking whether $CC can actually use -Woverlength-strings... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Woverlength-strings"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wredundant-decls" >&5
+$as_echo_n "checking whether $CC can actually use -Wredundant-decls... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wredundant-decls"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7117,7 +7262,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Woverlength-strings"
+ CFLAGS="$OLD_CFLAGS -Wredundant-decls"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7135,10 +7280,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wredundant-decls" >&5
-$as_echo_n "checking whether $CC supports -Wredundant-decls... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wcast-qual" >&5
+$as_echo_n "checking whether $CC supports -Wcast-qual... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wredundant-decls"
+ CFLAGS="$CFLAGS -Werror -Wcast-qual"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -7147,12 +7292,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wredundant-decls"
+ CFLAGS="$OLD_CFLAGS -Wcast-qual"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wredundant-decls" >&5
-$as_echo_n "checking whether $CC can actually use -Wredundant-decls... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wredundant-decls"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wcast-qual" >&5
+$as_echo_n "checking whether $CC can actually use -Wcast-qual... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wcast-qual"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7166,7 +7311,7 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wredundant-decls"
+ CFLAGS="$OLD_CFLAGS -Wcast-qual"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7184,10 +7329,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wcast-qual" >&5
-$as_echo_n "checking whether $CC supports -Wcast-qual... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wmisleading-indentation" >&5
+$as_echo_n "checking whether $CC supports -Wmisleading-indentation... " >&6; }
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror -Wcast-qual"
+ CFLAGS="$CFLAGS -Werror -Wmisleading-indentation"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -7196,12 +7341,12 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wcast-qual"
+ CFLAGS="$OLD_CFLAGS -Wmisleading-indentation"
# Optionally, run a test
if test "x" != "x"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wcast-qual" >&5
-$as_echo_n "checking whether $CC can actually use -Wcast-qual... " >&6; }
- CFLAGS="$OLD_CFLAGS -Werror -Wcast-qual"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wmisleading-indentation" >&5
+$as_echo_n "checking whether $CC can actually use -Wmisleading-indentation... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wmisleading-indentation"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7215,7 +7360,56 @@ $as_echo "no" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wcast-qual"
+ CFLAGS="$OLD_CFLAGS -Wmisleading-indentation"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wnull-dereference" >&5
+$as_echo_n "checking whether $CC supports -Wnull-dereference... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wnull-dereference"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wnull-dereference"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wnull-dereference" >&5
+$as_echo_n "checking whether $CC can actually use -Wnull-dereference... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wnull-dereference"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wnull-dereference"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -7497,6 +7691,94 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-suggest-attribute=format" >&5
+$as_echo_n "checking whether $CC supports -Wno-suggest-attribute=format... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wno-suggest-attribute=format"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Recent versions of gcc don't fail if -Wno-foo is not recognized
+ # (unless there are also other warnings), so we also check for -Wfoo
+ # which always fails if not supported
+ CFLAGS="$OLD_CFLAGS -Werror -Wsuggest-attribute=format"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-suggest-attribute=format"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-suggest-attribute=format" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-suggest-attribute=format... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wsuggest-attribute=format"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: not needed but enabled" >&5
+$as_echo "not needed but enabled" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+else
+
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-suggest-attribute=format"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-suggest-attribute=format"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
# Certain versions of gcc make -Wshadow completely useless by making it flood
# you with unnecessary warnings <https://lkml.org/lkml/2006/11/28/239>
# Let's check if we can really use it
@@ -7902,6 +8184,18 @@ case $enable_packetver_re in
esac
#
+# Epoll
+#
+case $have_linux_epoll in
+ "yes")
+ CPPFLAGS="$CPPFLAGS -DSOCKET_EPOLL"
+ ;;
+ "no")
+ # default value
+ ;;
+esac
+
+#
# Obfuscation keys
#
if test -n "$obfuscationkey1" -a -n "$obfuscationkey2" -a -n "$obfuscationkey3"; then