summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-12 09:10:34 +0100
committerGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-12 09:10:34 +0100
commitbe52045f38cae47545abf927fd0038cd5d5202f8 (patch)
tree11d7a09f8b56c02c011782d133b3109118f26b10 /autogen.sh
parent7f52bcb2d804a2f6df924f0174ef106362c55533 (diff)
Changing build a bit
But a rewrite will be needed to get it clearer and faster.
Diffstat (limited to '')
-rwxr-xr-xautogen.sh41
1 files changed, 37 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 6a54b9b..aaaa004 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,8 +1,41 @@
1#!/bin/sh 1#!/bin/sh
2 2
3mkdir m4 2>/dev/null 1>&2 3#!/bin/sh
4
5rm -rf autom4te.cache
6rm -f aclocal.m4 ltmain.sh
7
8touch README
9touch ABOUT-NLS
10
11echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
12echo "Running autoconf..." ; autoconf || exit 1
13echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
14echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
15
16W=0
17
18rm -f config.cache-env.tmp
19echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp
20echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp
21echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp
22echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp
23echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp
4 24
5autoreconf -f -i 25cmp config.cache-env.tmp config.cache-env >> /dev/null
6if [ $? -eq 0 ]; then 26if [ $? -ne 0 ]; then
7 ./configure 27 W=1;
8fi 28fi
29
30if [ $W -ne 0 ]; then
31 echo "Cleaning configure cache...";
32 rm -f config.cache config.cache-env
33 mv config.cache-env.tmp config.cache-env
34else
35 rm -f config.cache-env.tmp
36fi
37
38if [ -z "$NOCONFIGURE" ]; then
39 ./configure -C "$@"
40fi
41