]> The Tcpdump Group git mirrors - tcpdump/blobdiff - configure
Introduce --time-stamp-precision
[tcpdump] / configure
index 1356816caf96433388b0e5b775914a07c892d5e2..559c873134ed970a31475d779a233dca7ddbbbd7 100755 (executable)
--- a/configure
+++ b/configure
@@ -633,6 +633,7 @@ V_DEFS
 V_CCOPT
 MKDEP
 DEPENDENCY_CFLAG
+AR
 RANLIB
 PCAP_CONFIG
 LIBOBJS
@@ -3778,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'
@@ -4318,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
 
 
@@ -4832,28 +4802,27 @@ $as_echo "no" >&6; }
        ipv6=no
        ;;
   esac
-else
-  if test "$cross_compiling" = yes; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  ipv6=no
-
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- /* AF_INET6 available check */
+
+      /* AF_INET6 available check */
 #include <sys/types.h>
 #include <sys/socket.h>
-main()
+#include <netinet/in.h>
+#ifdef AF_INET6
+void
+foo(struct in6_addr *addr)
 {
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-   exit(1);
- else
-   exit(0);
+ memset(addr, 0, sizeof (struct in6_addr));
 }
+#else
+#error "AF_INET6 not defined"
+#endif
+
 
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
   LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
@@ -4866,10 +4835,7 @@ else
 $as_echo "no" >&6; }
   ipv6=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 
@@ -5388,45 +5354,6 @@ if test "$ac_cv_namereqd" = no; then
        missing_includes=yes
 fi
 
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
-$as_echo_n "checking for sockaddr_storage... " >&6; }
-       if ${ac_cv_sa_storage+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#              include <sys/types.h>
-#              include <sys/socket.h>
-int
-main ()
-{
-struct sockaddr_storage s
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sa_storage=yes
-else
-  ac_cv_sa_storage=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sa_storage" >&5
-$as_echo "$ac_cv_sa_storage" >&6; }
-       if test $ac_cv_sa_storage = yes; then
-
-$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
-
-       fi
-
-if test "$ac_cv_sa_storage" = no; then
-       missing_includes=yes
-fi
-
 ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf"
 if test "x$ac_cv_func_vfprintf" = xyes; then :
   $as_echo "#define HAVE_VFPRINTF 1" >>confdefs.h
@@ -5505,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 :
@@ -6839,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) ;; #(
@@ -6939,73 +6880,54 @@ _ACEOF
 
 
 #
-# For now, we're using the old BSD-style u_intXX_t types, so check for
-# them.
+# Define the old BSD specified-width types in terms of the C99 types;
+# we may need them with libpcap include files.
 #
-# We should probably migrate to the standard C uintXX_t types.
-#
-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 <sys/bitypes.h>
-#endif
+#include <sys/types.h>
+
 "
 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 <sys/bitypes.h>
-#endif
+#include <sys/types.h>
+
 "
 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 <sys/bitypes.h>
-#endif
+#include <sys/types.h>
+
 "
 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 <sys/bitypes.h>
-#endif
+#include <sys/types.h>
+
 "
 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
 
@@ -7034,16 +6956,13 @@ $as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6;
            #include <inttypes.h>
            #include <stdio.h>
            #include <sys/types.h>
-           #ifdef HAVE_SYS_BITYPES_H
-           #include <sys/bitypes.h>
-           #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);
            }
 
 
@@ -7091,16 +7010,13 @@ else
 
 #          ifdef HAVE_INTTYPES_H
            #include <inttypes.h>
-#          endif
-#          ifdef HAVE_SYS_BITYPES_H
-            #include <sys/bitypes.h>
 #          endif
            #include <stdio.h>
            #include <sys/types.h>
 
            main()
            {
-             u_int64_t t = 1;
+             uint64_t t = 1;
              char strbuf[16+1];
              sprintf(strbuf, "%016lx", t << 32);
              if (strcmp(strbuf, "0000000100000000") == 0)
@@ -7148,16 +7064,13 @@ else
 
 #          ifdef HAVE_INTTYPES_H
            #include <inttypes.h>
-#          endif
-#          ifdef HAVE_SYS_BITYPES_H
-            #include <sys/bitypes.h>
 #          endif
            #include <stdio.h>
            #include <sys/types.h>
 
            main()
            {
-             u_int64_t t = 1;
+             uint64_t t = 1;
              char strbuf[16+1];
              sprintf(strbuf, "%016llx", t << 32);
              if (strcmp(strbuf, "0000000100000000") == 0)
@@ -7205,16 +7118,13 @@ else
 
 #          ifdef HAVE_INTTYPES_H
            #include <inttypes.h>
-#          endif
-#          ifdef HAVE_SYS_BITYPES_H
-            #include <sys/bitypes.h>
 #          endif
            #include <stdio.h>
            #include <sys/types.h>
 
            main()
            {
-             u_int64_t t = 1;
+             uint64_t t = 1;
              char strbuf[16+1];
              sprintf(strbuf, "%016Lx", t << 32);
              if (strcmp(strbuf, "0000000100000000") == 0)
@@ -7262,16 +7172,13 @@ else
 
 #          ifdef HAVE_INTTYPES_H
            #include <inttypes.h>
-#          endif
-#          ifdef HAVE_SYS_BITYPES_H
-            #include <sys/bitypes.h>
 #          endif
            #include <stdio.h>
            #include <sys/types.h>
 
            main()
            {
-             u_int64_t t = 1;
+             uint64_t t = 1;
              char strbuf[16+1];
              sprintf(strbuf, "%016qx", t << 32);
              if (strcmp(strbuf, "0000000100000000") == 0)
@@ -7350,7 +7257,7 @@ savedcppflags="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $V_INCLS"
 for ac_header in pcap/bluetooth.h
 do :
-  ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include <tcpdump-stdinc.h>
+  ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"tcpdump-stdinc.h\"
 "
 if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
@@ -7361,9 +7268,22 @@ fi
 
 done
 
+for ac_header in pcap/nflog.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"tcpdump-stdinc.h\"
+"
+if test "x$ac_cv_header_pcap_nflog_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_NFLOG_H 1
+_ACEOF
+
+fi
+
+done
+
 for ac_header in pcap/usb.h
 do :
-  ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include <tcpdump-stdinc.h>
+  ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"tcpdump-stdinc.h\"
 "
 if test "x$ac_cv_header_pcap_usb_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
@@ -7468,6 +7388,98 @@ else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; 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_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
+    $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
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; 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_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_ac_ct_AR="ar"
+    $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
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AR" = x; then
+    AR=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
+fi
+
 
 rm -f os-proto.h
     if test "${LBL_CFLAGS+set}" = set; then