From 70fdf030545f00888bcebb5fca8243a6dccca95b Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Mon, 12 Sep 2011 16:03:23 +0800 Subject: Optionally disable building the kernel module. Distributors (like Fedora) might be interested in including the ipset tools and libs, but they often don't want to build and ship external kernel modules, especially if those modules are already included in their kernel packages. This patch introduces a new --with-kmod configure option that can be used to conditionally build the kernel module. The module is still built by default, to preserve compatibility. A user who wants to build only the user-space part of ipset can do so by running the following: $ ./autogen.sh $ configure --with-kmod=no $ make # make install Signed-off-by: Jozsef Kadlecsik --- Makefile.am | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3d46213..09ba4d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,21 +23,37 @@ endif 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 -- cgit v1.2.3