diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-04-30 15:28:06 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-04-30 15:28:06 -0700 |
commit | 6b9e3a5a85a3a37253c36006f536f3db182d6293 (patch) | |
tree | b24bab70b4ce57aefece11fa89e00a66060b7226 /configure | |
parent | 5d6d557df4594450440f334fe92a5eddefb9931b (diff) | |
download | tcpdump-6b9e3a5a85a3a37253c36006f536f3db182d6293.tar.gz |
Use getopt_long().
This requires us to check for it in the configure script and to include
a version of getopt_long() for the benefit of platforms that don't have
it; we pick up the FreeBSD version and tweak it a bit (eliminating some
features specific to the BSD version of getopt_long(), as we want to use
it only in a fashion portable to Linux/*BSD/Solaris/etc.)
We also get rid of the version of getopt() we supply for Windows in
favor of the version of getopt_long() we provide.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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' @@ -5463,6 +5464,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 : |