summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh51
1 files changed, 29 insertions, 22 deletions
diff --git a/autogen.sh b/autogen.sh
index d8535886a1..0481d71613 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,32 +1,39 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -rf autom4te.cache 3test -n "$srcdir" || srcdir=`dirname "$0"`
4rm -f aclocal.m4 ltmain.sh 4test -n "$srcdir" || srcdir=.
5(
6 cd "$srcdir" &&
7 (
8 rm -rf autom4te.cache
9 rm -f aclocal.m4 ltmain.sh
5 10
6autoreconf -vif 11 autoreconf -vif
12 )
7 13
8W=0 14 W=0
9 15
10rm -f config.cache-env.tmp 16 rm -f config.cache-env.tmp
11echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp 17 echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
12echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp 18 echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
13echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp 19 echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
14echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp 20 echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
15echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp 21 echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
16 22
17cmp config.cache-env.tmp config.cache-env >> /dev/null 23 cmp config.cache-env.tmp config.cache-env >> /dev/null
18if [ $? -ne 0 ]; then 24 if [ $? -ne 0 ]; then
19 W=1; 25 W=1;
20fi 26 fi
21 27
22if [ $W -ne 0 ]; then 28 if [ $W -ne 0 ]; then
23 echo "Cleaning configure cache..."; 29 echo "Cleaning configure cache...";
24 rm -f config.cache config.cache-env 30 rm -f config.cache config.cache-env
25 mv config.cache-env.tmp config.cache-env 31 mv config.cache-env.tmp config.cache-env
26else 32 else
27 rm -f config.cache-env.tmp 33 rm -f config.cache-env.tmp
28fi 34 fi
35)
29 36
30if [ -z "$NOCONFIGURE" ]; then 37if [ -z "$NOCONFIGURE" ]; then
31 exec ./configure -C "$@" 38 exec $srcdir/configure -C "$@"
32fi 39fi