X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=autogen.sh;h=57c35323d0bf70a35ee0c10526ed3872de6751ed;hb=cb3bfb15518b26e25c36b28c3bce7ba51738ce11;hp=4999b584d288d54fdf50f14f7cc7ba68128865fb;hpb=2f2a70695fe8b1998d0a252ff2c2dda54e6d89b9;p=platform%2Fupstream%2Flibnetfilter_queue.git diff --git a/autogen.sh b/autogen.sh index 4999b58..57c3532 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,17 +1,39 @@ -#!/bin/sh +#!/bin/sh -e -run () +include () { - echo "running: $*" - eval $* + # 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. - if test $? != 0 ; then - echo "error: while running '$*'" - exit 1 + INCLUDEDIR=${KERNEL_DIR:-/lib/modules/`uname -r`/build}/include/linux + if [ -f $INCLUDEDIR/netfilter/nfnetlink_queue.h ] + then + TARGET=include/libnetfilter_queue/linux_nfnetlink_queue.h + echo "Copying nfnetlink_queue.h to linux_nfnetlink_queue.h" + cp $INCLUDEDIR/netfilter/nfnetlink_queue.h $TARGET + TEMP=`tempfile` + sed 's/linux\/netfilter\/nfnetlink.h/libnfnetlink\/linux_nfnetlink.h/g' $TARGET > $TEMP + # Add aligned_u64 definition after #define _NFNETLINK_QUEUE_H + awk '{ + if ( $0 == "#define _NFNETLINK_QUEUE_H" ) { + print $0 + getline + print $0 + print "#ifndef aligned_u64" + print "#define aligned_u64 unsigned long long __attribute__((aligned(8)))" + print "#endif" + } + + print $0 + }' $TEMP > $TARGET + else + echo "can't find nfnetlink_queue.h kernel file in $INCLUDEDIR" + exit 1 fi } -run aclocal-1.6 -#run autoheader -run automake-1.6 -a -run autoconf +[ "x$1" = "xdistrib" ] && include +autoreconf -fi +rm -Rf autom4te.cache