autogen.sh 967 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
GTKDOCIZE=$(which gtkdocize 2>/dev/null)
11
if test -z $GTKDOCIZE; then
12 13
        echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
        rm -f gtk-doc.make
14 15 16 17
        cat > gtk-doc.make <<EOF
EXTRA_DIST =
CLEANFILES =
EOF
18 19
else
        gtkdocize || exit $?
Owen Taylor's avatar
Owen Taylor committed
20 21
fi

22 23 24 25
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
        echo "*** No autoreconf found, please install it ***"
        exit 1
Owen Taylor's avatar
Owen Taylor committed
26 27
fi

28 29 30 31 32
# README and INSTALL are required by automake, but may be deleted by clean
# up rules. to get automake to work, simply touch these here, they will be
# regenerated from their corresponding *.in files by ./configure anyway.
touch README INSTALL

33
autoreconf --force --install --verbose || exit $?
Tim Janik's avatar
Tim Janik committed
34

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