From 34d95f7df2fa4252766f42ed5f50c5f2828080d1 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Tue, 29 Jan 2008 13:32:07 +0000 Subject: [PATCH]: Give preference to iptables header files 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 --- Makefile.am | 5 ++++- configure.ac | 6 +++--- extensions/GNUmakefile.in | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 17c78a7..a0f33c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index 3314df4..e616329 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in index 29a8ca6..1521a33 100644 --- a/extensions/GNUmakefile.in +++ b/extensions/GNUmakefile.in @@ -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 $<; -- cgit v1.2.3