llvm.org GIT mirror llvm / 2cf89b6
* Moved all tool version requirements to the same place * Cleaned up multiple uses of literal version numbers and simplified 'cleaning' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78932 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 11 years ago
1 changed file(s) with 22 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
None #!/bin/sh
1 die () {
0 #!/bin/bash
1
2 die() {
23 echo "$@" 1>&2
34 exit 1
45 }
56
6 ### NOTE: ############################################################"
7 ### The below two variables specify the auto* versions
8 ### periods should be escaped with backslash, for use by grep
7 clean() {
8 echo $1 | sed -e 's/\\//g'
9 }
10
11 ### NOTE: ############################################################
12 ### These variables specify the tool versions we want to use.
13 ### Periods should be escaped with backslash for use by grep.
914 want_autoconf_version='2\.60'
1015 want_autoheader_version=$want_autoconf_version
11 ### END NOTE #########################################################"
12
16 want_aclocal_version='1\.9\.6'
17 want_libtool_version='1\.5\.22'
18 ### END NOTE #########################################################
1319
1420 outfile=configure
1521 configfile=configure.ac
1622
17 want_autoconf_version_clean=`echo $want_autoconf_version | sed -e 's/\\\\//g'`
18 want_autoheader_version_clean=`echo $want_autoheader_version | sed -e 's/\\\\//g'`
23 want_autoconf_version_clean=$(clean $want_autoconf_version)
24 want_autoheader_version_clean=$(clean $want_autoheader_version)
25 want_aclocal_version_clean=$(clean $want_aclocal_version)
26 want_libtool_version_clean=$(clean $want_libtool_version)
1927
2028 test -d autoconf && test -f autoconf/$configfile && cd autoconf
2129 test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
2230 autoconf --version | grep $want_autoconf_version > /dev/null
2331 test $? -eq 0 || die "Your autoconf was not detected as being $want_autoconf_version_clean"
24 aclocal --version | grep '^aclocal.*1\.9\.6' > /dev/null
25 test $? -eq 0 || die "Your aclocal was not detected as being 1.9.6"
32 aclocal --version | grep '^aclocal.*'$want_aclocal_version > /dev/null
33 test $? -eq 0 || die "Your aclocal was not detected as being $want_aclocal_version_clean"
2634 autoheader --version | grep '^autoheader.*'$want_autoheader_version > /dev/null
2735 test $? -eq 0 || die "Your autoheader was not detected as being $want_autoheader_version_clean"
28 libtool --version | grep '1\.5\.22' > /dev/null
29 test $? -eq 0 || die "Your libtool was not detected as being 1.5.22"
36 libtool --version | grep $want_libtool_version > /dev/null
37 test $? -eq 0 || die "Your libtool was not detected as being $want_libtool_version_clean"
3038 echo ""
3139 echo "### NOTE: ############################################################"
3240 echo "### If you get *any* warnings from autoconf below you MUST fix the"
3644 echo "### present. You should get just three 'Regenerating..' lines."
3745 echo "######################################################################"
3846 echo ""
39 echo "Regenerating aclocal.m4 with aclocal 1.9.6"
47 echo "Regenerating aclocal.m4 with aclocal $want_aclocal_version_clean"
4048 cwd=`pwd`
4149 aclocal --force -I $cwd/m4 || die "aclocal failed"
4250 echo "Regenerating configure with autoconf $want_autoconf_version_clean"