]> The Tcpdump Group git mirrors - tcpdump/blobdiff - aclocal.m4
Make sure we can link with libpcap.
[tcpdump] / aclocal.m4
index 40b586648d5fdf93da251a56b1ec67775293b54d..1c3affab8ee74e0fbd25f5190e34bb810487be99 100644 (file)
@@ -417,6 +417,21 @@ AC_DEFUN(AC_LBL_LIBPCAP,
        esac
     fi
 
+    dnl
+    dnl Check for "pcap_loop()", to make sure we found a working
+    dnl libpcap and have all the right other libraries with which
+    dnl to link.  (Otherwise, the checks below will fail, not
+    dnl because the routines are missing from the library, but
+    dnl because we aren't linking properly with libpcap, and
+    dnl that will cause confusing errors at build time.)
+    dnl
+    AC_CHECK_FUNC(pcap_loop,,
+       [
+           AC_MSG_ERROR(
+[Report this to [email protected], and include the
+config.log file in your report])
+       ])
+
     dnl
     dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
     dnl and "pcap_datalink_name_to_val()", and use substitute versions