From ee34164a6c1c4f905332cfcfef938a0ccb48333b Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sat, 29 Jul 2017 01:20:23 +0200 Subject: Add basic pcap import/export support --- configure.ac | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index ff77415..5c227cc 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,23 @@ AM_CONDITIONAL([HAVE_SSL],[test "x$have_ssl" = "x1"]) AM_CONDITIONAL([HAVE_MBEDTLS],[test "x$ssl_mbedtls" = "x1"]) AM_CONDITIONAL([HAVE_OPENSSL],[test "x$ssl_openssl" = "x1"]) +# pcap +have_pcap=0 +AC_ARG_ENABLE([pcap], + [AC_HELP_STRING([--disable-pcap], [do not use libpcap even if found])], + [pcap_check=$enableval], [pcap_check=yes]) +AS_IF([test x$pcap_check = xyes], + [AC_PATH_TOOL([pcap_config], [pcap-config]) + AS_IF([test -n "$pcap_config"], + [PCAP_CFLAGS=`$pcap_config --cflags` + PCAP_LIBS=`$pcap_config --libs` + have_pcap=1]) + ]) +AC_SUBST([PCAP_CFLAGS]) +AC_SUBST([PCAP_LIBS]) +AC_DEFINE_UNQUOTED([HAVE_PCAP],[$have_pcap],[define to 1 if libpcap is linked]) +AM_CONDITIONAL([HAVE_PCAP],[test "x$have_pcap" = "x1"]) + # GTK have_gtk=0 AC_ARG_ENABLE([gtk], -- cgit v1.2.3-70-g09d2