blob: 9d51ef74d7515a56ef5c8c331af47576df8d6a08 [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 \
Max Kellermann9ee386a2008-01-29 13:48:05 +000040 -D_REENTRANT -W -Wall -Waggregate-return -Wmissing-declarations \
Jan Engelhardtf82070f2008-01-20 13:14:00 +000041 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
42 -Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
Jan Engelhardta99cb442008-01-29 13:33:23 +000043 -DIPT_LIB_DIR=\\\"\${iptdir}\\\" -DIP6T_LIB_DIR=\\\"\${iptdir}\\\"";
Jan Engelhardtfb6209a2008-01-29 13:32:07 +000044kinclude_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 \
Max Kellermann9ee386a2008-01-29 13:48:05 +000049 -Wno-unused-parameter \
50 -Wno-shadow -Wno-inline"
Jan Engelhardtf82070f2008-01-20 13:14:00 +000051
Jan Engelhardtfb6209a2008-01-29 13:32:07 +000052AC_SUBST([regular_CFLAGS kinclude_CFLAGS])
Jan Engelhardtf82070f2008-01-20 13:14:00 +000053AC_SUBST([kbuilddir])
54AC_SUBST([ksourcedir])
55AC_SUBST([iptdir])
56AC_OUTPUT([Makefile extensions/GNUmakefile libipq/Makefile])