summaryrefslogtreecommitdiffstats
path: root/autogen.sh
blob: ac0525ddd277d38016f9f4253a3f2a0b6f7338d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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=${KERNEL_DIR:-/lib/modules/`uname -r`/build}/include/linux

    if [ -f $INCLUDEDIR/netfilter/nfnetlink.h ]
    then
    	TARGET=include/libnfnetlink/linux_nfnetlink.h
    	echo "Copying nfnetlink.h to linux_nfnetlink.h"
    	cp $INCLUDEDIR/netfilter/nfnetlink.h $TARGET
    else
    	echo "can't find nfnetlink.h kernel file in $INCLUDEDIR"
    	exit 1
    fi
}

run ()
{
    echo "running: $*"
    eval $*

    if test $? != 0 ; then
	echo "error: while running '$*'"
	exit 1
    fi
}

[ "x$1" == "xdistrib" ] && include
run aclocal
#run autoheader
run libtoolize -f
run automake -a
run autoconf