diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-25 14:53:04 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2010-10-25 14:53:04 +0200 |
commit | a68e0f336a746d6f23f6af1d2ce632069c671d17 (patch) | |
tree | 55f517b1b361a55d84029edb3850cb3ddb712fdb | |
parent | f2a0643f55af5ac826c65706ee133dd251bccd05 (diff) | |
parent | a2297acbaed4174f27a7caef98f2d84f9bde8c5c (diff) | |
download | ipset-a68e0f336a746d6f23f6af1d2ce632069c671d17.tar.gz |
Merge branch 'ipset-5' of git://dev.medozas.de/ipset into ipset-5
-rw-r--r-- | .gitignore | 20 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rwxr-xr-x | autogen.sh | 18 | ||||
-rw-r--r-- | configure.ac | 36 | ||||
-rw-r--r-- | lib/Makefile.am | 4 | ||||
-rw-r--r-- | m4/.gitignore | 2 | ||||
-rw-r--r-- | src/.gitignore | 1 |
7 files changed, 49 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f6660e --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +*~ +*.la +*.lo +*.o +.deps +.libs +Makefile +Makefile.in + +/aclocal.m4 +/autom4te.cache +/compile +/config.* +/configure +/depcomp +/install-sh +/libtool +/ltmain.sh +/missing +/stamp-h1 diff --git a/Makefile.am b/Makefile.am index 2ddb5c9..c68544a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +ACLOCAL_AMFLAGS = -I m4 + include $(top_srcdir)/Make_global.am if ! WITH_KBUILDDIR @@ -1,18 +1,4 @@ #!/bin/sh -run () -{ - echo "running: $*" - eval $* - - if test $? != 0 ; then - echo "error: while running '$*'" - exit 1 - fi -} - -run aclocal -run autoheader -run libtoolize -f -run automake -a -run autoconf +autoreconf -fi +rm -Rf autom4te.cache diff --git a/configure.ac b/configure.ac index 7622ac4..0bff332 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,9 @@ dnl Boilerplate AC_INIT([ipset], [5.0], [kadlec@blackhole.kfki.hu]) -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET +AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADER([config.h]) -AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) dnl Shortcut: Linux supported alone case $target in @@ -12,10 +13,14 @@ esac dnl Additional arguments dnl Kernel build directory or source tree -AC_ARG_WITH([kernel], - AS_HELP_STRING([--with-kernel=PATH], - [Path to kernel source/build directory]), - [KBUILDDIR="$withval";]) +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]), + [KSOURCEDIR="$withval";]) AM_CONDITIONAL(WITH_KBUILDDIR, test "$KBUILDDIR" != "") AC_SUBST(KBUILDDIR) @@ -27,9 +32,10 @@ else kbuilddir="/lib/modules/`uname -r`/build" fi -if test ! -e "$kbuilddir/include/linux/netfilter/nfnetlink.h" -then - AC_MSG_ERROR([Invalid kernel build directory $kbuilddir]) +if test -n "$KSOURCEDIR"; then + ksourcedir="$KSOURCEDIR" +else + ksourcedir="/lib/modules/$(uname -r)/source" fi if test ! -e "$kbuilddir/.config" @@ -45,11 +51,11 @@ then fi dnl Check kernel dependencies: nfnetlink.h -NFNL_CB_CONST="`./check_const $kbuilddir/include/linux/netfilter/nfnetlink.h`" +NFNL_CB_CONST="`./check_const $ksourcedir/include/linux/netfilter/nfnetlink.h`" AC_SUBST(NFNL_CB_CONST) dnl Check kernel dependencies: netlink.h -NETLINK_DUMP_CONST="`./check_const $kbuilddir/include/linux/netlink.h`" +NETLINK_DUMP_CONST="`./check_const $ksourcedir/include/linux/netlink.h`" AC_SUBST(NETLINK_DUMP_CONST) dnl Maximal number of sets supported by the kernel, default 256 @@ -98,15 +104,13 @@ AM_CONDITIONAL([DISABLE_EXTRA_FLAGS], [test "x$extra_flags" = xno]) dnl Checks for programs AC_PROG_CC -AC_PROG_LIBTOOL +AM_PROG_CC_C_O +LT_INIT AC_PROG_INSTALL AC_PROG_LN_S dnl Checks for libraries -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 +PKG_CHECK_MODULES([libmnl], [libmnl >= 1]) dnl Checks for header files diff --git a/lib/Makefile.am b/lib/Makefile.am index 2d3df03..7913877 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,11 +1,11 @@ include $(top_srcdir)/Make_global.am -AM_CFLAGS += -fPIC -LIBS = +AM_CFLAGS += ${libmnl_CFLAGS} lib_LTLIBRARIES = libipset.la libipset_la_LDFLAGS = -version-info $(LIBVERSION) +libipset_la_LIBADD = ${libmnl_LIBS} libipset_la_SOURCES = \ data.c \ icmp.c \ diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..64d9bbc --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,2 @@ +/libtool.m4 +/lt*.m4 diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..6166aba --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +/ipset |