diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac index 38164cf..7622ac4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,8 @@ dnl Boilerplate AC_INIT([ipset], [5.0], [kadlec@blackhole.kfki.hu]) -AC_CANONICAL_TARGET -AC_CONFIG_MACRO_DIR([m4]) +AC_CANONICAL_SYSTEM AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) dnl Shortcut: Linux supported alone case $target in @@ -13,14 +12,10 @@ esac dnl Additional arguments dnl Kernel build directory or source tree -AC_ARG_WITH([kbuild], - AS_HELP_STRING([--with-kbuild=PATH], - [Path to kernel build directory]), - [KBUILDDIR="$withval";]) -AC_ARG_WITH([ksource], - AS_HELP_STRING([--with-ksource=PATH], - [Path to kernel source directory, if not the same as the kernel build directory]), - [KSOURCEDIR="$withval";]) +AC_ARG_WITH([kernel], + AS_HELP_STRING([--with-kernel=PATH], + [Path to kernel source/build directory]), + [KBUILDDIR="$withval";]) AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "") AC_SUBST(KBUILDDIR) @@ -32,16 +27,9 @@ else kbuilddir="/lib/modules/`uname -r`/build" fi -if test -n "$KSOURCEDIR"; then - ksourcedir="$KSOURCEDIR" -elif test -e "$kbuilddir/include/linux/netfilter/nfnetlink.h"; then - ksourcedir="$kbuilddir" -else - ksourcedir="/lib/modules/$(uname -r)/source" -fi -if test ! -e "$ksourcedir/include/linux/netfilter/nfnetlink.h" +if test ! -e "$kbuilddir/include/linux/netfilter/nfnetlink.h" then - AC_MSG_ERROR([Invalid kernel source directory $ksourcedir]) + AC_MSG_ERROR([Invalid kernel build directory $kbuilddir]) fi if test ! -e "$kbuilddir/.config" @@ -57,11 +45,11 @@ then fi dnl Check kernel dependencies: nfnetlink.h -NFNL_CB_CONST="`./check_const $ksourcedir/include/linux/netfilter/nfnetlink.h`" +NFNL_CB_CONST="`./check_const $kbuilddir/include/linux/netfilter/nfnetlink.h`" AC_SUBST(NFNL_CB_CONST) dnl Check kernel dependencies: netlink.h -NETLINK_DUMP_CONST="`./check_const $ksourcedir/include/linux/netlink.h`" +NETLINK_DUMP_CONST="`./check_const $kbuilddir/include/linux/netlink.h`" AC_SUBST(NETLINK_DUMP_CONST) dnl Maximal number of sets supported by the kernel, default 256 @@ -110,13 +98,15 @@ AM_CONDITIONAL([DISABLE_EXTRA_FLAGS], [test "x$extra_flags" = xno]) dnl Checks for programs AC_PROG_CC -AM_PROG_CC_C_O -LT_INIT +AC_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_LN_S dnl Checks for libraries -PKG_CHECK_MODULES([libmnl], [libmnl >= 1]) +AC_CHECK_LIB([mnl], [mnl_socket_open]) +if test x"${ac_cv_lib_mnl_mnl_socket_open}" = xno; then + AC_MSG_ERROR(libmnl not found) +fi dnl Checks for header files |