summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-01-20 13:14:00 +0000
committerPatrick McHardy <kaber@trash.net>2008-01-20 13:14:00 +0000
commitf82070f9871d281c2802c1624dcf222886b5fb50 (patch)
treec0e633b0867a4caab39d55b74f8521ecac724520 /configure.ac
parent8e707d7c64c53c92a36b6c609b129aba8e51fab7 (diff)
Converts the iptables build infrastructure to autotools.
- Can build both static and dynamic at the same time - iptables-static will be a multi-binary, semi-static (link against libc but w/o dynamic plugins) - Always build IPv6 modules - consider INSTALL Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac55
1 files changed, 55 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..3314df40
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,55 @@
+
+AC_INIT([iptables], [1.4.0])
+AC_CONFIG_HEADERS([config.h])
+AC_PROG_INSTALL
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+kbuilddir="/lib/modules/$(uname -r)/build";
+ksourcedir="/lib/modules/$(uname -r)/source";
+AC_ARG_WITH([kernel],
+ AS_HELP_STRING([--with-kernel=PATH],
+ [Path to kernel source/build directory]),
+ [kbuilddir="$withval"; ksourcedir="$withval";])
+AC_ARG_WITH([kbuild],
+ AS_HELP_STRING([--with-kbuild=PATH],
+ [Path to kernel build directory [[/lib/modules/CURRENT/build]]]),
+ [kbuilddir="$withval"])
+AC_ARG_WITH([ksource],
+ AS_HELP_STRING([--with-ksource=PATH],
+ [Path to kernel source directory [[/lib/modules/CURRENT/source]]]),
+ [ksourcedir="$withval"])
+AC_ARG_WITH([iptdir],
+ AS_HELP_STRING([--with-iptdir=PATH],
+ [Path to iptables modules [[LIBEXECDIR/iptables]]]),
+ [iptdir="$withval"],
+ [iptdir="${libexecdir}/iptables"])
+AC_ARG_ENABLE([devel],
+ AS_HELP_STRING([--enable-devel],
+ [Build and install development files (libipq, libipq-devel, iptables-devel)]))
+
+AC_CHECK_HEADER([netinet/ip6.h], [], [AC_MSG_ERROR(but we need that for IPv6)])
+AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" == "yes"])
+AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" == "yes"])
+AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" == "yes"])
+
+regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
+ -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
+ -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
+ -Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
+ -DIPT_LIB_DIR=\\\"\${iptdir}\\\" \
+ -I\"$kbuilddir/include\" -I\"$ksourcedir/include\""
+
+# Remove workarounds soon
+regular_CFLAGS="$regular_CFLAGS -Wno-aggregate-return \
+ -Wno-missing-declarations -Wno-missing-prototypes \
+ -Wno-redundant-decls -Wno-shadow -Wno-strict-prototypes -Wno-inline"
+
+AC_SUBST([regular_CFLAGS])
+AC_SUBST([kbuilddir])
+AC_SUBST([ksourcedir])
+AC_SUBST([iptdir])
+AC_OUTPUT([Makefile extensions/GNUmakefile libipq/Makefile])