summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: defc542c41e96d9d6c189344bed21349098a4e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

if test "z$1" = "z--clean"; then
    echo "Cleaning"

    rm -Rf autom4te.cache
    rm -f missing install-sh mkinstalldirs libtool ltmain.sh
    exit 1;
fi

requote_args ()
{
    sed -r -e 's/.*configure //' -e 's/(["'"'"'])/\\\1/g' -e 's/=(([^"'"'"'-]|-[^-]| )*)( |$)/="\1" /g'
}

old_args=""
if test $# -eq 0 && test -f config.log; then
    old_args=`grep '\$ ./configure' config.log | requote_args`
    echo "re-using arguments from last configure: $old_args";
fi

touch ChangeLog

aclocal $ACLOCAL_FLAGS || exit 1;
#automake --gnu --add-missing --copy || exit 1;
#intltoolize --copy --force --automake
autoconf || exit 1;
if test "x$NOCONFIGURE" = "x"; then
    if test -n "$old_args" ; then
        eval `echo ./configure $old_args`
    else
        ./configure "$@"
    fi
else
    echo "Skipping configure process."
fi