Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 1 | |
Pablo Neira Ayuso | b5508d2 | 2009-04-06 13:09:17 +0200 | [diff] [blame^] | 2 | AC_INIT([iptables], [1.4.3.2]) |
Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 3 | |
Jan Engelhardt | dacafa5 | 2009-01-27 20:56:23 +0100 | [diff] [blame] | 4 | # See libtool.info "Libtool's versioning system" |
Jan Engelhardt | c4edfa6 | 2009-03-30 00:44:46 +0200 | [diff] [blame] | 5 | libxtables_vcurrent=2 |
Jan Engelhardt | dacafa5 | 2009-01-27 20:56:23 +0100 | [diff] [blame] | 6 | libxtables_vage=0 |
| 7 | |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 8 | AC_CONFIG_HEADERS([config.h]) |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 9 | AC_CONFIG_MACRO_DIR([m4]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 10 | AC_PROG_INSTALL |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 11 | AM_INIT_AUTOMAKE([-Wall]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 12 | AC_PROG_CC |
| 13 | AM_PROG_CC_C_O |
| 14 | AC_DISABLE_STATIC |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 15 | AM_PROG_LIBTOOL |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 16 | |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 17 | AC_ARG_WITH([kernel], |
| 18 | AS_HELP_STRING([--with-kernel=PATH], |
| 19 | [Path to kernel source/build directory]), |
| 20 | [kbuilddir="$withval"; ksourcedir="$withval";]) |
| 21 | AC_ARG_WITH([kbuild], |
| 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"]) |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 29 | AC_ARG_WITH([xtlibdir], |
| 30 | AS_HELP_STRING([--with-xtlibdir=PATH], |
Jan Engelhardt | d31a659 | 2008-02-11 14:11:14 +0100 | [diff] [blame] | 31 | [Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]), |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 32 | [xtlibdir="$withval"], |
Jan Engelhardt | d31a659 | 2008-02-11 14:11:14 +0100 | [diff] [blame] | 33 | [xtlibdir="${libexecdir}/xtables"]) |
Jan Engelhardt | a094eb0 | 2009-04-03 22:37:49 +0200 | [diff] [blame] | 34 | AC_ARG_ENABLE([ipv4], |
| 35 | AS_HELP_STRING([--disable-ipv4], [Do not build iptables]), |
| 36 | [enable_ipv4="$enableval"], [enable_ipv4="yes"]) |
Jan Engelhardt | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame] | 37 | AC_ARG_ENABLE([ipv6], |
| 38 | AS_HELP_STRING([--disable-ipv6], [Do not build ip6tables]), |
| 39 | [enable_ipv6="$enableval"], [enable_ipv6="yes"]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 40 | AC_ARG_ENABLE([devel], |
| 41 | AS_HELP_STRING([--enable-devel], |
Jan Engelhardt | 77f1538 | 2008-02-11 15:01:03 +0100 | [diff] [blame] | 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])) |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 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']) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 49 | |
Jan Engelhardt | 2c570e7 | 2008-06-05 19:54:48 +0200 | [diff] [blame] | 50 | AC_CHECK_HEADER([linux/dccp.h]) |
| 51 | |
| 52 | blacklist_modules=""; |
| 53 | if test "$ac_cv_header_linux_dccp_h" != "yes"; then |
| 54 | blacklist_modules="$blacklist_modules dccp"; |
| 55 | fi; |
| 56 | AC_SUBST([blacklist_modules]) |
| 57 | |
Jan Engelhardt | ee3228a | 2008-06-23 11:37:08 +0200 | [diff] [blame] | 58 | AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) |
| 59 | AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"]) |
Jan Engelhardt | a094eb0 | 2009-04-03 22:37:49 +0200 | [diff] [blame] | 60 | AM_CONDITIONAL([ENABLE_IPV4], [test "$enable_ipv4" = "yes"]) |
Jan Engelhardt | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame] | 61 | AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"]) |
Jan Engelhardt | ee3228a | 2008-06-23 11:37:08 +0200 | [diff] [blame] | 62 | AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) |
| 63 | AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 64 | |
| 65 | regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \ |
Jan Engelhardt | 7a236f4 | 2008-03-03 12:30:41 +0100 | [diff] [blame] | 66 | -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \ |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 67 | -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ |
Jan Engelhardt | 8b7c64d | 2008-04-15 11:48:25 +0200 | [diff] [blame] | 68 | -Winline -pipe \ |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 69 | -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL"; |
Jan Engelhardt | ca7cd66 | 2008-02-11 01:23:01 +0100 | [diff] [blame] | 70 | kinclude_CFLAGS=""; |
| 71 | if [[ -n "$kbuilddir" ]]; then |
| 72 | kinclude_CFLAGS="$kinclude_CFLAGS -I $kbuilddir/include"; |
| 73 | fi; |
| 74 | if [[ -n "$ksourcedir" ]]; then |
| 75 | kinclude_CFLAGS="$kinclude_CFLAGS -I $ksourcedir/include"; |
| 76 | fi; |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 77 | |
Jan Engelhardt | b95fc08 | 2008-04-15 09:13:17 +0200 | [diff] [blame] | 78 | AC_SUBST([regular_CFLAGS]) |
| 79 | AC_SUBST([kinclude_CFLAGS]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 80 | AC_SUBST([kbuilddir]) |
| 81 | AC_SUBST([ksourcedir]) |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 82 | AC_SUBST([xtlibdir]) |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 83 | AC_SUBST([pkgconfigdir]) |
Jan Engelhardt | dacafa5 | 2009-01-27 20:56:23 +0100 | [diff] [blame] | 84 | AC_SUBST([libxtables_vcurrent]) |
| 85 | AC_SUBST([libxtables_vage]) |
| 86 | libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage)); |
| 87 | AC_SUBST([libxtables_vmajor]) |
Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 88 | |
Jan Engelhardt | f567ac9 | 2009-02-12 15:01:37 +0100 | [diff] [blame] | 89 | AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile |
| 90 | libipq/Makefile |
Jan Engelhardt | 51bc836 | 2009-02-11 16:40:29 +0100 | [diff] [blame] | 91 | include/xtables.h include/iptables/internal.h libiptc.pc xtables.pc]) |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 92 | AC_OUTPUT |