autogen.sh 1.23 KB
Newer Older
aymeric's avatar
aymeric committed
1
#!/bin/sh
jehan's avatar
jehan committed
2
#AM_VERSION="1.10"
aymeric's avatar
aymeric committed
3
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
smorlat's avatar
smorlat committed
4
	# automake-1.10 (recommended) is not available on Fedora 8
aymeric's avatar
aymeric committed
5 6 7 8 9 10 11
	AUTOMAKE=automake
	ACLOCAL=aclocal
else
	ACLOCAL=aclocal-${AM_VERSION}
	AUTOMAKE=automake-${AM_VERSION}
fi

Aymeric Moizard's avatar
Aymeric Moizard committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
libtoolize="libtoolize"
for lt in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do
        if test -x /usr/bin/$lt ; then
                libtoolize=$lt ; break
        fi
        if test -x /usr/local/bin/$lt ; then
                libtoolize=$lt ; break
        fi
        if test -x /opt/local/bin/$lt ; then
                libtoolize=$lt ; break
        fi
done
AUTOMAKE_FLAGS=""
case $libtoolize in
*glibtoolize)
	AUTOMAKE_FLAGS="-i"
	;;
esac

smorlat's avatar
smorlat committed
31 32 33
if test -d /opt/local/share/aclocal ; then
        ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi
unknown's avatar
unknown committed
34 35 36 37 38 39 40 41 42 43
if test -d /opt/local/share/aclocal ; then
	ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi
if test -d /usr/local/share/aclocal ; then
	ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal"
fi

if test -d /share/aclocal ; then
        ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
fi
smorlat's avatar
smorlat committed
44 45


aymeric's avatar
aymeric committed
46 47
set -x
rm -rf config.cache autom4te.cache
Aymeric Moizard's avatar
Aymeric Moizard committed
48
$libtoolize --copy --force
smorlat's avatar
smorlat committed
49
$ACLOCAL $ACLOCAL_ARGS
aymeric's avatar
aymeric committed
50
autoheader
Aymeric Moizard's avatar
Aymeric Moizard committed
51
$AUTOMAKE --add-missing --copy  ${AUTOMAKE_FLAGS}
aymeric's avatar
aymeric committed
52
autoconf
smorlat's avatar
smorlat committed
53