Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 1 | define([_XTABLES_VERSION_MAJOR], 1) |
| 2 | define([_XTABLES_VERSION_MINOR], 4) |
| 3 | define([_XTABLES_VERSION_PATCH], 1) |
Patrick McHardy | 73cf45b | 2008-06-16 15:12:40 +0200 | [diff] [blame] | 4 | define([_XTABLES_VERSION_EXTRA], .1) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 5 | |
Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 6 | define([_XTABLES_VERSION],_XTABLES_VERSION_MAJOR._XTABLES_VERSION_MINOR._XTABLES_VERSION_PATCH[]_XTABLES_VERSION_EXTRA) |
| 7 | |
| 8 | AC_INIT([iptables], _XTABLES_VERSION) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 9 | AC_CONFIG_HEADERS([config.h]) |
| 10 | AC_PROG_INSTALL |
| 11 | AM_INIT_AUTOMAKE |
| 12 | AC_PROG_CC |
| 13 | AM_PROG_CC_C_O |
| 14 | AC_DISABLE_STATIC |
| 15 | AC_PROG_LIBTOOL |
| 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 | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 34 | AC_ARG_ENABLE([devel], |
| 35 | AS_HELP_STRING([--enable-devel], |
Jan Engelhardt | 77f1538 | 2008-02-11 15:01:03 +0100 | [diff] [blame] | 36 | [Install Xtables development headers]), |
| 37 | [enable_devel="$enableval"], [enable_devel="yes"]) |
| 38 | AC_ARG_ENABLE([libipq], |
| 39 | AS_HELP_STRING([--enable-libipq], [Build and install libipq])) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 40 | |
| 41 | AC_CHECK_HEADER([netinet/ip6.h], [], [AC_MSG_ERROR(but we need that for IPv6)]) |
Jan Engelhardt | 2c570e7 | 2008-06-05 19:54:48 +0200 | [diff] [blame] | 42 | AC_CHECK_HEADER([linux/dccp.h]) |
| 43 | |
| 44 | blacklist_modules=""; |
| 45 | if test "$ac_cv_header_linux_dccp_h" != "yes"; then |
| 46 | blacklist_modules="$blacklist_modules dccp"; |
| 47 | fi; |
| 48 | AC_SUBST([blacklist_modules]) |
| 49 | |
Jan Engelhardt | ee3228a | 2008-06-23 11:37:08 +0200 | [diff] [blame^] | 50 | AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = "yes"]) |
| 51 | AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = "yes"]) |
| 52 | AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"]) |
| 53 | AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 54 | |
| 55 | 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] | 56 | -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \ |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 57 | -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \ |
Jan Engelhardt | 8b7c64d | 2008-04-15 11:48:25 +0200 | [diff] [blame] | 58 | -Winline -pipe \ |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 59 | -DXTABLES_LIBDIR=\\\"\${xtlibdir}\\\" -DXTABLES_INTERNAL"; |
Jan Engelhardt | ca7cd66 | 2008-02-11 01:23:01 +0100 | [diff] [blame] | 60 | kinclude_CFLAGS=""; |
| 61 | if [[ -n "$kbuilddir" ]]; then |
| 62 | kinclude_CFLAGS="$kinclude_CFLAGS -I $kbuilddir/include"; |
| 63 | fi; |
| 64 | if [[ -n "$ksourcedir" ]]; then |
| 65 | kinclude_CFLAGS="$kinclude_CFLAGS -I $ksourcedir/include"; |
| 66 | fi; |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 67 | |
Jan Engelhardt | b95fc08 | 2008-04-15 09:13:17 +0200 | [diff] [blame] | 68 | AC_SUBST([regular_CFLAGS]) |
| 69 | AC_SUBST([kinclude_CFLAGS]) |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 70 | AC_SUBST([kbuilddir]) |
| 71 | AC_SUBST([ksourcedir]) |
Jan Engelhardt | 21b41ee | 2008-02-11 01:02:00 +0100 | [diff] [blame] | 72 | AC_SUBST([xtlibdir]) |
Thomas Jarosch | c634cb9 | 2008-06-03 15:02:18 +0200 | [diff] [blame] | 73 | |
| 74 | XTABLES_VERSION_MAJOR=_XTABLES_VERSION_MAJOR |
| 75 | XTABLES_VERSION_MINOR=_XTABLES_VERSION_MINOR |
| 76 | XTABLES_VERSION_PATCH=_XTABLES_VERSION_PATCH |
| 77 | XTABLES_VERSION_EXTRA=_XTABLES_VERSION_EXTRA |
| 78 | AC_SUBST([XTABLES_VERSION_MAJOR]) |
| 79 | AC_SUBST([XTABLES_VERSION_MINOR]) |
| 80 | AC_SUBST([XTABLES_VERSION_PATCH]) |
| 81 | AC_SUBST([XTABLES_VERSION_EXTRA]) |
| 82 | |
Jan Engelhardt | 493c712 | 2008-04-15 11:15:16 +0200 | [diff] [blame] | 83 | AC_OUTPUT([Makefile extensions/GNUmakefile libipq/Makefile include/xtables.h]) |