src: add new GSO handling capabilities
[platform/upstream/libnetfilter_queue.git] / autogen.sh
index c20a2de..57c3532 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 include ()
 {
@@ -7,7 +7,7 @@ include ()
     # the headers that we need from the lastest kernel version at autogen
     # stage.
 
-    INCLUDEDIR=/lib/modules/`uname -r`/build/include/linux
+    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
@@ -29,25 +29,11 @@ include ()
        print $0
        }' $TEMP > $TARGET
     else
-       echo "can't find nfnetlink_queue.h kernel file"
+       echo "can't find nfnetlink_queue.h kernel file in $INCLUDEDIR"
        exit 1
     fi
 }
 
-run ()
-{
-    echo "running: $*"
-    eval $*
-
-    if test $? != 0 ; then
-       echo "error: while running '$*'"
-       exit 1
-    fi
-}
-
-include
-run libtoolize
-run aclocal
-#run autoheader
-run automake -a
-run autoconf
+[ "x$1" = "xdistrib" ] && include
+autoreconf -fi
+rm -Rf autom4te.cache