From e7468c43a5bca2c8bb5fa919c4732810285ae926 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=laforge/emailAddress=laforge@netfilter.org" Date: Mon, 14 Nov 2005 14:50:30 +0000 Subject: This patch add the ability to copy and mangle the kernel headers required by libnfnetlink and libnetfilter_[queue|log|conntrack] at autogen.sh stage. (Pablo Neira) --- autogen.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/autogen.sh b/autogen.sh index e76d3ef..f02f23a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,27 @@ #!/bin/sh +include () +{ + # If we keep a copy of the kernel header in the SVN tree, we'll have + # to worry about synchronization issues forever. Instead, we just copy + # the headers that we need from the lastest kernel version at autogen + # stage. + + INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux + if [ -f $INCLUDEDIR/netfilter/nfnetlink_conntrack.h ] + then + TARGET=include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h + echo "Copying nfnetlink_conntrack.h to linux_nfnetlink_conntrack.h" + cp $INCLUDEDIR/netfilter/nfnetlink_conntrack.h $TARGET + TEMP=`tempfile` + sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP + mv $TEMP $TARGET + else + echo "can't find nfnetlink_conntrack.h kernel file" + exit 1 + fi +} + run () { echo "running: $*" @@ -11,6 +33,7 @@ run () fi } +include run aclocal run libtoolize -f #run autoheader -- cgit v1.2.3