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

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

Simon Morlat's avatar
Simon Morlat committed
19 20 21 22 23 24 25 26 27
INTLTOOLIZE=/usr/bin/intltoolize

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


28 29 30 31 32 33 34 35 36 37 38 39
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
40

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

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

aymeric's avatar
aymeric committed
49 50
echo "Generating build scripts in mediastreamer..."
set -x
51
$libtoolize --copy --force
Simon Morlat's avatar
Simon Morlat committed
52
$INTLTOOLIZE --copy --force --automake
Yann Diorcet's avatar
Yann Diorcet committed
53
$ACLOCAL -I m4 $ACLOCAL_ARGS
54
autoheader
55
$AUTOMAKE --force-missing --add-missing --copy
aymeric's avatar
aymeric committed
56
autoconf
57 58

cd $THEDIR