Merge pull request #393 from mfournier/prevent-building-with-old-libpcap
authorMarc Fournier <marc.fournier@camptocamp.com>
Mon, 14 Oct 2013 13:47:05 +0000 (06:47 -0700)
committerMarc Fournier <marc.fournier@camptocamp.com>
Mon, 14 Oct 2013 13:47:05 +0000 (06:47 -0700)
Prevent building with old libpcap

1  2 
configure.in

diff --combined 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")
  # }}}
  
@@@ -5259,7 -5278,7 +5278,7 @@@ Configuration
      libvirt . . . . . . . $enable_libvirt
      load  . . . . . . . . $enable_load
      logfile . . . . . . . $enable_logfile
 -    lpar... . . . . . . . $enable_lpar
 +    lpar  . . . . . . . . $enable_lpar
      madwifi . . . . . . . $enable_madwifi
      match_empty_counter . $enable_match_empty_counter
      match_hashed  . . . . $enable_match_hashed