SUBDIRS = lib src
modules_sparse:
+if WITH_KMOD
${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
V=$V C=2 CF=-D__CHECK_ENDIAN__ \
IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
+else
+ @echo Skipping kernel modules due to --with-kmod=no
+endif
modules:
+if WITH_KMOD
${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter V=$V \
IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
+else
+ @echo Skipping kernel modules due to --with-kmod=no
+endif
modules_install:
+if WITH_KMOD
${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
KDIR=$$PWD/kernel modules_install
+else
+ @echo Skipping kernel modules due to --with-kmod=no
+endif
modules_clean:
+if WITH_KMOD
${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net/netfilter \
KDIR=$$PWD/kernel clean
+else
+ @echo Skipping kernel modules due to --with-kmod=no
+endif
update_includes:
./update ip_set.h
*) AC_MSG_ERROR([Linux systems supported exclusively!]);;
esac
+dnl Optionnally disable building the kernel module
+AC_ARG_WITH([kmod],
+ AS_HELP_STRING([--with-kmod=yes/no],
+ [Build the kernel module (default: yes)]),
+ [BUILDKMOD="$withval";],
+ [BUILDKMOD="yes";])
+AM_CONDITIONAL(WITH_KMOD, test "$BUILDKMOD" == "yes")
+
dnl Additional arguments
dnl Kernel build directory or source tree
AC_ARG_WITH([kbuild],
AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "")
AC_SUBST(KBUILDDIR)
+if test "$BUILDKMOD" == "yes"
+then
dnl Sigh: check kernel version dependencies
if test "$KBUILDDIR" != ""
then
then
AC_MSG_ERROR([The kernel source directory $ksourcedir is not patched with netlink.patch to support ipset])
fi
+fi
dnl Maximal number of sets supported by the kernel, default 256
AC_ARG_WITH([maxsets],