1 2AC_INIT([iptables], [1.4.11.1]) 3 4# See libtool.info "Libtool's versioning system" 5libxtables_vcurrent=6 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="${libexecdir}/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_HEADER([linux/dccp.h]) 63if test "$ac_cv_header_linux_dccp_h" != "yes"; then 64 blacklist_modules="$blacklist_modules dccp"; 65fi; 66 67AC_CHECK_HEADER([linux/ip_vs.h]) 68if test "$ac_cv_header_linux_ip_vs_h" != "yes"; then 69 blacklist_modules="$blacklist_modules ipvs"; 70fi; 71 72AC_SUBST([blacklist_modules]) 73 74AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) 75AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"]) 76AM_CONDITIONAL([ENABLE_IPV4], [test "$enable_ipv4" = "yes"]) 77AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"]) 78AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"]) 79AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) 80AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) 81 82PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0], 83 [nfnetlink=1], [nfnetlink=0]) 84AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1]) 85 86regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \ 87 -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ 88 -Winline -pipe"; 89regular_CPPFLAGS="${largefile_cppflags} -D_REENTRANT \ 90 -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL"; 91kinclude_CPPFLAGS=""; 92if [[ -n "$kbuilddir" ]]; then 93 kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$kbuilddir/include"; 94fi; 95if [[ -n "$ksourcedir" ]]; then 96 kinclude_CPPFLAGS="$kinclude_CPPFLAGS -I$ksourcedir/include"; 97fi; 98pkgdatadir='${datadir}/xtables'; 99 100AC_SUBST([regular_CFLAGS]) 101AC_SUBST([regular_CPPFLAGS]) 102AC_SUBST([kinclude_CPPFLAGS]) 103AC_SUBST([kbuilddir]) 104AC_SUBST([ksourcedir]) 105AC_SUBST([xtlibdir]) 106AC_SUBST([pkgconfigdir]) 107AC_SUBST([pkgdatadir]) 108AC_SUBST([libxtables_vcurrent]) 109AC_SUBST([libxtables_vage]) 110libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage)); 111AC_SUBST([libxtables_vmajor]) 112 113AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile 114 iptables/Makefile iptables/xtables.pc 115 libipq/Makefile libiptc/Makefile libiptc/libiptc.pc utils/Makefile 116 include/xtables.h include/iptables/internal.h]) 117AC_OUTPUT 118