autogen.sh 1.33 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

smorlat's avatar
smorlat committed
if test -f /opt/local/bin/glibtoolize ; then
        # darwin
        LIBTOOLIZE=/opt/local/bin/glibtoolize
else
        LIBTOOLIZE=libtoolize
fi
smorlat's avatar
smorlat committed
if test -d /opt/local/share/aclocal ; then
        ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi

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

INTLTOOLIZE=$(which intltoolize)
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

aymeric's avatar
aymeric committed
echo "Generating build scripts in linphone..."
set -x
smorlat's avatar
smorlat committed
$LIBTOOLIZE --copy --force
$INTLTOOLIZE -c --force --automake
smorlat's avatar
smorlat committed
$ACLOCAL -I m4 $ACLOCAL_ARGS
autoheader
$AUTOMAKE --force-missing --add-missing --copy
aymeric's avatar
aymeric committed
autoconf

Ghislain MARY's avatar
Ghislain MARY committed
set +x
if [ "$srcdir" = "." ]; then
	if [ -x oRTP/autogen.sh ]; then
		echo "Generating build scripts in oRTP..."
		( cd oRTP && ./autogen.sh )
	fi
aymeric's avatar
aymeric committed

Ghislain MARY's avatar
Ghislain MARY committed
	if [ -x mediastreamer2/autogen.sh ]; then
		echo "Generating build scripts in mediastreamer2..."
		( cd mediastreamer2 && ./autogen.sh )
	fi
Ghislain MARY's avatar
Ghislain MARY committed

cd $THEDIR