summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b9ee16)
raw | patch | inline | side by side (parent: 2b9ee16)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 9 Aug 2013 12:53:24 +0000 (14:53 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 9 Aug 2013 12:53:24 +0000 (14:53 +0200) |
This should prevent DNS plugin from being built on systems with libpcap
older than 1.0.0.
GitHub issue #373
older than 1.0.0.
GitHub issue #373
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index a62d608bf21fe35ac40df7662f6c64ea67a24264..6b4372031a351ac07cd602b21fe5c3c6befd91be 100644 (file)
--- a/configure.in
+++ b/configure.in
AC_CHECK_HEADERS(pcap-bpf.h,,
[with_libpcap="no (pcap-bpf.h not found)"])
fi
+if test "x$with_libpcap" = "xyes"
+then
+ AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP],
+ [c_cv_libpcap_have_pcap_error_iface_not_up],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <pcap.h>
+]]],
+[[[
+ int val = PCAP_ERROR_IFACE_NOT_UP;
+]]]
+ )],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
+ [c_cv_libpcap_have_pcap_error_iface_not_up="no"]))
+fi
+if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes"
+then
+ with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)"
+fi
AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
# }}}