autogen.sh 909 Bytes
Newer Older
Owen Taylor's avatar
Owen Taylor committed
1 2 3
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

4 5
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
6

7 8
olddir=`pwd`
cd "$srcdir"
9

10
if ! command -v gtkdocize >/dev/null 2>&1; then
11 12
        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
        rm -f gtk-doc.make
13 14 15 16
        cat > gtk-doc.make <<EOF
EXTRA_DIST =
CLEANFILES =
EOF
17 18
else
        gtkdocize || exit $?
Owen Taylor's avatar
Owen Taylor committed
19 20
fi

21
if ! command -v autoreconf >/dev/null 2>&1; then
22 23
        echo "*** No autoreconf found, please install it ***"
        exit 1
Owen Taylor's avatar
Owen Taylor committed
24 25
fi

26 27 28 29
# INSTALL is required by automake, but may be deleted by clean
# up rules. to get automake to work, simply touch it here. It will be
# regenerated from its corresponding *.in file by ./configure anyway.
touch INSTALL
30

31
autoreconf --force --install --verbose || exit $?
Tim Janik's avatar
Tim Janik committed
32

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