blob: af6c0a4b2889642777570f7979f9af9ebd41ff3b [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
Reid Spencerf20856d2005-02-24 18:42:34 +000022 die "Can't find the LLVM autoconf/m4 directory. The project should be checked out to projects directory"
Reid Spencer38fd88a2005-01-05 06:41:10 +000023fi
24echo "Regenerating aclocal.m4 with aclocal"
25rm -f aclocal.m4
Reid Spencerf20856d2005-02-24 18:42:34 +000026aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed"
Reid Spencer38fd88a2005-01-05 06:41:10 +000027echo "Regenerating configure with autoconf 2.5x"
Reid Spencerf20856d2005-02-24 18:42:34 +000028autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed"
Reid Spencer38fd88a2005-01-05 06:41:10 +000029cd ..
30exit 0