autogen.sh 1.05 KB
Newer Older
aymeric's avatar
aymeric committed
1
#!/bin/sh
Ghislain MARY's avatar
Ghislain MARY committed
2 3 4 5 6 7 8

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

THEDIR=`pwd`
cd $srcdir

9
#AM_VERSION="1.10"
aymeric's avatar
aymeric committed
10
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
11
	# automake-1.10 (recommended) is not available on Fedora 8
aymeric's avatar
aymeric committed
12 13 14 15 16 17 18
	AUTOMAKE=automake
	ACLOCAL=aclocal
else
	ACLOCAL=aclocal-${AM_VERSION}
	AUTOMAKE=automake-${AM_VERSION}
fi

19 20 21 22 23 24 25 26 27 28 29 30 31
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

unknown's avatar
unknown committed
32 33 34 35 36 37 38
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
39 40


aymeric's avatar
aymeric committed
41 42
set -x
rm -rf config.cache autom4te.cache
43
$libtoolize --copy --force
Yann Diorcet's avatar
Yann Diorcet committed
44
$ACLOCAL -I m4 $ACLOCAL_ARGS
aymeric's avatar
aymeric committed
45
autoheader
46
$AUTOMAKE --force-missing --add-missing --copy  
aymeric's avatar
aymeric committed
47
autoconf
48

Ghislain MARY's avatar
Ghislain MARY committed
49
cd $THEDIR