autogen.sh 1.04 KB
Newer Older
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
1 2 3
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
4 5
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
6

Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
7 8
olddir=`pwd`
cd "$srcdir"
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
9

10 11 12
INTLTOOLIZE=`which intltoolize`
if test -z $INTLTOOLIZE; then
        echo "*** No intltoolize found, please install the intltool package ***"
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
13 14
        exit 1
fi
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
15

Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
16
AUTORECONF=`which autoreconf`
17 18
if test -z $AUTORECONF; then
        echo "*** No autoreconf found, please install it ***"
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
19 20
        exit 1
fi
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
21

22 23
if test -z `which autopoint`; then
        echo "*** No autopoint found, please install it ***"
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
24 25 26
        exit 1
fi

27 28 29
LIBTOOL=`which libtoolize`
if test -z $LIBTOOL; then
        echo "*** No libtool found, please install it ***"
30 31 32
        exit 1
fi

33
git submodule update --init --recursive
34

35 36 37
if [ $? != 0 ]; then
    echo "*** Failed to download submodules. Maybe you have a bad connection or a submodule was not forked?"
    exit 1
38 39
fi

40 41
autopoint --force
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
Jesse van den Kieboom's avatar
Jesse van den Kieboom committed
42 43

cd "$olddir"
44
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"