Skip to content

Commit

Permalink
allow for ioplugin to default to off, enabling with --enable-ioplugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mcr authored and fxlb committed Nov 14, 2021
1 parent 470ccea commit 4c575a8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 7 deletions.
43 changes: 37 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ infodir
docdir
oldincludedir
includedir
runstatedir
localstatedir
sharedstatedir
sysconfdir
Expand Down Expand Up @@ -746,6 +747,7 @@ enable_protochain
with_pcap
with_libnl
enable_ipv6
enable_ioplugin
with_dag
with_dag_includes
with_dag_libraries
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -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=* \
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand All @@ -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];
Expand Down Expand Up @@ -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];
Expand All @@ -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];
Expand Down Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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@:>@]),
Expand Down
2 changes: 1 addition & 1 deletion pcap-ioplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 4c575a8

Please sign in to comment.