autogen.sh 1.36 KB
Newer Older
aymeric's avatar
aymeric committed
1 2
#!/bin/sh

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

Simon Morlat's avatar
Simon Morlat committed
13 14 15 16 17 18 19 20 21
INTLTOOLIZE=/usr/bin/intltoolize

if test -f /opt/local/bin/intltoolize ; then
INTLTOOLIZE=/opt/local/bin/intltoolize
else
INTLTOOLIZE=/usr/bin/intltoolize
fi


22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
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

41 42 43
if test -d /opt/local/share/aclocal ; then
	ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi
44
if test -d /usr/local/share/aclocal ; then
45 46 47 48 49
	ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal"
fi

if test -d /share/aclocal ; then
        ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
50
fi
51

aymeric's avatar
aymeric committed
52 53
echo "Generating build scripts in mediastreamer..."
set -x
54
$libtoolize --copy --force
Simon Morlat's avatar
Simon Morlat committed
55
$INTLTOOLIZE --copy --force --automake
56
$ACLOCAL  $ACLOCAL_ARGS
57
autoheader
58
$AUTOMAKE --force-missing --add-missing --copy ${AUTOMAKE_FLAGS}
aymeric's avatar
aymeric committed
59
autoconf
60