autogen.sh 935 Bytes
Newer Older
Tiago Peixoto's avatar
Tiago Peixoto committed
1
2
3
4
#!/bin/sh
# 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
}

Tiago Peixoto's avatar
Tiago Peixoto committed
15
16
17
18
19
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
20
21
fi

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

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

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