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

Ghislain MARY's avatar
Ghislain MARY committed
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

THEDIR=`pwd`
cd $srcdir

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

INTLTOOLIZE=$(which intltoolize)
Simon Morlat's avatar
Simon Morlat committed

Simon Morlat's avatar
Simon Morlat committed
#workaround for mingw bug in intltoolize script.
if test "$INTLTOOLIZE" = "/bin/intltoolize" ; then
	INTLTOOLIZE=/usr/bin/intltoolize
fi

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
if test -d /usr/local/share/aclocal ; then
	ACLOCAL_ARGS="$ACLOCAL_ARGS -I /usr/local/share/aclocal"
fi

if test -d /share/aclocal ; then
aymeric's avatar
aymeric committed
echo "Generating build scripts in mediastreamer..."
set -x
$libtoolize --copy --force
Simon Morlat's avatar
Simon Morlat committed
$INTLTOOLIZE --copy --force --automake
Yann Diorcet's avatar
Yann Diorcet committed
$ACLOCAL -I m4 $ACLOCAL_ARGS
autoheader
$AUTOMAKE --force-missing --add-missing --copy
aymeric's avatar
aymeric committed
autoconf
#install git pre-commit hooks if possible
if [ -d .git/hooks ] && [ ! -f .git/hooks/pre-commit ]; then
	cp .git-pre-commit .git/hooks/pre-commit
	chmod +x .git/hooks/pre-commit
fi

Ghislain MARY's avatar
Ghislain MARY committed
cd $THEDIR