KERNEL=2.4.26
ROOTDIR=`cd ../app && pwd`
KERNELDIR=`cd ../linux-$KERNEL && pwd`

if test -z $ROOTDIR ; then
	echo Error in ROOTDIR
	exit 1
fi

if test -z $KERNELDIR ; then
	echo Error in KERNELDIR
	exit 1
fi

# This script cannot be used for the alsa-library. It requires
# equal compilation and execution prefix (tested with a 0.9 version).
# You cannot compile with --prefix=$ROOT/usr and run with --prefix=/usr

./configure --prefix=$ROOTDIR/usr \
	--with-kernel=$KERNELDIR \
	--with-build=$KERNELDIR \
	--with-moddir=$ROOTDIR/lib/modules/$KERNEL/kernel/misc

make
make install

# Remove the installed include
rm -r $ROOTDIR/usr/include

