autogen.sh 991 Bytes
Newer Older
1 2 3
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

gsell's avatar
gsell committed
4
ACLOCAL_FLAGS="-I m4 -I . $ACLOCAL_FLAGS"
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 40 41 42 43 44 45 46 47 48
LIBTOOLIZE_FLAGS="--force $LIBTOOLIZE_FLAGS"
AUTOMAKE_FLAGS="--add-missing --copy --foreign $AUTOMAKE_FLAGS"

LIBTOOLIZE=`which libtoolize`
if [ "$LIBTOOLIZE" = "" ]; then
        LIBTOOLIZE=`which glibtoolize`
fi
if [ "$LIBTOOLIZE" = "" ]; then
        echo "libtoolize not found" 1>&2
        exit 1
fi

echo "+ making misc files ..."
touch NEWS README AUTHORS ChangeLog
echo
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || {
	echo "libtoolize failed"
	exit 1
}
echo
echo "+ running aclocal ..."
aclocal $ACLOCAL_FLAGS || {
	echo "aclocal failed - check that all needed development files are present on system"
	exit 1
}
echo
echo "+ running autoheader ... "
autoheader || {
	echo "autoheader failed"
	exit 1
}
echo
echo "+ running autoconf ... "
autoconf || {
	echo "autoconf failed"
	exit 1
}
echo
echo "+ running automake ... "
automake $AUTOMAKE_FLAGS || {
	echo "automake failed"
	exit 1
}