autogen.sh 963 Bytes
Newer Older
1
#!/bin/bash
Tiago Peixoto's avatar
Tiago Peixoto committed
2 3 4
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
Tiago Peixoto's avatar
Tiago Peixoto committed
5
test -z "$srcdir" && srcdir=.
Tiago Peixoto's avatar
Tiago Peixoto committed
6

Tiago Peixoto's avatar
Tiago Peixoto committed
7
PROJECT="graph-tool"
Tiago Peixoto's avatar
Tiago Peixoto committed
8

Tiago Peixoto's avatar
Tiago Peixoto committed
9 10 11 12
(test -f $srcdir/configure.ac) || {
    echo -n "**Error**: Directory \"\'$srcdir\'\" does not look like the"
    echo " top-level package directory"
    exit 1
Tiago Peixoto's avatar
Tiago Peixoto committed
13 14
}

15 16
AUTOGEN_SUBDIR_MODE="foo"

Tiago Peixoto's avatar
Tiago Peixoto committed
17 18 19 20 21
if test -z "$AUTOGEN_SUBDIR_MODE"; then
    if test -z "$*"; then
        echo "I am going to run ./configure with no arguments - if you wish "
        echo "to pass any to it, please specify them on the $0 command line."
    fi
Tiago Peixoto's avatar
Tiago Peixoto committed
22 23
fi

24
aclocal -I m4 || exit $?
Tiago Peixoto's avatar
Tiago Peixoto committed
25
autoheader || exit $?
26 27 28 29 30
if [ `type -P libtoolize` ]; then
    libtoolize -f || exit $?
else
    glibtoolize -f || exit $?
fi
Tiago Peixoto's avatar
Tiago Peixoto committed
31 32
automake --add-missing --copy || exit $?
autoconf || exit $?
Tiago Peixoto's avatar
Tiago Peixoto committed
33

Tiago Peixoto's avatar
Tiago Peixoto committed
34 35
if test -z "$AUTOGEN_SUBDIR_MODE"; then
    $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
Tiago Peixoto's avatar
Tiago Peixoto committed
36

37
    echo
Tiago Peixoto's avatar
Tiago Peixoto committed
38
    echo "Now type 'make' to compile $PROJECT."
Tiago Peixoto's avatar
Tiago Peixoto committed
39
fi