summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNeutron Soutmun <neo.neutron@gmail.com>2012-05-10 08:05:53 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-05-10 08:05:53 +0200
commit2da431d3685c65d4355d387e213a3cd39d5b59f3 (patch)
treeef3fce367aa55aaae55a8b31a2782775a1adffcb /configure.ac
parentf65b878e52494662fbb648132898575071bed75d (diff)
Add dynamic module support to ipset userspace tool
The patch adds supporting dynamic modules for the set types to ipset userspace tool. The dynamic module support can be enabled by the --enable-settype-modules of "configure". The list of set types to be compiled as dynamic modules can be specified in the --with-settype-modules-list option. Example --enable-settype-modules \ --with-settype-modules-list="ipset_hash_ip ipset_hash_ipport" The keyword "all" can be used to compile all set types as dynamic modules.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 42 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 00f1115..7e7cf75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,11 @@ AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax])
+AC_ENABLE_STATIC
+LT_INIT([dlopen])
+LT_CONFIG_LTDL_DIR([libltdl])
+LTDL_INIT([nonrecursive])
+
dnl Shortcut: Linux supported alone
case "$host" in
*-*-linux*) ;;
@@ -100,6 +105,43 @@ AC_ARG_ENABLE([debug],
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes])
+dnl Enable type modules
+AC_ARG_ENABLE([settype_modules],
+ AS_HELP_STRING([--enable-settype-modules],
+ [Enable set type modules support]),
+ [enable_settype_modules="$enableval"],
+ [enable_settype_modules="no"])
+
+AC_ARG_WITH([settype_modules_list],
+ AS_HELP_STRING([--with-settype-modules-list="mod1 mod2 ..."],
+ [List of dynamic loading modules, ignored if settype-modules is disabled. It could be "all" to build all available settypes as modules]),
+ [SETTYPE_MODLIST_RAW="$withval";])
+
+SETTYPE_MODLIST=
+if test "x$enable_settype_modules" = "xyes"; then
+ for mod in $SETTYPE_MODLIST_RAW; do
+ if echo $mod | grep "all"; then
+ m="${mod}"
+ else
+ if echo $mod | grep "ipset_"; then
+ m="${mod}.c"
+ else
+ m="ipset_${mod}.c"
+ fi
+ fi
+
+ SETTYPE_MODLIST="${SETTYPE_MODLIST} $m"
+ done
+
+ AC_MSG_RESULT([checking for configuration with dynamic loading modules... $SETTYPE_MODLIST_RAW])
+fi
+AC_SUBST(SETTYPE_MODLIST)
+
+AM_CONDITIONAL([ENABLE_SETTYPE_MODULES], [test "x$enable_settype_modules" = xyes])
+
+AM_CONDITIONAL([ENABLE_STATIC], [test "x$enable_static" = xyes])
+AM_CONDITIONAL([ENABLE_SHARED], [test "x$enable_shared" = xyes])
+
dnl Checks for programs
: ${CFLAGS=""}