Blame autogen.sh

Packit 228f82
#!/bin/sh
Packit 228f82
# Run this to generate all the initial makefiles, etc.
Packit 228f82
Packit 228f82
PROJECT=lasso
Packit 228f82
TEST_TYPE=-f
Packit 228f82
FILE=lasso.pc.in
Packit 228f82
Packit 228f82
# a silly hack that generates autoregen.sh but it's handy
Packit 228f82
echo "#!/bin/sh" > autoregen.sh
Packit 228f82
echo "./autogen.sh $@ \$@" >> autoregen.sh
Packit 228f82
chmod +x autoregen.sh
Packit 228f82
Packit 228f82
DIE=0
Packit 228f82
Packit 228f82
srcdir=`dirname $0`
Packit 228f82
test -z "$srcdir" && srcdir=.
Packit 228f82
Packit 228f82
THEDIR="`pwd`"
Packit 228f82
Packit 228f82
cd "$srcdir"
Packit 228f82
Packit 228f82
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
Packit 228f82
	echo
Packit 228f82
	echo "You must have autoconf installed to compile $PROJECT."
Packit 228f82
	echo "Download the appropriate package for your distribution,"
Packit 228f82
	echo "or get the source tarball at ftp://ftp.gnu.org/gnu/autoconf/"
Packit 228f82
	DIE=1
Packit 228f82
}
Packit 228f82
Packit 228f82
if automake-1.16 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.16
Packit 228f82
    ACLOCAL=aclocal-1.16
Packit 228f82
elif automake-1.15 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.15
Packit 228f82
    ACLOCAL=aclocal-1.15
Packit 228f82
elif automake-1.14 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.14
Packit 228f82
    ACLOCAL=aclocal-1.14
Packit 228f82
elif automake-1.13 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.13
Packit 228f82
    ACLOCAL=aclocal-1.13
Packit 228f82
elif automake-1.12 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.12
Packit 228f82
    ACLOCAL=aclocal-1.12
Packit 228f82
elif automake-1.11 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.11
Packit 228f82
    ACLOCAL=aclocal-1.11
Packit 228f82
elif automake-1.10 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.10
Packit 228f82
    ACLOCAL=aclocal-1.10
Packit 228f82
elif automake-1.9 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.9
Packit 228f82
    ACLOCAL=aclocal-1.9
Packit 228f82
elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.8
Packit 228f82
    ACLOCAL=aclocal-1.8
Packit 228f82
elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.7
Packit 228f82
    ACLOCAL=aclocal-1.7
Packit 228f82
elif automake-1.6 --version < /dev/null > /dev/null 2>&1; then
Packit 228f82
    AUTOMAKE=automake-1.6
Packit 228f82
    ACLOCAL=aclocal-1.6
Packit 228f82
else
Packit 228f82
	echo
Packit 228f82
	echo "You must have automake installed to compile $PROJECT."
Packit 228f82
	echo "Download the appropriate package for your distribution,"
Packit 228f82
	echo "or get the source tarball at ftp://ftp.gnu.org/gnu/automake/"
Packit 228f82
	DIE=1
Packit 228f82
fi
Packit 228f82
Packit 228f82
if test "$DIE" -eq 1; then
Packit 228f82
	exit 1
Packit 228f82
fi
Packit 228f82
Packit 228f82
test $TEST_TYPE $FILE || {
Packit 228f82
	echo "You must run this script in the top-level $PROJECT directory"
Packit 228f82
	exit 1
Packit 228f82
}
Packit 228f82
Packit 228f82
if test "$#" = 0; then
Packit 228f82
	echo "I am going to run ./configure with no arguments - if you wish "
Packit 228f82
        echo "to pass any to it, please specify them on the $0 command line."
Packit 228f82
fi
Packit 228f82
Packit 228f82
# to support timj aclocal setup we are shipping gnome-doc-utils.m4
Packit 228f82
# and making sure automake picks it up ;)
Packit 228f82
# this is bad as -I prepends to the search path
Packit 228f82
echo "* Running libtoolize"
Packit 228f82
libtoolize --copy --force
Packit 228f82
Packit 228f82
GTKDOCIZE=`which gtkdocize`
Packit 228f82
if test -z $GTKDOCIZE; then
Packit 228f82
        echo "You don't have gtk-doc installed, and thus"
Packit 228f82
        echo "won't be able to generate the documentation."
Packit 228f82
        touch gtk-doc.make
Packit 228f82
else
Packit 228f82
        echo "* Running gtkdocize"
Packit 228f82
        $GTKDOCIZE --flavour no-tmpl || exit $?
Packit 228f82
fi
Packit 228f82
Packit 228f82
echo "* Running $ACLOCAL"
Packit 228f82
$ACLOCAL $ACLOCAL_FLAGS -I m4 || exit $?
Packit 228f82
Packit 228f82
echo "* Running autoconf"
Packit 228f82
autoconf || exit $?
Packit 228f82
(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
Packit 228f82
Packit 228f82
echo "* Running $AUTOMAKE"
Packit 228f82
$AUTOMAKE --add-missing -Wno-portability $am_opt || exit $?
Packit 228f82
Packit 228f82
cd "$THEDIR"
Packit 228f82
Packit 228f82
if [ "$1" != "noconfig" ]; then
Packit 228f82
	$srcdir/configure --enable-gtk-doc --enable-maintainer-mode "$@" || exit $?
Packit 228f82
fi
Packit 228f82
Packit 228f82
echo
Packit 228f82
echo "Now type 'make install' to install $PROJECT."