]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix libpcap detection
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 11 Jun 2018 13:15:03 +0000 (09:15 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 11 Jun 2018 13:15:03 +0000 (09:15 -0400)
configure
configure.ac
src/include/autoconf.h.in

index d5b3a7d73ff9802b5ebd4b3049b80c037c19c340..084adf818ace780d683f7a3713dd95f64d079dbb 100755 (executable)
--- 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=<path>." >&5
 $as_echo "$as_me: WARNING: pcap library not found, silently disabling the RADIUS sniffer, and ARP listener.  Use --with-pcap-lib-dir=<path>." >&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
 
 
 
index bda3ba24e8b76054ead291361092ae52fbe86a3b..d7fcfd080fcaa6cb9670724b90e4d3823b5189df 100644 (file)
@@ -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=<path>.])
 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 <pcap.h> header file.])
+    AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the `pcap' library (-lpcap) and header file <pcap.h>.])
     AC_SUBST(PCAP_LIBS)
     AC_SUBST(PCAP_LDFLAGS)
   else
index 5094776c4db1abc8a4bbd389f93e0507a35391fd..37cd8dd54974a8607c2ea51a5b3bf984f8be1cb5 100644 (file)
 /* 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
+   <pcap.h>. */
 #undef HAVE_LIBPCAP
 
 /* Define if you have a readline compatible library */
 /* Define to 1 if you have the `pcap_fopen_offline' function. */
 #undef HAVE_PCAP_FOPEN_OFFLINE
 
-/* Define to 1 if you have the <pcap.h> header file. */
-#undef HAVE_PCAP_H
-
 /* define this if we have libpcre */
 #undef HAVE_PCRE