]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Give preference to iptables header files
authorJan Engelhardt <jengelh@medozas.de>
Tue, 29 Jan 2008 13:32:07 +0000 (13:32 +0000)
committerPatrick McHardy <kaber@trash.net>
Tue, 29 Jan 2008 13:32:07 +0000 (13:32 +0000)
Have the header files in the iptables source tree take precedence
over those from the kernel source. Otherwise, building the current
iptables from subversion just fails with kernels < 2.6.25.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Makefile.am
configure.ac
extensions/GNUmakefile.in

index 17c78a7cffbd2c188140bef01355ede57c100746..a0f33c62ba38a5860aed416c33a7b7e4a3a69859 100644 (file)
@@ -1,7 +1,10 @@
 # -*- Makefile -*-
 
 AUTOMAKE_OPTIONS = foreign subdir-objects
-AM_CFLAGS        = ${regular_CFLAGS} -I${top_srcdir}/include
+
+regular_CFLAGS  := @regular_CFLAGS@
+kinclude_CFLAGS := @kinclude_CFLAGS@
+AM_CFLAGS        = ${regular_CFLAGS} -I${top_srcdir}/include ${kinclude_CFLAGS}
 SUBDIRS         := extensions
 if ENABLE_DEVEL
 SUBDIRS         += libipq
index 3314df40b5469811a6fbee235add706f5c11011f..e616329775fba351d7c27bb4ae1d72040ea071a1 100644 (file)
@@ -40,15 +40,15 @@ regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
        -D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
        -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
        -Winline -pipe -DIPTABLES_VERSION=\\\"$PACKAGE_VERSION\\\" \
-       -DIPT_LIB_DIR=\\\"\${iptdir}\\\" \
-       -I\"$kbuilddir/include\" -I\"$ksourcedir/include\""
+       -DIPT_LIB_DIR=\\\"\${iptdir}\\\"";
+kinclude_CFLAGS="-I\"$kbuilddir/include\" -I\"$ksourcedir/include\"";
 
 # Remove workarounds soon
 regular_CFLAGS="$regular_CFLAGS -Wno-aggregate-return \
        -Wno-missing-declarations -Wno-missing-prototypes \
        -Wno-redundant-decls -Wno-shadow -Wno-strict-prototypes -Wno-inline"
 
-AC_SUBST([regular_CFLAGS])
+AC_SUBST([regular_CFLAGS kinclude_CFLAGS])
 AC_SUBST([kbuilddir])
 AC_SUBST([ksourcedir])
 AC_SUBST([iptdir])
index 29a8ca62eebe42e798bb5d1d695ddebcd66bc90d..1521a3300704da76d9902ee31726451e85a38824 100644 (file)
@@ -14,8 +14,9 @@ CCLD           := ${CC}
 CFLAGS         := @CFLAGS@
 LDFLAGS        := @LDFLAGS@
 regular_CFLAGS := @regular_CFLAGS@
+kinclude_CFLAGS := @kinclude_CFLAGS@
 
-AM_CFLAGS      := ${regular_CFLAGS} -I${top_srcdir}/include
+AM_CFLAGS      := ${regular_CFLAGS} -I${top_srcdir}/include ${kinclude_CFLAGS}
 AM_DEPFLAGS     = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
 
 ifeq (${V},)
@@ -88,7 +89,7 @@ clean:
        rm -f *.o *.oo *.so *.a {matches,targets}[46].man initext4.c initext6.c;
 
 distclean: clean
-       rm -f .*.d *.dd;
+       rm -f .*.d .*.dd;
 
 %.o: %.c
        ${AM_VERBOSE_CC} ${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;