diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 01:20:23 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-29 01:20:23 +0200 |
| commit | ee34164a6c1c4f905332cfcfef938a0ccb48333b (patch) | |
| tree | e3f889dbcd3bc8bacd2aa5ed2e236a13af69a3f3 /configure.ac | |
| parent | 4c7efd97af6ca1028279d40ebe674dc88bdaafc4 (diff) | |
Add basic pcap import/export support
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
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], |
