]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
configure.ac: fix static build with pcap 4299/head
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 11 Oct 2019 08:55:51 +0000 (10:55 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 12 Oct 2019 09:27:49 +0000 (11:27 +0200)
pcap can depends on nl-3 so use pkg-config to find these dependencies
otherwise all AC_CHECK_LIB calls will fail when building statically

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
configure.ac

index dd61cc8558aa69a2158f8bcd05d685ad08795aa5..57b0053eaf9303deee2c3f2b8d8d4d7c3bc03335 100644 (file)
     AC_CHECK_HEADERS([pcap.h pcap/pcap.h pcap/bpf.h])
 
     LIBPCAP=""
+    PKG_CHECK_MODULES([PCAP],libpcap,[CPPFLAGS="${CPPFLAGS} ${PCAP_CFLAGS}" LIBS="${LIBS} ${PCAP_LIBS}"],[:])
     AC_CHECK_LIB(${PCAP_LIB_NAME}, pcap_open_live,, LIBPCAP="no")
     if test "$LIBPCAP" = "no"; then
         echo