X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b485483022cddbb9d21845e9c3b465f6cd882676..refs/pull/377/head:/configure diff --git a/configure b/configure index 114edcd6..559c8731 100755 --- a/configure +++ b/configure @@ -3779,6 +3779,7 @@ $as_echo "$ac_cv___attribute___format_function_pointer" >&6; } fi fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4319,38 +4320,6 @@ fi esac fi ;; - -linux*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel version" >&5 -$as_echo_n "checking Linux kernel version... " >&6; } - if test "$cross_compiling" = yes; then - if ${ac_cv_linux_vers+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_linux_vers=unknown -fi - - else - if ${ac_cv_linux_vers+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_linux_vers=`uname -r 2>&1 | \ - sed -n -e '$s/.* //' -e '$s/\..*//p'` -fi - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_linux_vers" >&5 -$as_echo "$ac_cv_linux_vers" >&6; } - if test $ac_cv_linux_vers = unknown ; then - as_fn_error $? "cannot determine linux version when cross-compiling" "$LINENO" 5 - fi - if test $ac_cv_linux_vers -lt 2 ; then - as_fn_error $? "version 2 or higher required; see the INSTALL doc for more info" "$LINENO" 5 - fi - ;; - -*) - ;; esac @@ -5463,6 +5432,19 @@ esac fi +ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = xyes; then : + $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" getopt_long.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" + ;; +esac + +fi + for ac_func in fork vfork strftime do : @@ -6797,6 +6779,7 @@ fi # # Make sure we have definitions for all the C99 specified-width types # (regardless of whether the environment is a C99 environment or not). +# ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( @@ -6897,73 +6880,54 @@ _ACEOF # -# For now, we're using the old BSD-style u_intXX_t types, so check for -# them. -# -# We should probably migrate to the standard C uintXX_t types. +# Define the old BSD specified-width types in terms of the C99 types; +# we may need them with libpcap include files. # -for ac_header in sys/bitypes.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_bitypes_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_BITYPES_H 1 -_ACEOF - -fi - -done - - ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int8_t" = xyes; then : else -$as_echo "#define u_int8_t unsigned char" >>confdefs.h +$as_echo "#define u_int8_t uint8_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int16_t" = xyes; then : else -$as_echo "#define u_int16_t unsigned short" >>confdefs.h +$as_echo "#define u_int16_t uint16_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int32_t" = xyes; then : else -$as_echo "#define u_int32_t unsigned int" >>confdefs.h +$as_echo "#define u_int32_t uint32_t" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default -#ifdef HAVE_SYS_BITYPES_H -#include -#endif +#include + " if test "x$ac_cv_type_u_int64_t" = xyes; then : else -$as_echo "#define u_int64_t unsigned long long" >>confdefs.h +$as_echo "#define u_int64_t uint64_t" >>confdefs.h fi @@ -6992,16 +6956,13 @@ $as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6; #include #include #include - #ifdef HAVE_SYS_BITYPES_H - #include - #endif main() { - printf("%" PRId64 "\n", (u_int64_t)1); - printf("%" PRIo64 "\n", (u_int64_t)1); - printf("%" PRIx64 "\n", (u_int64_t)1); - printf("%" PRIu64 "\n", (u_int64_t)1); + printf("%" PRId64 "\n", (uint64_t)1); + printf("%" PRIo64 "\n", (uint64_t)1); + printf("%" PRIx64 "\n", (uint64_t)1); + printf("%" PRIu64 "\n", (uint64_t)1); } @@ -7049,16 +7010,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016lx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7106,16 +7064,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016llx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7163,16 +7118,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016Lx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0) @@ -7220,16 +7172,13 @@ else # ifdef HAVE_INTTYPES_H #include -# endif -# ifdef HAVE_SYS_BITYPES_H - #include # endif #include #include main() { - u_int64_t t = 1; + uint64_t t = 1; char strbuf[16+1]; sprintf(strbuf, "%016qx", t << 32); if (strcmp(strbuf, "0000000100000000") == 0)