From: Arran Cudbard-Bell Date: Mon, 11 Jun 2018 13:15:03 +0000 (-0400) Subject: Fix libpcap detection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f64b5bcbc00a4fabdc9d8081b408da45fa37bcb;p=thirdparty%2Ffreeradius-server.git Fix libpcap detection --- diff --git a/configure b/configure index d5b3a7d73ff..084adf818ac 100755 --- a/configure +++ b/configure @@ -8157,10 +8157,6 @@ if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=." >&5 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=." >&2;} else - -$as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h - - for ac_func in \ pcap_fopen_offline \ pcap_dump_fopen \ @@ -10725,7 +10721,7 @@ smart_prefix= if test "x$ac_cv_header_pcap_h" = "xyes"; then -$as_echo "#define HAVE_PCAP_H 1" >>confdefs.h +$as_echo "#define HAVE_LIBPCAP 1" >>confdefs.h diff --git a/configure.ac b/configure.ac index bda3ba24e8b..d7fcfd080fc 100644 --- a/configure.ac +++ b/configure.ac @@ -893,10 +893,6 @@ FR_SMART_CHECK_LIB(pcap, pcap_open_live) if test "x$ac_cv_lib_pcap_pcap_open_live" != "xyes"; then AC_MSG_WARN([pcap library not found, silently disabling the RADIUS sniffer, and ARP listener. Use --with-pcap-lib-dir=.]) else - AC_DEFINE(HAVE_LIBPCAP, 1, - [Define to 1 if you have the `pcap' library (-lpcap).] - ) - AC_CHECK_FUNCS(\ pcap_fopen_offline \ pcap_dump_fopen \ @@ -1180,7 +1176,7 @@ else smart_try_dir="$pcap_include_dir" FR_SMART_CHECK_INCLUDE([pcap.h]) if test "x$ac_cv_header_pcap_h" = "xyes"; then - AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the header file.]) + AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the `pcap' library (-lpcap) and header file .]) AC_SUBST(PCAP_LIBS) AC_SUBST(PCAP_LDFLAGS) else diff --git a/src/include/autoconf.h.in b/src/include/autoconf.h.in index 5094776c4db..37cd8dd5497 100644 --- a/src/include/autoconf.h.in +++ b/src/include/autoconf.h.in @@ -215,7 +215,8 @@ /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL -/* Define to 1 if you have the `pcap' library (-lpcap). */ +/* Define to 1 if you have the `pcap' library (-lpcap) and header file + . */ #undef HAVE_LIBPCAP /* Define if you have a readline compatible library */ @@ -311,9 +312,6 @@ /* Define to 1 if you have the `pcap_fopen_offline' function. */ #undef HAVE_PCAP_FOPEN_OFFLINE -/* Define to 1 if you have the header file. */ -#undef HAVE_PCAP_H - /* define this if we have libpcre */ #undef HAVE_PCRE