diff --git a/configure b/configure index 4bdaaa42ec..2999c67e60 100755 --- a/configure +++ b/configure @@ -718,6 +718,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -746,6 +747,7 @@ enable_protochain with_pcap with_libnl enable_ipv6 +enable_ioplugin with_dag with_dag_includes with_dag_libraries @@ -816,6 +818,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}' @@ -1068,6 +1071,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=* \ @@ -1205,7 +1217,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. @@ -1358,6 +1370,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] @@ -1395,6 +1408,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 @@ -4619,7 +4634,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]; @@ -4665,7 +4680,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]; @@ -4689,7 +4704,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]; @@ -4734,7 +4749,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]; @@ -4758,7 +4773,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]; @@ -7386,6 +7401,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 053ce0055f..b4c264c008 100644 --- a/configure.ac +++ b/configure.ac @@ -1136,6 +1136,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 d8e5c83ea9..c9ccd13dfd 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");