blob: 2655f21dc01348a253adc1c84d2e81609546b2c0 [file] [log] [blame]
Reid Spencer38fd88a2005-01-05 06:41:10 +00001#!/bin/sh
2die () {
3 echo "$@" 1>&2
4 exit 1
5}
6test -d autoconf && test -f autoconf/configure.ac && cd autoconf
7test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first"
8autoconf --version | egrep '2\.5[0-9]' > /dev/null
9if test $? -ne 0 ; then
10 die "Your autoconf was not detected as being 2.5x"
11fi
12cwd=`pwd`
13if test -d ../../../autoconf/m4 ; then
14 cd ../../../autoconf/m4
15 llvm_m4=`pwd`
16 cd $cwd
17elif test -d ../../llvm/autoconf/m4 ; then
18 cd ../../llvm/autoconf/m4
19 llvm_m4=`pwd`
20 cd $cwd
21else
22 die "Can't find the LLVM autoconf/m4 directory. llvm-test should be checked out to projects directory"
23fi
24echo "Regenerating aclocal.m4 with aclocal"
25rm -f aclocal.m4
26aclocal -I $cwd/m4 -I $llvm_m4 || die "aclocal failed"
27echo "Regenerating configure with autoconf 2.5x"
28autoconf --force --warnings=all -o ../configure configure.ac || die "autoconf failed"
29cd ..
30exit 0