--- configure.in.orig Wed Nov 15 03:43:56 2006 +++ configure.in Thu Jun 16 16:09:24 2011 @@ -111,47 +111,12 @@ else fi -dnl -dnl Configure the regular expression library. -dnl +AC_CHECK_LIB(pcre, pcre_compile,,echo need pcre lib; exit) +REGEX_OBJS='' +USE_PCRE="1" -AC_ARG_ENABLE(pcre, -[ --enable-pcre use PCRE instead of GNU regex], -[ - use_pcre="$enableval" -], -[ - use_pcre="no" -]) - -if test $use_pcre = yes; then - - echo - echo 'Configuring Perl-Compatible Regular Expression (PCRE) library ...' - echo - - REGEX_DIR='pcre-5.0' - REGEX_OBJS="$REGEX_DIR/pcre.o $REGEX_DIR/study.o" - USE_PCRE="1" - -else - - echo - echo 'Configuring GNU Regular Expression library ...' - echo - - REGEX_DIR='regex-0.12' - REGEX_OBJS="$REGEX_DIR/regex.o" - USE_PCRE="0" - -fi - -( cd $REGEX_DIR && ./configure ) - -AC_SUBST(REGEX_DIR) AC_SUBST(REGEX_OBJS) - echo echo 'Configuring Network Grep (ngrep) ...' echo @@ -194,18 +159,6 @@ unsigned short bar = foo.source; *bsd*) AC_SUBST(OS, BSD) - if test "$USE_PCAP_RESTART" = "0"; then - - AC_MSG_WARN( -Your OS ($target_os) may have an old libpcap installation. -If the resulting ngrep binary segfaults when a BPF filter is specified -without an ngrep match string then you should reconfigure ngrep with -the option ``--disable-pcap-restart''. -) - sleep 3 - - fi - ;; *solaris*) @@ -381,6 +334,18 @@ yes [HAVE_DLT_RAW="1" && echo yes], [HAVE_DLT_RAW="0" && echo no]) +present="" +AC_MSG_CHECKING(for DLT_PFLOG in bpf.h) +AC_EGREP_CPP(yes, +[ +#include <$BPF> +#ifdef DLT_PFLOG +yes +#endif +], +[HAVE_DLT_PFLOG="1" && echo yes], [HAVE_DLT_PFLOG="0" && echo no]) + + dnl dnl Now that we're past the OS-specific stuff, which could have dnl modified our USE_* and other defines, define them all now. @@ -397,6 +362,7 @@ AC_DEFINE_UNQUOTED(DROPPRIVS_USER, "$DROPPRI AC_DEFINE_UNQUOTED(HAVE_DUMB_UDPHDR, $HAVE_DUMB_UDPHDR, [whether to accommodate broken redhat-glibc udphdr declaration (default no)]) AC_DEFINE_UNQUOTED(HAVE_DLT_RAW, $HAVE_DLT_RAW, [presence of DLT_RAW in bpf.h]) +AC_DEFINE_UNQUOTED(HAVE_DLT_PFLOG, $HAVE_DLT_PFLOG, [presence of DLT_PFLOG in bpf.h]) AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11, $HAVE_DLT_IEEE802_11, [presence of DLT_IEEE802_11 in bpf.h]) AC_DEFINE_UNQUOTED(HAVE_DLT_IEEE802_11_RADIO, $HAVE_DLT_IEEE802_11_RADIO, [presence of DLT_IEEE802_11_RADIO in bpf.h]) AC_DEFINE_UNQUOTED(HAVE_DLT_LOOP, $HAVE_DLT_LOOP, [presence of DLT_LOOP in bpf.h])