about summary refs log tree commit diff homepage
path: root/autoconf/AutoRegen.sh
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2012-07-26 18:22:51 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2012-07-26 18:22:51 +0000
commit9e5892c86a0ca40c95da95d6fbca3c1944756450 (patch)
tree3a7322ab7ab72fa05ddc0800f8de90ddeaac9386 /autoconf/AutoRegen.sh
parent83b525946406ff3751182b2c0c54905f455e0f16 (diff)
downloadklee-9e5892c86a0ca40c95da95d6fbca3c1944756450.tar.gz
Patch by Dan Liew: "Improved AutoRegen script so that it supports newer versions of autoconf"
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@160793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/AutoRegen.sh')
-rwxr-xr-xautoconf/AutoRegen.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/autoconf/AutoRegen.sh b/autoconf/AutoRegen.sh
index 4a34f8c0..8fed1141 100755
--- a/autoconf/AutoRegen.sh
+++ b/autoconf/AutoRegen.sh
@@ -15,27 +15,41 @@ die () {
 }
 test -d autoconf && test -f autoconf/configure.ac && cd autoconf
 test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first"
-autoconf --version | egrep '2\.60' > /dev/null
+
+#grab autoconf version from the first line of autoconf output
+ac_version=`autoconf --version | sed -n 1p`
+
+echo "$ac_version" | egrep '2\.6[0-9]' > /dev/null
 if test $? -ne 0 ; then
-  die "Your autoconf was not detected as being 2.60"
+  die "Your autoconf was not detected as being 2.6[0-9]. Reported version $ac_version"
 fi
+
 # Patch LLVM_SRC_ROOT in configure.ac
 sed -e "s#^LLVM_SRC_ROOT=.*#LLVM_SRC_ROOT=\"$llvm_src_root\"#" \
     configure.ac > configure.tmp.ac
+
 echo "Regenerating aclocal.m4 with aclocal"
 rm -f aclocal.m4
 echo aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed"
 aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed"
-echo "Regenerating configure with autoconf 2.60"
+
+# Run autoconf
+echo "Regenerating configure with $ac_version"
 echo autoconf --warnings=all -o ../configure configure.tmp.ac || die "autoconf failed"
 autoconf --warnings=all -o ../configure configure.tmp.ac || die "autoconf failed"
 cp ../configure ../configure.bak
+
+#patch final configure file
 sed -e "s#^LLVM_SRC_ROOT=.*#LLVM_SRC_ROOT=\".\"#" \
     ../configure.bak > ../configure
 cd ..
+
+#Generate header
 echo "Regenerating config.h.in with autoheader"
 autoheader --warnings=all \
     -I autoconf -I autoconf/m4 \
     autoconf/configure.tmp.ac || die "autoheader failed"
+
+#clean up
 rm -f autoconf/configure.tmp.ac configure.bak
 exit 0