diff --git a/TargetGroup.cc b/TargetGroup.cc index 32a3fd429..7bf298ac2 100644 --- a/TargetGroup.cc +++ b/TargetGroup.cc @@ -133,7 +133,7 @@ int TargetGroup::rewind() { return 0; } else - assert(FALSE); + assert(0); } /* For ranges, we easily set current to zero and calculate * the ips by the number of values in the columns */ diff --git a/configure b/configure index c6bff21d8..c76c5fb9b 100755 --- a/configure +++ b/configure @@ -3122,7 +3122,6 @@ echo "$as_me: error: Could not locate a C++ compiler. If it exists, add it to yo { (exit 1); exit 1; }; } fi -nmap_gcc_major_version=0 { echo "$as_me:$LINENO: checking whether the compiler is gcc 4 or greater" >&5 echo $ECHO_N "checking whether the compiler is gcc 4 or greater... $ECHO_C" >&6; } if test x"$GXX" = xno; then @@ -3135,24 +3134,18 @@ else else our_gcc="$ac_cv_prog_CC" fi - # new major versions must be added here + + nmap_gcc_major_version=0 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in *4.) nmap_gcc_major_version=4 ;; - *3.) - nmap_gcc_major_version=3 - ;; - *2.) - nmap_gcc_major_version=2 - ;; - *1.) - nmap_gcc_major_version=1 - ;; esac - if test "$nmap_gcc_major_version" -ge 4; then + + if test 4 -ge $nmap_gcc_major_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } + CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -3160,10 +3153,6 @@ echo "${ECHO_T}no" >&6; } fi # Remember that all following tests will run with this CXXFLAGS by default -if test "$nmap_gcc_major_version" -ge 4; then - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" -fi - { echo "$as_me:$LINENO: checking for __func__" >&5 echo $ECHO_N "checking for __func__... $ECHO_C" >&6; } @@ -3174,7 +3163,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +include int main () @@ -3281,10 +3270,6 @@ fi - - - - ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -3399,10 +3384,78 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +{ echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6; } +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_inline=$ac_kw +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6; } + + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + -linux=no -macosx=no needs_cpp_precomp=no +LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" case "$host" in *alpha-dec-osf*) @@ -3410,43 +3463,40 @@ case "$host" in #define DEC 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-netbsd* | *-knetbsd*-gnu) cat >>confdefs.h <<\_ACEOF #define NETBSD 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; *-openbsd*) cat >>confdefs.h <<\_ACEOF #define OPENBSD 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; - *-sgi-irix5*) + *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) + cat >>confdefs.h <<\_ACEOF +#define FREEBSD 1 +_ACEOF + + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support + ;; + *-bsdi*) + cat >>confdefs.h <<\_ACEOF +#define BSDI 1 +_ACEOF + + LUAFLAVOR=bsd + ;; + *-sgi-irix5* | *-sgi-irix6*) cat >>confdefs.h <<\_ACEOF #define IRIX 1 _ACEOF - if test -z "$GCC"; then - sgi_cc=yes - fi - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-sgi-irix6*) - cat >>confdefs.h <<\_ACEOF -#define IRIX 1 -_ACEOF - - if test -z "$GCC"; then - sgi_cc=yes - fi - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-hpux*) cat >>confdefs.h <<\_ACEOF @@ -3526,9 +3576,8 @@ _ACEOF fi - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; - *-solaris2.0*) + *-solaris2.0* | *-solaris2.1* | *-solaris2.2* | *-solaris2.3* | *-solaris2.4* | *-solaris2.5.1 ) cat >>confdefs.h <<\_ACEOF #define STUPID_SOLARIS_CHECKSUM_BUG 1 _ACEOF @@ -3537,76 +3586,12 @@ _ACEOF #define SOLARIS 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.[1-9][0-9]*) - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.1*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.2*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.3*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.4*) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.5.1) - cat >>confdefs.h <<\_ACEOF -#define STUPID_SOLARIS_CHECKSUM_BUG 1 -_ACEOF - - cat >>confdefs.h <<\_ACEOF -#define SOLARIS 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-solaris*) cat >>confdefs.h <<\_ACEOF #define SOLARIS 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-sunos4*) cat >>confdefs.h <<\_ACEOF @@ -3617,10 +3602,8 @@ _ACEOF #define SPRINTF_RETURNS_STRING 1 _ACEOF - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-linux*) - linux=yes cat >>confdefs.h <<\_ACEOF #define LINUX 1 _ACEOF @@ -3628,47 +3611,22 @@ _ACEOF cat >>confdefs.h <<\_ACEOF #define PCAP_TIMEOUT_IGNORED 1 _ACEOF - # libpcap doesn't even LOOK at - # the timeout you give it under Linux - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support - ;; - *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) - cat >>confdefs.h <<\_ACEOF -#define FREEBSD 1 -_ACEOF - - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support - ;; - *-bsdi*) - cat >>confdefs.h <<\_ACEOF -#define BSDI 1 -_ACEOF - - LUAFLAVOR=bsd - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" + # libpcap doesn't even LOOK at the timeout you give it under Linux + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; *-apple-darwin*) - macosx=yes cat >>confdefs.h <<\_ACEOF #define MACOSX 1 _ACEOF - needs_cpp_precomp=yes - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_MACOSX\"" - ;; - *) - LUAFLAGS=MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" -esac - -{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 -echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } -if test "${ac_cv_search_dlopen+set}" = set; then +{ echo "$as_me:$LINENO: checking for main in -lm" >&5 +echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_func_search_save_LIBS=$LIBS + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3676,29 +3634,16 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); + int main () { -return dlopen (); +return main (); ; return 0; } _ACEOF -for ac_lib in '' dl; 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 - rm -f conftest.$ac_objext conftest$ac_exeext +rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -3716,112 +3661,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_search_dlopen=$ac_res + ac_cv_lib_m_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - + ac_cv_lib_m_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_dlopen+set}" = set; then - break + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -done -if test "${ac_cv_search_dlopen+set}" = set; then - : -else - ac_cv_search_dlopen=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 -echo "${ECHO_T}$ac_cv_search_dlopen" >&6; } -ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - -{ echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6; } -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 +echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } +if test $ac_cv_lib_m_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBM 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_inline=$ac_kw -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + LIBS="-lm $LIBS" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6; } - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF + LUAFLAGS="MYCFLAGS=\"-DLUA_USE_MACOSX\"" + needs_cpp_precomp=yes ;; + *) + LUAFLAGS=MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" esac -if test -n "$sgi_cc"; then - cat >>confdefs.h <<\_ACEOF -#define inline -_ACEOF -fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4461,18 +4331,7 @@ done - - - - - - - - - - - -for ac_header in string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h bstring.h sys/time.h sys/stat.h fcntl.h termios.h pwd.h unistd.h +for ac_header in pwd.h termios.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -4612,635 +4471,6 @@ fi done -for ac_header in netinet/in.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in sys/socket.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in net/if.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H -# include -# endif -#if HAVE_NETINET_IN_H -# include -# endif -#if HAVE_SYS_SOCKET_H -# include -# endif - - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in netinet/if_ether.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if HAVE_SYS_TYPES_H -# include -# endif -#if HAVE_NETINET_IN_H -# include -# endif -# if HAVE_SYS_SOCKET_H -# include -# endif -# if HAVE_NET_IF_H -# include -# endif - - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - - -if test $macosx = no; then - -{ echo "$as_me:$LINENO: checking for main in -lm" >&5 -echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_m_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 -echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } -if test $ac_cv_lib_m_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF - - LIBS="-lm $LIBS" - -fi - -fi - -{ echo "$as_me:$LINENO: checking for library containing gethostent" >&5 -echo $ECHO_N "checking for library containing gethostent... $ECHO_C" >&6; } -if test "${ac_cv_search_gethostent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostent (); -int -main () -{ -return gethostent (); - ; - return 0; -} -_ACEOF -for ac_lib in '' nsl; 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 - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_gethostent=$ac_res -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_gethostent+set}" = set; then - break -fi -done -if test "${ac_cv_search_gethostent+set}" = set; then - : -else - ac_cv_search_gethostent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostent" >&5 -echo "${ECHO_T}$ac_cv_search_gethostent" >&6; } -ac_res=$ac_cv_search_gethostent -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - { echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 echo $ECHO_N "checking for library containing setsockopt... $ECHO_C" >&6; } if test "${ac_cv_search_setsockopt+set}" = set; then @@ -5325,90 +4555,6 @@ if test "$ac_res" != no; then fi -{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 -echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; } -if test "${ac_cv_search_nanosleep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char nanosleep (); -int -main () -{ -return nanosleep (); - ; - return 0; -} -_ACEOF -for ac_lib in '' posix4; 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 - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_search_nanosleep=$ac_res -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_nanosleep+set}" = set; then - break -fi -done -if test "${ac_cv_search_nanosleep+set}" = set; then - : -else - ac_cv_search_nanosleep=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 -echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; } -ac_res=$ac_cv_search_nanosleep -if test "$ac_res" != no; then - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - # By default, try to build nmapfe if possible test "${with_nmapfe+set}" != "set" && with_nmapfe=yes @@ -5604,280 +4750,6 @@ fi - if test "$use_openssl" = "yes"; then - if test "${ac_cv_header_openssl_err_h+set}" = set; then - { echo "$as_me:$LINENO: checking for openssl/err.h" >&5 -echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_err_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking openssl/err.h usability" >&5 -echo $ECHO_N "checking openssl/err.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking openssl/err.h presence" >&5 -echo $ECHO_N "checking openssl/err.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: openssl/err.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: openssl/err.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: openssl/err.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: openssl/err.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: openssl/err.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: openssl/err.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: openssl/err.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: openssl/err.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: openssl/err.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for openssl/err.h" >&5 -echo $ECHO_N "checking for openssl/err.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_err_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_openssl_err_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_err_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_err_h" >&6; } - -fi -if test $ac_cv_header_openssl_err_h = yes; then - : -else - use_openssl="no" - { echo "$as_me:$LINENO: WARNING: Failed to find openssl/err.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 -echo "$as_me: WARNING: Failed to find openssl/err.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} -fi - - - fi - - if test "$use_openssl" = "yes"; then - if test "${ac_cv_header_openssl_rand_h+set}" = set; then - { echo "$as_me:$LINENO: checking for openssl/rand.h" >&5 -echo $ECHO_N "checking for openssl/rand.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_rand_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_rand_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_rand_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking openssl/rand.h usability" >&5 -echo $ECHO_N "checking openssl/rand.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking openssl/rand.h presence" >&5 -echo $ECHO_N "checking openssl/rand.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: openssl/rand.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: openssl/rand.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: openssl/rand.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: openssl/rand.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: openssl/rand.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: openssl/rand.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: openssl/rand.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/rand.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: openssl/rand.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for openssl/rand.h" >&5 -echo $ECHO_N "checking for openssl/rand.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_rand_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_openssl_rand_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_rand_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_rand_h" >&6; } - -fi -if test $ac_cv_header_openssl_rand_h = yes; then - : -else - use_openssl="no" - { echo "$as_me:$LINENO: WARNING: Failed to find openssl/rand.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&5 -echo "$as_me: WARNING: Failed to find openssl/rand.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument" >&2;} -fi - - - fi - # use_openssl="yes" given explicitly in next 2 rules to avoid adding lib to $LIBS if test "$use_openssl" = "yes"; then { echo "$as_me:$LINENO: checking for BIO_int_ctrl in -lcrypto" >&5 @@ -6457,10 +5329,6 @@ fi fi -#if test $linux = yes; then -# have_libpcap=no -#fi - if test $needs_cpp_precomp = yes; then CXXFLAGS="-no-cpp-precomp $CXXFLAGS" fi @@ -6480,8 +5348,11 @@ if test $have_libpcap = yes; then { echo "$as_me:$LINENO: checking if libpcap version is recent enough" >&5 echo $ECHO_N "checking if libpcap version is recent enough... $ECHO_C" >&6; } if test "$cross_compiling" = yes; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; have_libpcap=no + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6542,7 +5413,6 @@ fi LIBS="$LIBS_OLD" fi - LIBPCAP_LIBS="-lpcap" if test $have_libpcap = yes; then PCAP_DEPENDS="" @@ -7595,11 +6465,16 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # if we didn't find we use our own if test $have_lua != yes; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } CXXFLAGS="-I$LIBLUADIR $CXXFLAGS" LIBLUA_LIBS="$LIBLUADIR/liblua.a" LUA_DEPENDS="$LIBLUADIR/liblua.a" LUA_CLEAN="lua_clean" LUA_DIST_CLEAN="lua_dist_clean" + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } fi INSTALLNSE="install-nse" @@ -7622,175 +6497,6 @@ fi -{ echo "$as_me:$LINENO: checking struct ip" >&5 -echo $ECHO_N "checking struct ip... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ -struct ip ip; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; }; bsd_networking=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; bsd_networking=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; -if test $bsd_networking = yes; then - - cat >>confdefs.h <<\_ACEOF -#define BSD_NETWORKING 1 -_ACEOF - - { echo "$as_me:$LINENO: checking ip_v in struct ip" >&5 -echo $ECHO_N "checking ip_v in struct ip... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ -struct ip ip; ip.ip_v; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; }; has_bitfields=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; has_bitfields=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - if test $has_bitfields = no; then - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-D__STDC__=2" - - { echo "$as_me:$LINENO: checking if setting __STDC__=2 gives ip_v" >&5 -echo $ECHO_N "checking if setting __STDC__=2 gives ip_v... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ -struct ip ip; ip.ip_v; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; }; setting_stdc_helps=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; }; setting_stdc_helps=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - CXXFLAGS="$SAVE_CXXFLAGS" - if test $setting_stdc_helps = yes; then - CXXFLAGS="$CXXFLAGS -D__STDC__=2" - else - { echo "$as_me:$LINENO: result: Can't figure out how to get bitfields - configure failed" >&5 -echo "${ECHO_T}Can't figure out how to get bitfields - configure failed" >&6; } - exit 1 - fi - fi -fi - - - { echo "$as_me:$LINENO: checking if sockaddr{} has sa_len member" >&5 echo $ECHO_N "checking if sockaddr{} has sa_len member... $ECHO_C" >&6; } if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then @@ -7803,8 +6509,8 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -# include -# include + #include + #include int main () { @@ -7849,6 +6555,7 @@ _ACEOF fi +#dnl check endedness { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then @@ -8122,18 +6829,18 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest.$ac_objext; then \ - cat >>confdefs.h <<\_ACEOF + cat >>confdefs.h <<\_ACEOF #define IN_ADDR_DEEPSTRUCT 1 _ACEOF \ - { echo "$as_me:$LINENO: result: yes" >&5 + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 \ - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -8199,15 +6906,15 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include -# include + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include + #include int main () { @@ -8264,14 +6971,14 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include int main () { @@ -8328,15 +7035,15 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include -# include + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include + #include int main () { @@ -8382,13 +7089,7 @@ _ACEOF fi - - - - - - -for ac_func in bzero memcpy nanosleep strerror strcasestr getopt_long_only +for ac_func in strerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -8482,242 +7183,6 @@ fi done -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -{ echo "$as_me:$LINENO: checking for usleep" >&5 -echo $ECHO_N "checking for usleep... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -usleep (200); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: checking if usleep needs custom prototype" >&5 -echo $ECHO_N "checking if usleep needs custom prototype... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include - -extern "C" int usleep (unsigned int); -int -main () -{ - -usleep (200); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define NEED_USLEEP_PROTO 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -int -main () -{ - -char buffer[200]; -gethostname (buffer, 200); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - - { echo "$as_me:$LINENO: checking if gethostname needs custom prototype" >&5 -echo $ECHO_N "checking if gethostname needs custom prototype... $ECHO_C" >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -#include -#include - -extern "C" int gethostname (char *, unsigned int); -int -main () -{ - -char buffer[200]; -gethostname (buffer, 200); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - cat >>confdefs.h <<\_ACEOF -#define NEED_GETHOSTNAME_PROTO 1 -_ACEOF - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8801,7 +7266,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - # Check whether --with-libnbase was given. if test "${with_libnbase+set}" = set; then withval=$with_libnbase; case "$with_libnbase" in @@ -8933,8 +7397,6 @@ fi subdirs="$subdirs $nmap_cfg_subdirs" - - ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF diff --git a/configure.ac b/configure.ac index 345430b79..718eb2f69 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ if test $CXXPROG = "MISSING"; then AC_MSG_ERROR([Could not locate a C++ compiler. If it exists, add it to your PATH or give configure the CXX=path_to_compiler argument. Otherwise, install a C++ compiler such as g++ or install a binary package of Nmap (see http://www.insecure.org/nmap/nmap_download.html ))]) fi -nmap_gcc_major_version=0 AC_MSG_CHECKING([whether the compiler is gcc 4 or greater]) if test x"$GXX" = xno; then AC_MSG_RESULT([no]) @@ -58,36 +57,26 @@ else else our_gcc="$ac_cv_prog_CC" fi - # new major versions must be added here + + nmap_gcc_major_version=0 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in *4.) nmap_gcc_major_version=4 ;; - *3.) - nmap_gcc_major_version=3 - ;; - *2.) - nmap_gcc_major_version=2 - ;; - *1.) - nmap_gcc_major_version=1 - ;; esac - if test "$nmap_gcc_major_version" -ge 4; then + + if test 4 -ge $nmap_gcc_major_version; then AC_MSG_RESULT([yes]) + CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" else AC_MSG_RESULT([no]) fi fi # Remember that all following tests will run with this CXXFLAGS by default -if test "$nmap_gcc_major_version" -ge 4; then - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" -fi - AC_MSG_CHECKING(for __func__) AC_TRY_COMPILE([ -#include +include ],[printf ("%s", __func__);], have_func=yes, have_func=no) if test "x$have_func" = "xyes"; then @@ -108,193 +97,80 @@ have_function=yes, have_function=no) fi fi -dnl AC_PROG_INSTALL -dnl AC_PATH_PROG(MAKEDEPEND, makedepend) - -dnl Checks for typedefs, structures, and compiler characteristics. - -dnl check for void should be put in -dnl AC_MSG_CHECKING(for void) -dnl AC_TRY_COMPILE(, [void *foo = 0;], -dnl [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_VOID)], [AC_MSG_RESULT(no)]) - -dnl so should check for 'const' -dnl AC_MSG_CHECKING(for const) -dnl AC_TRY_COMPILE(, [const int foo = 0;], -dnl [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_CONST)], [AC_MSG_RESULT(no)]) - AC_SUBST(COMPAT_OBJS) AC_SUBST(COMPAT_SRCS) dnl Host specific hacks AC_CANONICAL_HOST +AC_C_INLINE -linux=no -macosx=no needs_cpp_precomp=no +LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" case "$host" in *alpha-dec-osf*) AC_DEFINE(DEC) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-netbsd* | *-knetbsd*-gnu) AC_DEFINE(NETBSD) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; *-openbsd*) AC_DEFINE(OPENBSD) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; - *-sgi-irix5*) - AC_DEFINE(IRIX) - if test -z "$GCC"; then - sgi_cc=yes - fi - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" + *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) + AC_DEFINE(FREEBSD) + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; - *-sgi-irix6*) + *-bsdi*) + AC_DEFINE(BSDI) + LUAFLAVOR=bsd + ;; + *-sgi-irix5* | *-sgi-irix6*) AC_DEFINE(IRIX) - if test -z "$GCC"; then - sgi_cc=yes - fi - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-hpux*) AC_DEFINE(HPUX) # To link with libnet and NM (/usr/lib/libnm.sl) library # on HP-UX 11.11 (other versions?) Mikhail Zakharov (zmey20000@yahoo.com) AC_CHECK_LIB(nm, open_mib) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; - *-solaris2.0*) + *-solaris2.0* | *-solaris2.1* | *-solaris2.2* | *-solaris2.3* | *-solaris2.4* | *-solaris2.5.1 ) AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.[[1-9]][[0-9]]*) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.1*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.2*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.3*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.4*) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - ;; - *-solaris2.5.1) - AC_DEFINE(STUPID_SOLARIS_CHECKSUM_BUG) - AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-solaris*) AC_DEFINE(SOLARIS) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-sunos4*) AC_DEFINE(SUNOS) AC_DEFINE(SPRINTF_RETURNS_STRING) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" ;; *-linux*) - linux=yes AC_DEFINE(LINUX) - AC_DEFINE(PCAP_TIMEOUT_IGNORED) # libpcap doesn't even LOOK at - # the timeout you give it under Linux - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support - ;; - *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) - AC_DEFINE(FREEBSD) - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" - LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support - ;; - *-bsdi*) - AC_DEFINE(BSDI) - LUAFLAVOR=bsd - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_POSIX -DLUA_USE_DLOPEN\"" + AC_DEFINE(PCAP_TIMEOUT_IGNORED) # libpcap doesn't even LOOK at the timeout you give it under Linux + LDFLAGS="-Wl,-E $LDFLAGS" # needed for nse-C-module support ;; *-apple-darwin*) - macosx=yes AC_DEFINE(MACOSX) + dnl on Mac OSX the math library seems to contain unwanted getopt cruft + AC_CHECK_LIB(m, main) + LUAFLAGS="MYCFLAGS=\"-DLUA_USE_MACOSX\"" needs_cpp_precomp=yes - LUAFLAGS="MYCFLAGS=\"-DLUA_USE_MACOSX\"" ;; *) - LUAFLAGS=MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" + LUAFLAGS=MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" esac AC_SUBST(LUAFLAGS) -AC_SEARCH_LIBS(dlopen, dl) - -dnl equiv to '#define inline' to 'inline', '__inline__', '__inline' or '' -AC_C_INLINE -if test -n "$sgi_cc"; then - AC_DEFINE(inline, ) -fi dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(string.h getopt.h strings.h memory.h sys/param.h sys/sockio.h bstring.h sys/time.h sys/stat.h fcntl.h termios.h pwd.h unistd.h ) -AC_CHECK_HEADERS(netinet/in.h) -AC_CHECK_HEADERS(sys/socket.h) -AC_CHECK_HEADERS([net/if.h],[],[], -[#if HAVE_SYS_TYPES_H -# include -# endif -#if HAVE_NETINET_IN_H -# include -# endif -#if HAVE_SYS_SOCKET_H -# include -# endif -]) -AC_CHECK_HEADERS([netinet/if_ether.h],[],[], -[#if HAVE_SYS_TYPES_H -# include -# endif -#if HAVE_NETINET_IN_H -# include -# endif -# if HAVE_SYS_SOCKET_H -# include -# endif -# if HAVE_NET_IF_H -# include -# endif -]) -AC_HEADER_TIME - -dnl Checks for libraries. -dnl AC_CHECK_LIB(m, pow) -dnl on Mac OSX the math library seems to contain unwanted getopt cruft -if test $macosx = no; then - AC_CHECK_LIB(m, main) -fi +AC_CHECK_HEADERS(pwd.h termios.h) dnl If any socket libraries needed -AC_SEARCH_LIBS(gethostent, nsl) AC_SEARCH_LIBS(setsockopt, socket) -dnl need posix4/nanosleep for solaris 2.4 -AC_SEARCH_LIBS(nanosleep, posix4) - # By default, try to build nmapfe if possible test "${with_nmapfe+set}" != "set" && with_nmapfe=yes @@ -348,18 +224,6 @@ if test "$use_openssl" = "yes" -a -z "$specialssldir"; then [ use_openssl="no" AC_MSG_WARN([Failed to find openssl/ssl.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ]) - if test "$use_openssl" = "yes"; then - AC_CHECK_HEADER(openssl/err.h,, - [ use_openssl="no" - AC_MSG_WARN([Failed to find openssl/err.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ]) - fi - - if test "$use_openssl" = "yes"; then - AC_CHECK_HEADER(openssl/rand.h,, - [ use_openssl="no" - AC_MSG_WARN([Failed to find openssl/rand.h so OpenSSL will not be used. If it is installed you can try the --with-openssl=DIR argument]) ]) - fi - # use_openssl="yes" given explicitly in next 2 rules to avoid adding lib to $LIBS if test "$use_openssl" = "yes"; then AC_CHECK_LIB(crypto, BIO_int_ctrl, @@ -421,10 +285,6 @@ AC_HELP_STRING([--with-libpcap=included], [Always use version included with Nmap esac] ) -#if test $linux = yes; then -# have_libpcap=no -#fi - if test $needs_cpp_precomp = yes; then CXXFLAGS="-no-cpp-precomp $CXXFLAGS" fi @@ -457,12 +317,10 @@ int main() { exit(0); }], [AC_MSG_RESULT(yes); have_libpcap=yes], -[AC_MSG_RESULT(no); have_libpcap=no], [AC_MSG_RESULT(no); have_libpcap=no]) LIBS="$LIBS_OLD" fi - LIBPCAP_LIBS="-lpcap" if test $have_libpcap = yes; then PCAP_DEPENDS="" @@ -651,11 +509,14 @@ else # if we didn't find we use our own if test $have_lua != yes; then + AC_MSG_RESULT(no) CXXFLAGS="-I$LIBLUADIR $CXXFLAGS" LIBLUA_LIBS="$LIBLUADIR/liblua.a" LUA_DEPENDS="$LIBLUADIR/liblua.a" LUA_CLEAN="lua_clean" LUA_DIST_CLEAN="lua_dist_clean" + else + AC_MSG_RESULT(yes) fi INSTALLNSE="install-nse" @@ -675,52 +536,6 @@ AC_SUBST(LUA_DIST_CLEAN) AC_SUBST(INSTALLNSE) AC_SUBST(NSELIB_CLEAN) AC_SUBST(NSELIB_DIST_CLEAN) - -dnl AC_HEADER_TIME - -AC_MSG_CHECKING([struct ip]) -AC_TRY_COMPILE([#include -#include -#include -#include ], - [struct ip ip;], - [AC_MSG_RESULT(yes); bsd_networking=yes], - [AC_MSG_RESULT(no); bsd_networking=no]); -if test $bsd_networking = yes; then - - AC_DEFINE(BSD_NETWORKING) - AC_MSG_CHECKING([ip_v in struct ip]) - AC_TRY_COMPILE([#include -#include -#include -#include ], - [struct ip ip; ip.ip_v;], - [AC_MSG_RESULT(yes); has_bitfields=yes], - [AC_MSG_RESULT(no); has_bitfields=no]) - - if test $has_bitfields = no; then - SAVE_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-D__STDC__=2" - - AC_MSG_CHECKING([if setting __STDC__=2 gives ip_v]) - AC_TRY_COMPILE([#include -#include -#include -#include ], - [struct ip ip; ip.ip_v;], - [AC_MSG_RESULT(yes); setting_stdc_helps=yes], - [AC_MSG_RESULT(no); setting_stdc_helps=no]) - - CXXFLAGS="$SAVE_CXXFLAGS" - if test $setting_stdc_helps = yes; then - CXXFLAGS="$CXXFLAGS -D__STDC__=2" - else - AC_MSG_RESULT(Can't figure out how to get bitfields - configure failed) - exit 1 - fi - fi -fi - AC_SUBST(CXXFLAGS) dnl This test is from the configure.in of Unix Network Programming second @@ -730,8 +545,8 @@ dnl Check if sockaddr{} has sa_len member. dnl AC_CACHE_CHECK(if sockaddr{} has sa_len member, ac_cv_sockaddr_has_sa_len, AC_TRY_COMPILE([ -# include -# include ], + #include + #include ], [unsigned int i = sizeof(((struct sockaddr *)0)->sa_len)], ac_cv_sockaddr_has_sa_len=yes, ac_cv_sockaddr_has_sa_len=no)) @@ -739,15 +554,15 @@ if test $ac_cv_sockaddr_has_sa_len = yes ; then AC_DEFINE(HAVE_SOCKADDR_SA_LEN) fi -dnl check endedness +#dnl check endedness AC_C_BIGENDIAN AC_MSG_CHECKING([if struct in_addr is a wacky huge structure (some Sun boxes)]) AC_TRY_COMPILE([#include ], struct in_addr i; i._S_un._S_addr;, \ - AC_DEFINE(IN_ADDR_DEEPSTRUCT) \ - AC_MSG_RESULT(yes) , \ - AC_TRY_COMPILE([#include + AC_DEFINE(IN_ADDR_DEEPSTRUCT) \ + AC_MSG_RESULT(yes) , \ + AC_TRY_COMPILE([#include #include ], struct in_addr i; i.S_un.S_addr;, \ AC_DEFINE(IN_ADDR_DEEPSTRUCT) \ AC_MSG_RESULT(yes) , \ @@ -755,15 +570,15 @@ AC_TRY_COMPILE([#include ], struct in_addr i; i._S_un._S_addr;, \ AC_CACHE_CHECK(if struct icmp exists, ac_cv_struct_icmp_exists, AC_TRY_COMPILE([ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include -# include ], + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include + #include ], [unsigned int i = sizeof(struct icmp)], ac_cv_struct_icmp_exists=yes, ac_cv_struct_icmp_exists=no)) @@ -773,14 +588,14 @@ fi AC_CACHE_CHECK(if struct ip exists, ac_cv_struct_ip_exists, AC_TRY_COMPILE([ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include ], + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include ], [unsigned int i = sizeof(struct ip)], ac_cv_struct_ip_exists=yes, ac_cv_struct_ip_exists=no)) @@ -790,15 +605,15 @@ fi AC_CACHE_CHECK(if struct ip has ip_sum member, ac_cv_ip_has_ip_sum, AC_TRY_COMPILE([ -# include -# include -# include -# include -# define __USE_BSD -# define __FAVOR_BSD -# define _BSD_SOURCE -# include -# include ], + #include + #include + #include + #include + #define __USE_BSD + #define __FAVOR_BSD + #define _BSD_SOURCE + #include + #include ], [unsigned int i = sizeof(((struct ip *)0)->ip_sum)], ac_cv_ip_has_ip_sum=yes, ac_cv_ip_has_ip_sum=no)) @@ -806,49 +621,10 @@ if test $ac_cv_ip_has_ip_sum = yes ; then AC_DEFINE(HAVE_IP_IP_SUM) fi - dnl Checks for library functions. -dnl AC_TYPE_SIGNAL -AC_CHECK_FUNCS(bzero memcpy nanosleep strerror strcasestr getopt_long_only) - -AC_LANG_PUSH(C++) -AC_MSG_CHECKING([for usleep]) -AC_TRY_LINK([#include ],[usleep (200);],[ - AC_MSG_RESULT(yes)],[ - AC_MSG_RESULT(no) - AC_MSG_CHECKING([if usleep needs custom prototype]) - AC_TRY_LINK([ -#include - -extern "C" int usleep (unsigned int);],[ -usleep (200);],[ - AC_MSG_RESULT(yes) - AC_DEFINE(NEED_USLEEP_PROTO)], - AC_MSG_RESULT(not found))]) -AC_LANG_POP(C++) - -AC_LANG_PUSH(C++) -AC_TRY_LINK([#include -#include ],[ -char buffer[200]; -gethostname (buffer, 200);], ,[ - AC_MSG_CHECKING([if gethostname needs custom prototype]) - AC_TRY_LINK([ -#include -#include - -extern "C" int gethostname (char *, unsigned int);],[ -char buffer[200]; -gethostname (buffer, 200);],[ - AC_MSG_RESULT(yes) - AC_DEFINE(NEED_GETHOSTNAME_PROTO)], - AC_MSG_RESULT(not found))]) -AC_LANG_POP(C++) - +AC_CHECK_FUNCS(strerror) RECVFROM_ARG6_TYPE -dnl AC_CHECK_FUNCS(gethostname gettimeofday select socket strdup strstr ) - AC_ARG_WITH(libnbase, AC_HELP_STRING([--with-libnbase=DIR], [Look for nbase include/libs in DIR]), [ case "$with_libnbase" in @@ -938,15 +714,6 @@ fi dnl all hell broke loose when the variable was named $subdirs AC_CONFIG_SUBDIRS( $nmap_cfg_subdirs ) - -dnl Configure libpcap if we need to since a lot of lamers don't -dnl already have it installed ... -dnl if test $have_libpcap = nsadf ; then -dnl echo "Have libpcap is set to $have_libpcap "; -dnl asdfasdf sdsdf sfd sdfsd -dnl AC_CONFIG_SUBDIRS( $libpcapdir ) -dnl fi - AC_OUTPUT(Makefile) # Krad ASCII ART#!#@$!@#$ if test -f docs/leet-nmap-ascii-art.txt; then