From 6e9bde2d84f0b783581262fa1f22c42f2b35881e Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 13 Feb 2014 10:13:46 +0900 Subject: [PATCH] autotools: it is useless to destroy the cache everytime and request to use it. This patch reenable configure cache and should make configure faster after a few run. --- autogen.sh | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index d265ba52df..d8535886a1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,10 +1,32 @@ #!/bin/sh rm -rf autom4te.cache -rm -f aclocal.m4 ltmain.sh config.cache +rm -f aclocal.m4 ltmain.sh autoreconf -vif +W=0 + +rm -f config.cache-env.tmp +echo "OLD_PARM=\"$@\"" >> config.cache-env.tmp +echo "OLD_CFLAGS=\"$CFLAGS\"" >> config.cache-env.tmp +echo "OLD_PATH=\"$PATH\"" >> config.cache-env.tmp +echo "OLD_PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\"" >> config.cache-env.tmp +echo "OLD_LDFLAGS=\"$LDFLAGS\"" >> config.cache-env.tmp + +cmp config.cache-env.tmp config.cache-env >> /dev/null +if [ $? -ne 0 ]; then + W=1; +fi + +if [ $W -ne 0 ]; then + echo "Cleaning configure cache..."; + rm -f config.cache config.cache-env + mv config.cache-env.tmp config.cache-env +else + rm -f config.cache-env.tmp +fi + if [ -z "$NOCONFIGURE" ]; then exec ./configure -C "$@" fi