diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1390 |
1 files changed, 1321 insertions, 69 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in 2e1b3eb. +# From configure.ac 7c9af5bf8. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -633,6 +633,16 @@ MYSQL_VERSION HAVE_MYSQL MYSQL_CONFIG_HOME DLLEXT +USE_LIBBACKTRACE +BACKTRACE_USES_MALLOC +ALLOC_FILE +VIEW_FILE +BACKTRACE_SUPPORTS_DATA +BACKTRACE_SUPPORTED +LIBBACKTRACE_FORMAT_FILE +BACKTRACE_SUPPORTS_THREADS +BACKTRACE_FILE +AWK SOFLAGS WITH_PLUGINS AR @@ -692,10 +702,15 @@ enable_option_checking enable_manager enable_packetver enable_packetver_re +enable_packetver_zero +enable_packetver_sak +enable_packetver_ad +enable_epoll with_key1 with_key2 with_key3 enable_debug +enable_libbacktrace enable_buildbot enable_rdtsc enable_profiler @@ -703,6 +718,7 @@ enable_64bit enable_lto enable_static enable_sanitize +enable_Werror enable_renewal with_maxconn with_mysql @@ -1341,8 +1357,18 @@ 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-packetver-zero Sets or unsets the PACKETVER_ZERO define - see + src/common/mmo.h (currently disabled by default) + --enable-packetver-sak Sets or unsets the PACKETVER_SAK define - see + src/common/mmo.h (currently disabled by default) + --enable-packetver-ad Sets or unsets the PACKETVER_AD 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-libbacktrace[=ARG] + Compiles with libbacktrace. (no by default - + experimental) --enable-buildbot[=ARG] (available options: yes, no) --enable-rdtsc Uses rdtsc as timing source (disabled by default) Enable it when you've timing issues. (For example: @@ -1366,6 +1392,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) @@ -1824,6 +1852,52 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -2181,16 +2255,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files Makefile src/common/Makefile" -ac_config_files="$ac_config_files 3rdparty/mt19937ar/Makefile 3rdparty/libconfig/Makefile" +ac_config_files="$ac_config_files 3rdparty/mt19937ar/Makefile 3rdparty/libconfig/Makefile 3rdparty/libbacktrace/Makefile 3rdparty/libbacktrace/backtrace-supported.h" ac_config_files="$ac_config_files src/char/Makefile src/login/Makefile" -ac_config_files="$ac_config_files src/map/Makefile src/plugins/Makefile src/tool/Makefile" +ac_config_files="$ac_config_files src/map/Makefile src/plugins/Makefile" 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' @@ -3441,6 +3517,56 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS" >&5 +$as_echo_n "checking host OS... " >&6; } +host_os="`uname`" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5 +$as_echo "$host_os" >&6; } + +# Root-check +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 # @@ -3499,6 +3625,112 @@ fi # +# packetver-Zero +# +# Check whether --enable-packetver-zero was given. +if test "${enable_packetver_zero+set}" = set; then : + enableval=$enable_packetver_zero; + enable_packetver_zero="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-packetver-zero=$enableval... stopping" "$LINENO" 5;; + esac + +else + enable_packetver_zero="no" + +fi + + +# +# packetver-Sak +# +# Check whether --enable-packetver-sak was given. +if test "${enable_packetver_sak+set}" = set; then : + enableval=$enable_packetver_sak; + enable_packetver_sak="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-packetver-sak=$enableval... stopping" "$LINENO" 5;; + esac + +else + enable_packetver_sak="no" + +fi + + +# +# packetver-Ad +# +# Check whether --enable-packetver-ad was given. +if test "${enable_packetver_ad+set}" = set; then : + enableval=$enable_packetver_ad; + enable_packetver_ad="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-packetver-ad=$enableval... stopping" "$LINENO" 5;; + esac + +else + enable_packetver_ad="no" + +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 # @@ -3572,6 +3804,34 @@ fi # +# libbacktrace +# +# Check whether --enable-libbacktrace was given. +if test "${enable_libbacktrace+set}" = set; then : + enableval=$enable_libbacktrace; + enable_libbacktrace="$enableval" + case $enableval in + "no");; + "yes");; + *) as_fn_error $? "invalid argument --enable-libbacktrace=$enableval... stopping" "$LINENO" 5;; + esac + +else + + case $host_os in + Linux* ) + enable_libbacktrace="yes" + ;; + *) + enable_libbacktrace="no" + ;; + esac + + +fi + + +# # Buildbot # # Check whether --enable-buildbot was given. @@ -3654,7 +3914,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 @@ -3674,7 +3934,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 @@ -3695,7 +3955,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 @@ -3706,6 +3966,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. @@ -4577,6 +4860,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 @@ -4585,7 +4869,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # -Werror-implicit-function-declaration -Wtrampolines # -Wjump-misses-init -CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare -std=c99" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -std=c11" >&5 +$as_echo_n "checking whether $CC supports -std=c11... " >&6; } +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -std=c11" +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 supports -std=c1x" >&5 +$as_echo_n "checking whether $CC supports -std=c1x... " >&6; } + CFLAGS="$OLD_CFLAGS -std=c1x" + 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, falling back to -std=c99" >&5 +$as_echo "no, falling back to -std=c99" >&6; } + CFLAGS="$OLD_CFLAGS -std=c99" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare" CPPFLAGS="$CPPFLAGS -I../common" LDFLAGS="$LDFLAGS" @@ -5029,17 +5356,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 @@ -5047,6 +5376,8 @@ else /* end confdefs.h. */ int main(int argc, char **argv){ + (void)argc; + (void)argv; return 0; } @@ -5055,13 +5386,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 \ @@ -5072,6 +5443,8 @@ fi + + # # sanitize Support test # @@ -5511,6 +5884,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" @@ -5902,7 +6323,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5 $as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; } OLD_CFLAGS="$CFLAGS" @@ -6912,11 +7332,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; @@ -6925,12 +7346,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. */ @@ -6944,7 +7365,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 @@ -6962,10 +7383,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; @@ -6974,12 +7395,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. */ @@ -6993,7 +7414,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 @@ -7011,10 +7432,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; @@ -7023,12 +7444,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. */ @@ -7042,7 +7463,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 @@ -7060,10 +7481,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; @@ -7072,12 +7493,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. */ @@ -7091,7 +7512,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 @@ -7109,10 +7530,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; @@ -7121,12 +7542,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. */ @@ -7140,7 +7561,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 @@ -7158,10 +7579,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; @@ -7170,12 +7591,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. */ @@ -7189,7 +7610,105 @@ $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 + 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 -Wvla" >&5 +$as_echo_n "checking whether $CC supports -Wvla... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror -Wvla" + 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 -Wvla" + # Optionally, run a test + if test "x" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wvla" >&5 +$as_echo_n "checking whether $CC can actually use -Wvla... " >&6; } + CFLAGS="$OLD_CFLAGS -Werror -Wvla" + 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 -Wvla" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -7471,6 +7990,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 @@ -7876,6 +8483,54 @@ case $enable_packetver_re in esac # +# Packetver-Zero +# +case $enable_packetver_zero in + "yes") + CPPFLAGS="$CPPFLAGS -DENABLE_PACKETVER_ZERO" + ;; + "no") + # default value + ;; +esac + +# +# Packetver-Sak +# +case $enable_packetver_sak in + "yes") + CPPFLAGS="$CPPFLAGS -DENABLE_PACKETVER_SAK" + ;; + "no") + # default value + ;; +esac + +# +# Packetver-ad +# +case $enable_packetver_ad in + "yes") + CPPFLAGS="$CPPFLAGS -DENABLE_PACKETVER_AD" + ;; + "no") + # default value + ;; +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 @@ -7893,14 +8548,501 @@ 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 # +# libbacktrace +# +if test "$enable_libbacktrace" = "no" ; then + USE_LIBBACKTRACE="no" +else + CPPFLAGS="$CPPFLAGS -DHAVE_LIBBACKTRACE" + USE_LIBBACKTRACE="yes" + + # libbacktrace checks + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -funwind-tables" >&5 +$as_echo_n "checking whether $CC supports -funwind-tables... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -funwind-tables" + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -funwind-tables" + 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 + + + + for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + + case "$AWK" in + "") + as_fn_error $? "Libbacktrace requires awk to build" "$LINENO" 5 + ;; + esac + + backtrace_supported=yes + ac_fn_c_check_header_mongrel "$LINENO" "unwind.h" "ac_cv_header_unwind_h" "$ac_includes_default" +if test "x$ac_cv_header_unwind_h" = xyes; then : + ac_fn_c_check_func "$LINENO" "_Unwind_Backtrace" "ac_cv_func__Unwind_Backtrace" +if test "x$ac_cv_func__Unwind_Backtrace" = xyes; then : + BACKTRACE_FILE="backtrace.lo simple.lo" +else + + BACKTRACE_FILE="nounwind.lo" + backtrace_supported=no + + +fi + +else + + BACKTRACE_FILE="nounwind.lo" + backtrace_supported=no + + +fi + + + + + +$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5 +$as_echo_n "checking __sync extensions... " >&6; } +if ${libbacktrace_cv_sys_sync+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -n "${with_target_subdir}"; then + case "${host}" in + hppa*-*-hpux*) + libbacktrace_cv_sys_sync=no + ;; + *) + libbacktrace_cv_sys_sync=yes + ;; + esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int i; +int +main () +{ + + __sync_bool_compare_and_swap(&i, i, i); + __sync_lock_test_and_set(&i, 1); + __sync_lock_release(&i); + + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libbacktrace_cv_sys_sync=yes +else + libbacktrace_cv_sys_sync=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_sync" >&5 +$as_echo "$libbacktrace_cv_sys_sync" >&6; } + BACKTRACE_SUPPORTS_THREADS=0 + if test "$libbacktrace_cv_sys_sync" = "yes"; then + BACKTRACE_SUPPORTS_THREADS=1 + +$as_echo "#define HAVE_SYNC_FUNCTIONS 1" >>confdefs.h + + fi + + + # Test for __atomic support. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __atomic extensions" >&5 +$as_echo_n "checking __atomic extensions... " >&6; } +if ${libbacktrace_cv_sys_atomic+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test -n "${with_target_subdir}"; then + libbacktrace_cv_sys_atomic=yes + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + int i; +int +main () +{ + + __atomic_load_n(&i, __ATOMIC_ACQUIRE); + __atomic_store_n(&i, 1, __ATOMIC_RELEASE); + + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libbacktrace_cv_sys_atomic=yes +else + libbacktrace_cv_sys_atomic=no + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_atomic" >&5 +$as_echo "$libbacktrace_cv_sys_atomic" >&6; } + if test "$libbacktrace_cv_sys_atomic" = "yes"; then + +$as_echo "#define HAVE_ATOMIC_FUNCTIONS 1" >>confdefs.h + + fi + + # The library needs to be able to read the executable itself. Compile + # a file to determine the executable format. The awk script + # filetype.awk prints out the file type. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking output filetype" >&5 +$as_echo_n "checking output filetype... " >&6; } +if ${libbacktrace_cv_sys_filetype+:} false; then : + $as_echo_n "(cached) " >&6 +else + + filetype= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ +int j; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + filetype=`${AWK} -f $srcdir/3rdparty/libbacktrace/filetype.awk conftest.$ac_objext` +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "compiler failed +See \`config.log' for more details" "$LINENO" 5; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + libbacktrace_cv_sys_filetype=$filetype + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libbacktrace_cv_sys_filetype" >&5 +$as_echo "$libbacktrace_cv_sys_filetype" >&6; } + + # Match the file type to decide what files to compile. + LIBBACKTRACE_FORMAT_FILE= + backtrace_supports_data=yes + case "$libbacktrace_cv_sys_filetype" in + elf*) + LIBBACKTRACE_FORMAT_FILE="elf.o" + ;; + pecoff) + LIBBACKTRACE_FORMAT_FILE="pecoff.o" + backtrace_supports_data=no + ;; + xcoff*) + LIBBACKTRACE_FORMAT_FILE="xcoff.o" + backtrace_supports_data=no + ;; + macho*) + LIBBACKTRACE_FORMAT_FILE="macho.o" + backtrace_supports_data=no + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5 +$as_echo "$as_me: WARNING: could not determine output file type" >&2;} + LIBBACKTRACE_FORMAT_FILE="unknown.o" + backtrace_supported=no + ;; + esac + + + # ELF defines. + elfsize= + case "$libbacktrace_cv_sys_filetype" in + elf32) + elfsize=32 + ;; + elf64) + elfsize=64 + ;; + *) + elfsize=unused + esac + +cat >>confdefs.h <<_ACEOF +#define BACKTRACE_ELF_SIZE $elfsize +_ACEOF + + + # XCOFF defines. + xcoffsize= + case "$libbacktrace_cv_sys_filetype" in + xcoff32) + xcoffsize=32 + ;; + xcoff64) + xcoffsize=64 + ;; + *) + xcoffsize=unused + esac + +cat >>confdefs.h <<_ACEOF +#define BACKTRACE_XCOFF_SIZE $xcoffsize +_ACEOF + + + BACKTRACE_SUPPORTED=0 + if test "$backtrace_supported" = "yes"; then + BACKTRACE_SUPPORTED=1 + fi + + + BACKTRACE_SUPPORTS_DATA=0 + if test "$backtrace_supports_data" = "yes"; then + BACKTRACE_SUPPORTS_DATA=1 + fi + + + ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" +if test "x$ac_cv_func_mmap" = xyes; then : + have_mmap=yes +else + have_mmap=no +fi + + + VIEW_FILE=mmapio.lo + ALLOC_FILE=mmap.lo + + + + + BACKTRACE_USES_MALLOC=0 + if test "$ALLOC_FILE" = "alloc.lo"; then + BACKTRACE_USES_MALLOC=1 + fi + + + ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr" +if test "x$ac_cv_func_dl_iterate_phdr" = xyes; then : + have_dl_iterate_phdr=yes +else + have_dl_iterate_phdr=no +fi + + if test "$have_dl_iterate_phdr" = "yes"; then + +$as_echo "#define HAVE_DL_ITERATE_PHDR 1" >>confdefs.h + + fi + + # Check for the fcntl function. + if test -n "${with_target_subdir}"; then + case "${host}" in + *-*-mingw*) + have_fcntl=no + ;; + spu-*-*) + have_fcntl=no + ;; + *) + have_fcntl=yes + ;; + esac + else + ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes; then : + have_fcntl=yes +else + have_fcntl=no +fi + + fi + if test "$have_fcntl" = "yes"; then + +$as_echo "#define HAVE_FCNTL 1" >>confdefs.h + + fi + + ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" +if test "x$ac_cv_have_decl_strnlen" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNLEN $ac_have_decl +_ACEOF + + for ac_func in lstat readlink +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname" +if test "x$ac_cv_func_getexecname" = xyes; then : + have_getexecname=yes +else + have_getexecname=no +fi + + if test "$have_getexecname" = "yes"; then + +$as_echo "#define HAVE_GETEXECNAME 1" >>confdefs.h + + fi +fi + + +# # Buildbot # case $enable_buildbot in @@ -7950,14 +9092,37 @@ case $enable_renewal in ;; esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fno-var-tracking" >&5 +$as_echo_n "checking whether $CC supports -fno-var-tracking... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fno-var-tracking" + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -fno-var-tracking" + 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 + + + # # Host specific stuff # -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host OS" >&5 -$as_echo_n "checking host OS... " >&6; } -host_os="`uname`" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $host_os" >&5 -$as_echo "$host_os" >&6; } fd_setsize="" DLLEXT=".so" case $host_os in @@ -7968,7 +9133,7 @@ Linux* ) LIBS="$LIBS -ldl" ;; FreeBSD*) - CPPFLAGS="$CPPFLAGS -D__FREEBSD__" + CPPFLAGS="$CPPFLAGS -D__FREEBSD__ -fvisibility=hidden" ;; NetBSD*) CPPFLAGS="$CPPFLAGS -D__NETBSD__" @@ -8807,6 +9972,46 @@ else fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether my_bool is supported (MySQL)" >&5 +$as_echo_n "checking whether my_bool is supported (MySQL)... " >&6; } +if test "$cross_compiling" = yes; then : + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run test program while cross compiling +See \`config.log' for more details" "$LINENO" 5; } +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifdef WIN32 + #include "common/winapi.h" // Needed before mysql.h + #endif + #include <mysql.h> + int main(int argc, char **argv){ + my_bool val = (my_bool)0; + return (int)val; + } + +_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 (converting my_bool to bool)" >&5 +$as_echo "no (converting my_bool to bool)" >&6; } + MYSQL_CFLAGS="$MYSQL_CFLAGS -Dmy_bool=bool" + + +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + CPPFLAGS="$MYSQL_OLD_CPPFLAGS" LIBS="$MYSQL_OLD_LIBS" @@ -8993,6 +10198,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} @@ -9689,6 +10938,7 @@ gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' +AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -9793,13 +11043,15 @@ do "src/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/common/Makefile" ;; "3rdparty/mt19937ar/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/mt19937ar/Makefile" ;; "3rdparty/libconfig/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/libconfig/Makefile" ;; + "3rdparty/libbacktrace/Makefile") CONFIG_FILES="$CONFIG_FILES 3rdparty/libbacktrace/Makefile" ;; + "3rdparty/libbacktrace/backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES 3rdparty/libbacktrace/backtrace-supported.h" ;; "src/char/Makefile") CONFIG_FILES="$CONFIG_FILES src/char/Makefile" ;; "src/login/Makefile") CONFIG_FILES="$CONFIG_FILES src/login/Makefile" ;; "src/map/Makefile") CONFIG_FILES="$CONFIG_FILES src/map/Makefile" ;; "src/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/Makefile" ;; - "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 |