2005-01-05 06:41:10 +00:00
|
|
|
#!/bin/sh
|
|
|
|
die () {
|
|
|
|
echo "$@" 1>&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
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"
|
2009-03-24 23:45:13 +00:00
|
|
|
autoconf --version | egrep '2\.[56][0-9]' > /dev/null
|
2005-01-05 06:41:10 +00:00
|
|
|
if test $? -ne 0 ; then
|
2009-03-24 23:45:13 +00:00
|
|
|
die "Your autoconf was not detected as being 2.5x or 2.6x"
|
2005-01-05 06:41:10 +00:00
|
|
|
fi
|
|
|
|
cwd=`pwd`
|
|
|
|
if test -d ../../../autoconf/m4 ; then
|
|
|
|
cd ../../../autoconf/m4
|
2010-12-12 21:41:56 +00:00
|
|
|
llvm_src_root=../..
|
|
|
|
llvm_obj_root=../..
|
2005-01-05 06:41:10 +00:00
|
|
|
cd $cwd
|
|
|
|
elif test -d ../../llvm/autoconf/m4 ; then
|
|
|
|
cd ../../llvm/autoconf/m4
|
2011-10-18 23:10:47 +00:00
|
|
|
llvm_src_root=../..
|
|
|
|
llvm_obj_root=../..
|
2005-01-05 06:41:10 +00:00
|
|
|
cd $cwd
|
|
|
|
else
|
2006-04-18 06:27:47 +00:00
|
|
|
while true ; do
|
|
|
|
echo "LLVM source root not found."
|
2009-03-24 20:21:37 +00:00
|
|
|
read -p "Enter full path to LLVM source:" REPLY
|
2006-04-18 06:27:47 +00:00
|
|
|
if test -d "$REPLY/autoconf/m4" ; then
|
|
|
|
llvm_src_root="$REPLY"
|
2009-03-24 20:21:37 +00:00
|
|
|
read -p "Enter full path to LLVM objects (empty for same as source):" REPLY
|
2006-04-18 06:27:47 +00:00
|
|
|
if test -d "$REPLY" ; then
|
|
|
|
llvm_obj_root="$REPLY"
|
|
|
|
else
|
|
|
|
llvm_obj_root="$llvm_src_root"
|
|
|
|
fi
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2005-01-05 06:41:10 +00:00
|
|
|
fi
|
|
|
|
echo "Regenerating aclocal.m4 with aclocal"
|
|
|
|
rm -f aclocal.m4
|
2011-10-18 23:10:47 +00:00
|
|
|
aclocal -I $cwd/m4 || die "aclocal failed"
|
2009-03-24 23:45:13 +00:00
|
|
|
echo "Regenerating configure with autoconf"
|
2005-02-24 18:42:34 +00:00
|
|
|
autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed"
|
2005-01-05 06:41:10 +00:00
|
|
|
cd ..
|
|
|
|
exit 0
|