blob: e616329775fba351d7c27bb4ae1d72040ea071a1 [file] [log] [blame]
Jan Engelhardtf82070f2008-01-20 13:14:00 +00001
2AC_INIT([iptables], [1.4.0])
3AC_CONFIG_HEADERS([config.h])
4AC_PROG_INSTALL
5AM_INIT_AUTOMAKE
6AC_PROG_CC
7AM_PROG_CC_C_O
8AC_DISABLE_STATIC
9AC_PROG_LIBTOOL
10
11kbuilddir="/lib/modules/$(uname -r)/build";
12ksourcedir="/lib/modules/$(uname -r)/source";
13AC_ARG_WITH([kernel],
14 AS_HELP_STRING([--with-kernel=PATH],
15 [Path to kernel source/build directory]),
16 [kbuilddir="$withval"; ksourcedir="$withval";])
17AC_ARG_WITH([kbuild],
18 AS_HELP_STRING([--with-kbuild=PATH],
19 [Path to kernel build directory [[/lib/modules/CURRENT/build]]]),
20 [kbuilddir="$withval"])
21AC_ARG_WITH([ksource],
22 AS_HELP_STRING([--with-ksource=PATH],
23 [Path to kernel source directory [[/lib/modules/CURRENT/source]]]),
24 [ksourcedir="$withval"])
25AC_ARG_WITH([iptdir],
26 AS_HELP_STRING([--with-iptdir=PATH],
27 [Path to iptables modules [[LIBEXECDIR/iptables]]]),
28 [iptdir="$withval"],
29 [iptdir="${libexecdir}/iptables"])
30AC_ARG_ENABLE([devel],
31 AS_HELP_STRING([--enable-devel],
32 [Build and install development files (libipq, libipq-devel, iptables-devel)]))
33
34AC_CHECK_HEADER([netinet/ip6.h], [], [AC_MSG_ERROR(but we need that for IPv6)])
35AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" == "yes"])
36AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" == "yes"])
37AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" == "yes"])
38
39regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
40 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
41 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
42 -Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
Jan Engelhardtfb6209a2008-01-29 13:32:07 +000043 -DIPT_LIB_DIR=\\\"\${iptdir}\\\"";
44kinclude_CFLAGS="-I\"$kbuilddir/include\" -I\"$ksourcedir/include\"";
Jan Engelhardtf82070f2008-01-20 13:14:00 +000045
46# Remove workarounds soon
47regular_CFLAGS="$regular_CFLAGS -Wno-aggregate-return \
48 -Wno-missing-declarations -Wno-missing-prototypes \
49 -Wno-redundant-decls -Wno-shadow -Wno-strict-prototypes -Wno-inline"
50
Jan Engelhardtfb6209a2008-01-29 13:32:07 +000051AC_SUBST([regular_CFLAGS kinclude_CFLAGS])
Jan Engelhardtf82070f2008-01-20 13:14:00 +000052AC_SUBST([kbuilddir])
53AC_SUBST([ksourcedir])
54AC_SUBST([iptdir])
55AC_OUTPUT([Makefile extensions/GNUmakefile libipq/Makefile])