1 2AC_INIT([iptables], [1.4.12.1]) 3 4# See libtool.info "Libtool's versioning system" 5libxtables_vcurrent=7 6libxtables_vage=0 7 8AC_CONFIG_HEADERS([config.h]) 9AC_CONFIG_MACRO_DIR([m4]) 10AC_PROG_INSTALL 11AM_INIT_AUTOMAKE([-Wall]) 12AC_PROG_CC 13AM_PROG_CC_C_O 14AC_DISABLE_STATIC 15AM_PROG_LIBTOOL 16 17AC_ARG_WITH([kernel], 18 AS_HELP_STRING([--with-kernel=PATH], 19 [Path to kernel source/build directory]), 20 [kbuilddir="$withval"; ksourcedir="$withval";]) 21AC_ARG_WITH([kbuild], 22 AS_HELP_STRING([--with-kbuild=PATH], 23 [Path to kernel build directory [[/lib/modules/CURRENT/build]]]), 24 [kbuilddir="$withval"]) 25AC_ARG_WITH([ksource], 26 AS_HELP_STRING([--with-ksource=PATH], 27 [Path to kernel source directory [[/lib/modules/CURRENT/source]]]), 28 [ksourcedir="$withval"]) 29AC_ARG_WITH([xtlibdir], 30 AS_HELP_STRING([--with-xtlibdir=PATH], 31 [Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]), 32 [xtlibdir="$withval"], 33 [xtlibdir="${libdir}/xtables"]) 34AC_ARG_ENABLE([ipv4], 35 AS_HELP_STRING([--disable-ipv4], [Do not build iptables]), 36 [enable_ipv4="$enableval"], [enable_ipv4="yes"]) 37AC_ARG_ENABLE([ipv6], 38 AS_HELP_STRING([--disable-ipv6], [Do not build ip6tables]), 39 [enable_ipv6="$enableval"], [enable_ipv6="yes"]) 40AC_ARG_ENABLE([largefile], 41 AS_HELP_STRING([--disable-largefile], [Do not build largefile support]), 42 [enable_largefile="$enableval"], 43 [enable_largefile="yes"; 44 largefile_cppflags='-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64']) 45AC_ARG_ENABLE([devel], 46 AS_HELP_STRING([--enable-devel], 47 [Install Xtables development headers]), 48 [enable_devel="$enableval"], [enable_devel="yes"]) 49AC_ARG_ENABLE([libipq], 50 AS_HELP_STRING([--enable-libipq], [Build and install libipq])) 51AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], 52 [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), 53 [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) 54 55libiptc_LDFLAGS2=""; 56AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed], 57 [libiptc_LDFLAGS2="-Wl,--no-as-needed"]) 58AC_SUBST([libiptc_LDFLAGS2]) 59 60blacklist_modules=""; 61 62AC_CHECK_HEADERS([linux/dccp.h linux/ip_vs.h linux/magic.h linux/proc_fs.h]) 63if test "$ac_cv_header_linux_dccp_h" != "yes"; then 64 blacklist_modules="$blacklist_modules dccp"; 65fi; 66if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then 67 blacklist_modules="$blacklist_modules ipvs"; 68fi; 69 70AC_SUBST([blacklist_modules]) 71AC_CHECK_SIZEOF([struct ip6_hdr], [], [#include <netinet/ip6.h>]) 72 73AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) 74AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"]) 75AM_CONDITIONAL([ENABLE_IPV4], [test "$enable_ipv4" = "yes"]) 76AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"]) 77AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"]) 78AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) 79AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) 80 81#PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], 82# [nfnetlink=1], [nfnetlink=0]) 83#AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) 84 85regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ 86 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ 87 -Winline -pipe"; 88regular_CPPFLAGS="${largefile_cppflags} -D_REENTRANT \ 89 -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL"; 90kinclude_CPPFLAGS=""; 91if [[ -n "$kbuilddir" ]]; then 92 kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$kbuilddir/include"; 93fi; 94if [[ -n "$ksourcedir" ]]; then 95 kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$ksourcedir/include"; 96fi; 97pkgdatadir='${datadir}/xtables'; 98 99AC_SUBST([regular_CFLAGS]) 100AC_SUBST([regular_CPPFLAGS]) 101AC_SUBST([kinclude_CPPFLAGS]) 102AC_SUBST([kbuilddir]) 103AC_SUBST([ksourcedir]) 104AC_SUBST([xtlibdir]) 105AC_SUBST([pkgconfigdir]) 106AC_SUBST([pkgdatadir]) 107AC_SUBST([libxtables_vcurrent]) 108AC_SUBST([libxtables_vage]) 109libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage)); 110AC_SUBST([libxtables_vmajor]) 111 112AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile 113 iptables/Makefile iptables/xtables.pc 114 libipq/Makefile libipq/libipq.pc 115 libiptc/Makefile libiptc/libiptc.pc utils/Makefile 116 include/xtables.h include/iptables/internal.h]) 117AC_OUTPUT 118