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

Ghislain MARY's avatar
Ghislain MARY committed
3 4 5 6 7 8
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

THEDIR=`pwd`
cd $srcdir

jehan's avatar
jehan committed
9
#AM_VERSION="1.10"
aymeric's avatar
aymeric committed
10
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
smorlat's avatar
smorlat committed
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

smorlat's avatar
smorlat committed
19 20 21 22 23 24
if test -f /opt/local/bin/glibtoolize ; then
        # darwin
        LIBTOOLIZE=/opt/local/bin/glibtoolize
else
        LIBTOOLIZE=libtoolize
fi
25

smorlat's avatar
smorlat committed
26 27 28 29
if test -d /opt/local/share/aclocal ; then
        ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi

30 31 32 33
if test -d /share/aclocal ; then
        ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
fi

34
INTLTOOLIZE=$(which intltoolize)
smorlat's avatar
smorlat committed
35

aymeric's avatar
aymeric committed
36 37
echo "Generating build scripts in linphone..."
set -x
smorlat's avatar
smorlat committed
38
$LIBTOOLIZE --copy --force
39

40
$INTLTOOLIZE -c --force --automake
smorlat's avatar
smorlat committed
41 42
$ACLOCAL -I m4 $ACLOCAL_ARGS
autoheader
43
$AUTOMAKE --force-missing --add-missing --copy
aymeric's avatar
aymeric committed
44 45
autoconf

Ghislain MARY's avatar
Ghislain MARY committed
46 47 48 49 50 51
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
52

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

cd $THEDIR