2 AC_INIT([iptables], [1.4.3.2])
4 # See libtool.info "Libtool's versioning system"
8 AC_CONFIG_HEADERS([config.h])
9 AC_CONFIG_MACRO_DIR([m4])
11 AM_INIT_AUTOMAKE([-Wall])
18 AS_HELP_STRING([--with-kernel=PATH],
19 [Path to kernel source/build directory]),
20 [kbuilddir="$withval"; ksourcedir="$withval";])
22 AS_HELP_STRING([--with-kbuild=PATH],
23 [Path to kernel build directory [[/lib/modules/CURRENT/build]]]),
24 [kbuilddir="$withval"])
25 AC_ARG_WITH([ksource],
26 AS_HELP_STRING([--with-ksource=PATH],
27 [Path to kernel source directory [[/lib/modules/CURRENT/source]]]),
28 [ksourcedir="$withval"])
29 AC_ARG_WITH([xtlibdir],
30 AS_HELP_STRING([--with-xtlibdir=PATH],
31 [Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]),
32 [xtlibdir="$withval"],
33 [xtlibdir="${libexecdir}/xtables"])
35 AS_HELP_STRING([--disable-ipv4], [Do not build iptables]),
36 [enable_ipv4="$enableval"], [enable_ipv4="yes"])
38 AS_HELP_STRING([--disable-ipv6], [Do not build ip6tables]),
39 [enable_ipv6="$enableval"], [enable_ipv6="yes"])
40 AC_ARG_ENABLE([devel],
41 AS_HELP_STRING([--enable-devel],
42 [Install Xtables development headers]),
43 [enable_devel="$enableval"], [enable_devel="yes"])
44 AC_ARG_ENABLE([libipq],
45 AS_HELP_STRING([--enable-libipq], [Build and install libipq]))
46 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
47 [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
48 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
50 AC_CHECK_HEADER([linux/dccp.h])
53 if test "$ac_cv_header_linux_dccp_h" != "yes"; then
54 blacklist_modules="$blacklist_modules dccp";
56 AC_SUBST([blacklist_modules])
58 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"])
59 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"])
60 AM_CONDITIONAL([ENABLE_IPV4], [test "$enable_ipv4" = "yes"])
61 AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"])
62 AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
63 AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
65 regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
66 -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
67 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
69 -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL";
71 if [[ -n "$kbuilddir" ]]; then
72 kinclude_CFLAGS="$kinclude_CFLAGS -I $kbuilddir/include";
74 if [[ -n "$ksourcedir" ]]; then
75 kinclude_CFLAGS="$kinclude_CFLAGS -I $ksourcedir/include";
78 AC_SUBST([regular_CFLAGS])
79 AC_SUBST([kinclude_CFLAGS])
81 AC_SUBST([ksourcedir])
83 AC_SUBST([pkgconfigdir])
84 AC_SUBST([libxtables_vcurrent])
85 AC_SUBST([libxtables_vage])
86 libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage));
87 AC_SUBST([libxtables_vmajor])
89 AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile
91 include/xtables.h include/iptables/internal.h libiptc.pc xtables.pc])