summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1345
1 files changed, 1284 insertions, 61 deletions
diff --git a/configure b/configure
index 836c29d98..9e5c01851 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 1cfa636.
+# From configure.ac b7b45b7c3.
# 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
@@ -703,12 +704,12 @@ enable_64bit
enable_lto
enable_static
enable_sanitize
+enable_Werror
enable_renewal
with_maxconn
with_mysql
with_MYSQL_CFLAGS
with_MYSQL_LIBS
-with_zlib
'
ac_precious_vars='build_alias
host_alias
@@ -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)
@@ -1367,6 +1369,8 @@ Optional Features:
disabled by default)
--enable-sanitize[=ARG] Enables sanitizer. (disabled by default) (available
options: yes, no, full)
+ --enable-Werror Enables -Werror in the compiler flags. (disabled by
+ default)
--disable-renewal Disable Ragnarok Renewal support (override settings
in src/config/renewal.h)
@@ -1387,10 +1391,6 @@ Optional Packages:
"mysql_config --include")
--with-MYSQL_LIBS=ARG specify MYSQL_LIBS manually (instead of using
"mysql_config --libs")
- --with-zlib=DIR root directory path of zlib installation (defaults
- to /usr/local or /usr if not found in /usr/local).
- Assumes that the header files are in DIR/include and
- the library files are in DIR/lib
Some influential environment variables:
CC C compiler command
@@ -2196,6 +2196,8 @@ ac_config_files="$ac_config_files src/test/Makefile"
ac_config_files="$ac_config_files tools/HPMHookGen/Makefile"
+ac_config_files="$ac_config_files tools/doxygen/Makefile"
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -3446,6 +3448,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 && test -z "$CI"; 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
#
@@ -3504,6 +3551,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
#
@@ -3659,7 +3754,7 @@ if test "${enable_lto+set}" = set; then :
case $enableval in
"no");;
"yes");;
- *) as_fn_error $? "invalid argument --enable-lto=$disableval... stopping" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument --enable-lto=$enableval... stopping" "$LINENO" 5;;
esac
else
@@ -3679,7 +3774,7 @@ if test "${enable_static+set}" = set; then :
case $enableval in
"no");;
"yes");;
- *) as_fn_error $? "invalid argument --enable-static=$disableval... stopping" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument --enable-static=$enableval... stopping" "$LINENO" 5;;
esac
else
@@ -3700,7 +3795,7 @@ if test "${enable_sanitize+set}" = set; then :
"no");;
"yes");;
"full");;
- *) as_fn_error $? "invalid argument --enable-sanitize=$disableval... stopping" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument --enable-sanitize=$enableval... stopping" "$LINENO" 5;;
esac
else
@@ -3711,6 +3806,29 @@ fi
#
+# -Werror compiler flag
+# It's not always possible (if at all) to pass -Werror in the CFLAGS, since
+# autoconf often generates test-code that produces warnings.
+# Reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734104
+#
+# Check whether --enable-Werror was given.
+if test "${enable_Werror+set}" = set; then :
+ enableval=$enable_Werror;
+ enable_Werror="$enableval"
+ case $enableval in
+ "no");;
+ "yes");;
+ *) as_fn_error $? "invalid argument --enable-Werror=$enableval... stopping" "$LINENO" 5;;
+ esac
+
+else
+ enable_Werror="no"
+
+fi
+
+
+
+#
# Renewal
#
# Check whether --enable-renewal was given.
@@ -3811,26 +3929,6 @@ fi
-#
-# Specify the path of the zlib library (required library)
-#
-
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
- withval=$with_zlib;
- test -n "$withval" && ZLIB_HOME="$withval"
-
-else
-
- ZLIB_HOME=/usr/local
- test ! -f "${ZLIB_HOME}/include/zlib.h" && ZLIB_HOME=/usr
-
-
-fi
-
-
-
-
###############################################################################
# Check for programs and types.
#
@@ -4592,10 +4690,41 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CFLAGS="$CFLAGS -pipe -ffast-math -fvisibility=hidden -Wall -Wextra -Wno-sign-compare"
+# -Wcast-qual use for check wrong casts. It cant be added by default, because some casts must be wrong.
+# -Wconversion warning: conversion to 'long unsigned int' from 'int' may change the sign of the result
+# -Wfloat-equal comparing floating point with == or != is unsafe
+# -Wunsuffixed-float-constants float issues
+# -Wpedantic different pedantic checks. Not all can be fixed in nice way.
+# -Wtraditional-conversion some conversion issues
+# -Wunsafe-loop-optimizations possible optimisation issues
+# -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
+
+# flags what can be used but now return no warnings:
+# -Wchkp -Wdisabled-optimization
+# -Werror-implicit-function-declaration -Wtrampolines
+# -Wjump-misses-init
+
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99"
CPPFLAGS="$CPPFLAGS -I../common"
LDFLAGS="$LDFLAGS"
+# Add /usr/local to the library and header search path, where appropriate
+case `uname` in
+ Darwin*|*BSD*)
+ if test -d /usr/local/include ; then
+ CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+ fi
+ if test -d /usr/local/lib ; then
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
+ fi
+ ;;
+esac
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if ${ac_cv_c_bigendian+:} false; then :
@@ -5024,17 +5153,19 @@ rm -f core conftest.err conftest.$ac_objext \
if test "$enable_lto" != "no" ; then
OLD_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -flto"
+ CFLAGS="$CFLAGS -flto -ffat-lto-objects -Werror"
OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -flto"
+ LDFLAGS="$LDFLAGS -flto -ffat-lto-objects"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto" >&5
-$as_echo_n "checking whether $CC supports -flto... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto -ffat-lto-objects" >&5
+$as_echo_n "checking whether $CC supports -flto -ffat-lto-objects... " >&6; }
if test "$cross_compiling" = yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5
$as_echo "guessing no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
else
@@ -5042,6 +5173,8 @@ else
/* end confdefs.h. */
int main(int argc, char **argv){
+ (void)argc;
+ (void)argv;
return 0;
}
@@ -5050,13 +5183,53 @@ if ac_fn_c_try_run "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -flto -ffat-lto-objects"
+ LDFLAGS="$OLD_LDFLAGS -flto -ffat-lto-objects"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- CFLAGS="$OLD_CFLAGS"
- LDFLAGS="$OLD_LDFLAGS"
+ CFLAGS="$OLD_CFLAGS -flto"
+ LDFLAGS="$OLD_LDFLAGS -flto"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flto" >&5
+$as_echo_n "checking whether $CC supports -flto... " >&6; }
+ if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5
+$as_echo "guessing no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv){
+ (void)argc;
+ (void)argv;
+ return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$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 *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -5067,6 +5240,8 @@ fi
+
+
#
# sanitize Support test
#
@@ -5506,6 +5681,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"
@@ -6221,6 +6444,153 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Winit-self" >&5
+$as_echo_n "checking whether $CC supports -Winit-self... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Winit-self"
+ 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 -Winit-self"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Winit-self" >&5
+$as_echo_n "checking whether $CC can actually use -Winit-self... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Winit-self"
+ 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 -Winit-self"
+
+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 -Wpointer-arith" >&5
+$as_echo_n "checking whether $CC supports -Wpointer-arith... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wpointer-arith"
+ 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 -Wpointer-arith"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wpointer-arith" >&5
+$as_echo_n "checking whether $CC can actually use -Wpointer-arith... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wpointer-arith"
+ 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 -Wpointer-arith"
+
+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 -Wswitch-bool" >&5
+$as_echo_n "checking whether $CC supports -Wswitch-bool... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wswitch-bool"
+ 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 -Wswitch-bool"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wswitch-bool" >&5
+$as_echo_n "checking whether $CC can actually use -Wswitch-bool... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wswitch-bool"
+ 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 -Wswitch-bool"
+
+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 -Wenum-conversion" >&5
$as_echo_n "checking whether $CC supports -Wenum-conversion... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -6466,6 +6836,645 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wformat" >&5
+$as_echo_n "checking whether $CC supports -Wformat... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wformat"
+ 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 -Wformat"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wformat" >&5
+$as_echo_n "checking whether $CC can actually use -Wformat... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wformat"
+ 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 -Wformat"
+
+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 -Wformat-signedness" >&5
+$as_echo_n "checking whether $CC supports -Wformat-signedness... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wformat-signedness"
+ 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 -Wformat-signedness"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wformat-signedness" >&5
+$as_echo_n "checking whether $CC can actually use -Wformat-signedness... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wformat-signedness"
+ 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 -Wformat-signedness"
+
+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 -Wformat-y2k" >&5
+$as_echo_n "checking whether $CC supports -Wformat-y2k... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wformat-y2k"
+ 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 -Wformat-y2k"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wformat-y2k" >&5
+$as_echo_n "checking whether $CC can actually use -Wformat-y2k... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wformat-y2k"
+ 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 -Wformat-y2k"
+
+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 -Wmissing-include-dirs" >&5
+$as_echo_n "checking whether $CC supports -Wmissing-include-dirs... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wmissing-include-dirs"
+ 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 -Wmissing-include-dirs"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wmissing-include-dirs" >&5
+$as_echo_n "checking whether $CC can actually use -Wmissing-include-dirs... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wmissing-include-dirs"
+ 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 -Wmissing-include-dirs"
+
+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 -Wsuggest-attribute=noreturn" >&5
+$as_echo_n "checking whether $CC supports -Wsuggest-attribute=noreturn... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wsuggest-attribute=noreturn"
+ 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 -Wsuggest-attribute=noreturn"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wsuggest-attribute=noreturn" >&5
+$as_echo_n "checking whether $CC can actually use -Wsuggest-attribute=noreturn... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wsuggest-attribute=noreturn"
+ 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 -Wsuggest-attribute=noreturn"
+
+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 -Wundef" >&5
+$as_echo_n "checking whether $CC supports -Wundef... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wundef"
+ 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 -Wundef"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wundef" >&5
+$as_echo_n "checking whether $CC can actually use -Wundef... " >&6; }
+ CFLAGS="$OLD_CFLAGS -Werror -Wundef"
+ 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 -Wundef"
+
+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
+
+
+#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 -Wnested-externs" >&5
+$as_echo_n "checking whether $CC supports -Wnested-externs... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wnested-externs"
+ 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 -Wnested-externs"
+ # 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"
+ 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 -Wnested-externs"
+
+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 -Wold-style-definition" >&5
+$as_echo_n "checking whether $CC supports -Wold-style-definition... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wold-style-definition"
+ 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 -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 -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. */
+
+_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 -Wold-style-definition"
+
+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 -Woverlength-strings" >&5
+$as_echo_n "checking whether $CC supports -Woverlength-strings... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Woverlength-strings"
+ 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 -Woverlength-strings"
+ # 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"
+ 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 -Woverlength-strings"
+
+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 -Wredundant-decls" >&5
+$as_echo_n "checking whether $CC supports -Wredundant-decls... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wredundant-decls"
+ 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 -Wredundant-decls"
+ # 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"
+ 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 -Wredundant-decls"
+
+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 -Wcast-qual" >&5
+$as_echo_n "checking whether $CC supports -Wcast-qual... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wcast-qual"
+ 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 -Wcast-qual"
+ # 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"
+ 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 -Wcast-qual"
+
+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 -Wmisleading-indentation" >&5
+$as_echo_n "checking whether $CC supports -Wmisleading-indentation... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror -Wmisleading-indentation"
+ 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 -Wmisleading-indentation"
+ # Optionally, run a test
+ if test "x" != "x"; then
+ { $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. */
+
+_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 -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
+ 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 -Wno-format-nonliteral" >&5
$as_echo_n "checking whether $CC supports -Wno-format-nonliteral... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -6730,6 +7739,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
@@ -7135,6 +8232,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
@@ -7152,10 +8261,64 @@ case $enable_debug in
"yes")
CFLAGS="$CFLAGS -g"
CPPFLAGS="$CPPFLAGS -DDEBUG"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-omit-frame-pointer" >&5
+$as_echo_n "checking whether $CC supports -fno-omit-frame-pointer... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fno-omit-frame-pointer"
+ 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
+
+
;;
"gdb")
CFLAGS="$CFLAGS -ggdb"
CPPFLAGS="$CPPFLAGS -DDEBUG"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-omit-frame-pointer" >&5
+$as_echo_n "checking whether $CC supports -fno-omit-frame-pointer... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fno-omit-frame-pointer"
+ 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
+
+
;;
esac
@@ -7227,7 +8390,7 @@ Linux* )
LIBS="$LIBS -ldl"
;;
FreeBSD*)
- CPPFLAGS="$CPPFLAGS -D__FREEBSD__"
+ CPPFLAGS="$CPPFLAGS -D__FREEBSD__ -fvisibility=hidden"
;;
NetBSD*)
CPPFLAGS="$CPPFLAGS -D__NETBSD__"
@@ -7263,10 +8426,6 @@ fi
#
# zlib library (required)
#
-if test -n "${ZLIB_HOME}" ; then
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
- CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
-fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateEnd" >&5
$as_echo_n "checking for library containing inflateEnd... " >&6; }
if ${ac_cv_search_inflateEnd+:} false; then :
@@ -7322,14 +8481,14 @@ if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
- as_fn_error $? "zlib library not found or incompatible, please specify the correct path with --with-zlib=DIR... stopping" "$LINENO" 5
+ as_fn_error $? "zlib library not found or incompatible... stopping" "$LINENO" 5
fi
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
if test "x$ac_cv_header_zlib_h" = xyes; then :
else
- as_fn_error $? "zlib header not found, please specify the correct path with --with-zlib=DIR... stopping" "$LINENO" 5
+ as_fn_error $? "zlib header not found, please specify the correct path with... stopping" "$LINENO" 5
fi
@@ -8096,13 +9255,20 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking PCRE library" >&5
$as_echo_n "checking PCRE library... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_study in -lpcre" >&5
-$as_echo_n "checking for pcre_study in -lpcre... " >&6; }
-if ${ac_cv_lib_pcre_pcre_study+:} false; then :
+ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default"
+if test "x$ac_cv_header_pcre_h" = xyes; then :
+
+else
+ as_fn_error $? "PCRE header not found" "$LINENO" 5
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcre_study" >&5
+$as_echo_n "checking for library containing pcre_study... " >&6; }
+if ${ac_cv_search_pcre_study+:} false; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpcre $LIBS"
+ ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -8121,23 +9287,35 @@ return pcre_study ();
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_pcre_pcre_study=yes
-else
- ac_cv_lib_pcre_pcre_study=no
+for ac_lib in '' pcre; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_pcre_study=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ conftest$ac_exeext
+ if ${ac_cv_search_pcre_study+:} false; then :
+ break
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_study" >&5
-$as_echo "$ac_cv_lib_pcre_pcre_study" >&6; }
-if test "x$ac_cv_lib_pcre_pcre_study" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPCRE 1
-_ACEOF
+done
+if ${ac_cv_search_pcre_study+:} false; then :
- LIBS="-lpcre $LIBS"
+else
+ ac_cv_search_pcre_study=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcre_study" >&5
+$as_echo "$ac_cv_search_pcre_study" >&6; }
+ac_res=$ac_cv_search_pcre_study
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
else
as_fn_error $? "PCRE not found or incompatible" "$LINENO" 5
@@ -8237,6 +9415,50 @@ fi
LIBS="$OLD_LIBS"
fi
+#
+# -Werror compiler flag
+#
+if test "$enable_Werror" != "no" ; then
+
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Werror" >&5
+$as_echo_n "checking whether $CC supports -Werror... " >&6; }
+ if test "$cross_compiling" = yes; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: guessing no" >&5
+$as_echo "guessing no" >&6; }
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ int main(int argc, char **argv){
+ return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_run "$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 *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+
STATIC=${STATIC}
PLUGINSTATIC=${PLUGINSTATIC}
@@ -9044,6 +10266,7 @@ do
"src/tool/Makefile") CONFIG_FILES="$CONFIG_FILES src/tool/Makefile" ;;
"src/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;;
"tools/HPMHookGen/Makefile") CONFIG_FILES="$CONFIG_FILES tools/HPMHookGen/Makefile" ;;
+ "tools/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES tools/doxygen/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac