]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Disable pcap-config use during cross compilation
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 29 Jun 2015 14:04:14 +0000 (16:04 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 6 Jul 2015 09:32:47 +0000 (11:32 +0200)
This allows cross compilation where the host system has pcap-config
installed and would create an invalid entry in the cross-CFLAGS.

configure.ac

index 93720520981aa8504161fd21ff8bf3377c34b655..fb3c363a3cce11abc0b9c540ff7615202bd1be26 100644 (file)
     AC_CHECK_LIB(pcap, pcap_activate,, LPCAPVTEST="no")
     if test "$LPCAPVTEST" != "no"; then
         AC_PATH_PROG(HAVE_PCAP_CONFIG, pcap-config, "no")
-        if test "$HAVE_PCAP_CONFIG" = "no"; then
+        if test "$HAVE_PCAP_CONFIG" = "no" -o "$cross_compiling" = "yes"; then
             CFLAGS="${CFLAGS} -DLIBPCAP_VERSION_MAJOR=1"
         else
             CFLAGS="${CFLAGS} `pcap-config --defines` `pcap-config --cflags` -DLIBPCAP_VERSION_MAJOR=1"