diff options
author | Michael Richardson <mcr@sandelman.ca> | 2020-08-21 15:32:30 -0400 |
---|---|---|
committer | Michael Richardson <mcr@sandelman.ca> | 2020-12-19 14:01:02 -0500 |
commit | 2e7e32fd956df5b4c4a73431896dd4668a63e94a (patch) | |
tree | 0a37b1615805a9521428351d1e0d2480cdc366c4 | |
parent | 4a1344ffb7f4eba4570914156716c1ad0c26d184 (diff) | |
download | libpcap-raybellis-gzip-v2.tar.gz |
allow for ioplugin to default to off, enabling with --enable-iopluginraybellis-gzip-v2
-rwxr-xr-x | configure | 43 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rw-r--r-- | pcap-ioplugin.c | 2 |
3 files changed, 49 insertions, 7 deletions
@@ -719,6 +719,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -747,6 +748,7 @@ enable_protochain with_pcap with_libnl enable_ipv6 +enable_ioplugin with_dag with_dag_includes with_dag_libraries @@ -819,6 +821,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1071,6 +1074,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1208,7 +1220,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1361,6 +1373,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1398,6 +1411,8 @@ Optional Features: --disable-largefile omit support for large files --disable-protochain disable \"protochain\" insn --enable-ipv6 build IPv6-capable version [default=yes] + --enable-ioplugin build support for loading I/O plugins that can do + compression, etc. [default=no] --enable-remote enable remote packet capture [default=no] --disable-remote disable remote packet capture --enable-optimizer-dbg build optimizer debugging code @@ -4528,7 +4543,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4574,7 +4589,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4598,7 +4613,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4643,7 +4658,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4667,7 +4682,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -7295,6 +7310,22 @@ $as_echo "#define INET6 1" >>confdefs.h fi +# Check whether --enable-ioplugin was given. +if test "${enable_ioplugin+set}" = set; then : + enableval=$enable_ioplugin; +else + enable_ioplugin=no +fi + +if test "$enable_ioplugin" != "yes"; then + # + # Turn on pluggable I/O modules + # + +$as_echo "#define HAVE_IOPLUGIN 1" >>confdefs.h + +fi + # Check for Endace DAG card support. # Check whether --with-dag was given. diff --git a/configure.ac b/configure.ac index 2f1973c9..2e380ef6 100644 --- a/configure.ac +++ b/configure.ac @@ -1135,6 +1135,17 @@ if test "$enable_ipv6" != "no"; then AC_DEFINE(INET6,1,[IPv6]) fi +AC_ARG_ENABLE(ioplugin, +AC_HELP_STRING([--enable-ioplugin],[build support for loading I/O plugins that can do compression, etc. @<:@default=no@:>@]), + [], + [enable_ioplugin=no]) +if test "$enable_ioplugin" != "yes"; then + # + # Turn on pluggable I/O modules + # + AC_DEFINE(HAVE_IOPLUGIN,1,[ioplugin]) +fi + # Check for Endace DAG card support. AC_ARG_WITH([dag], AC_HELP_STRING([--with-dag@<:@=DIR@:>@],[include Endace DAG support (located in directory DIR, if supplied). @<:@default=yes, if present@:>@]), diff --git a/pcap-ioplugin.c b/pcap-ioplugin.c index d8e5c83e..c9ccd13d 100644 --- a/pcap-ioplugin.c +++ b/pcap-ioplugin.c @@ -161,7 +161,7 @@ pcap_ioplugin_init(const char *name) goto fail; } -#if HAVE_DLOPEN +#if HAVE_DLOPEN && WANT_IOPLUGIN lib = dlopen(name, RTLD_NOW); if (lib != NULL) { pcap_ioplugin_init_fn ioplugin_init = dlsym(lib, "ioplugin_init"); |