Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 1 | |
Pablo Neira Ayuso | ca6ccdb | 2009-03-24 12:54:31 +0100 | [diff] [blame] | 2 | AC_INIT([iptables], [1.4.3.1]) |
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 | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame^] | 34 | AC_ARG_ENABLE([ipv6], |
| 35 | AS_HELP_STRING([--disable-ipv6], [Do not build ip6tables]), |
| 36 | [enable_ipv6="$enableval"], [enable_ipv6="yes"]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 37 | AC_ARG_ENABLE([devel], |
| 38 | AS_HELP_STRING([--enable-devel], |
Jan Engelhardt | 77f1538 | 2008-02-11 15:01:03 +0100 | [diff] [blame] | 39 | [Install Xtables development headers]), |
| 40 | [enable_devel="$enableval"], [enable_devel="yes"]) |
| 41 | AC_ARG_ENABLE([libipq], |
| 42 | AS_HELP_STRING([--enable-libipq], [Build and install libipq])) |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 43 | AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], |
| 44 | [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), |
| 45 | [pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig']) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 46 | |
Jan Engelhardt | 2c570e7 | 2008-06-05 19:54:48 +0200 | [diff] [blame] | 47 | AC_CHECK_HEADER([linux/dccp.h]) |
| 48 | |
| 49 | blacklist_modules=""; |
| 50 | if test "$ac_cv_header_linux_dccp_h" != "yes"; then |
| 51 | blacklist_modules="$blacklist_modules dccp"; |
| 52 | fi; |
| 53 | AC_SUBST([blacklist_modules]) |
| 54 | |
Jan Engelhardt | ee3228a | 2008-06-23 11:37:08 +0200 | [diff] [blame] | 55 | AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) |
| 56 | AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"]) |
Jan Engelhardt | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame^] | 57 | AM_CONDITIONAL([ENABLE_IPV6], [test "$enable_ipv6" = "yes"]) |
Jan Engelhardt | ee3228a | 2008-06-23 11:37:08 +0200 | [diff] [blame] | 58 | AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) |
| 59 | AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 60 | |
| 61 | 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] | 62 | -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \ |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 63 | -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ |
Jan Engelhardt | 8b7c64d | 2008-04-15 11:48:25 +0200 | [diff] [blame] | 64 | -Winline -pipe \ |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 65 | -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL"; |
Jan Engelhardt | ca7cd66 | 2008-02-11 01:23:01 +0100 | [diff] [blame] | 66 | kinclude_CFLAGS=""; |
| 67 | if [[ -n "$kbuilddir" ]]; then |
| 68 | kinclude_CFLAGS="$kinclude_CFLAGS -I $kbuilddir/include"; |
| 69 | fi; |
| 70 | if [[ -n "$ksourcedir" ]]; then |
| 71 | kinclude_CFLAGS="$kinclude_CFLAGS -I $ksourcedir/include"; |
| 72 | fi; |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 73 | |
Jan Engelhardt | b95fc08 | 2008-04-15 09:13:17 +0200 | [diff] [blame] | 74 | AC_SUBST([regular_CFLAGS]) |
| 75 | AC_SUBST([kinclude_CFLAGS]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 76 | AC_SUBST([kbuilddir]) |
| 77 | AC_SUBST([ksourcedir]) |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 78 | AC_SUBST([xtlibdir]) |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 79 | AC_SUBST([pkgconfigdir]) |
Jan Engelhardt | dacafa5 | 2009-01-27 20:56:23 +0100 | [diff] [blame] | 80 | AC_SUBST([libxtables_vcurrent]) |
| 81 | AC_SUBST([libxtables_vage]) |
| 82 | libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage)); |
| 83 | AC_SUBST([libxtables_vmajor]) |
Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 84 | |
Jan Engelhardt | f567ac9 | 2009-02-12 15:01:37 +0100 | [diff] [blame] | 85 | AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile |
| 86 | libipq/Makefile |
Jan Engelhardt | 51bc836 | 2009-02-11 16:40:29 +0100 | [diff] [blame] | 87 | include/xtables.h include/iptables/internal.h libiptc.pc xtables.pc]) |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 88 | AC_OUTPUT |