diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-05-08 15:22:59 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-05-08 15:22:59 +0000 |
commit | c82f324ba762b9375ca503c552f546b7a600fa76 (patch) | |
tree | ef2554a9aa8f1f5d612c32bd106d5be3f8767836 | |
parent | 2e1f80476493ddb83ba7ea2178656507d97e762e (diff) | |
download | bcm5719-llvm-c82f324ba762b9375ca503c552f546b7a600fa76.tar.gz bcm5719-llvm-c82f324ba762b9375ca503c552f546b7a600fa76.zip |
CHanges for autconf 2.60
llvm-svn: 36937
-rwxr-xr-x | stacker/autoconf/AutoRegen.sh | 52 | ||||
-rw-r--r-- | stacker/autoconf/configure.ac | 32 |
2 files changed, 62 insertions, 22 deletions
diff --git a/stacker/autoconf/AutoRegen.sh b/stacker/autoconf/AutoRegen.sh index 0809bf206e7..17b88866abf 100755 --- a/stacker/autoconf/AutoRegen.sh +++ b/stacker/autoconf/AutoRegen.sh @@ -4,15 +4,49 @@ die () { exit 1 } test -d autoconf && test -f autoconf/configure.ac && cd autoconf -[ -f configure.ac ] || die "Can't find 'autoconf' dir; please cd into it first" -echo "Regenerating aclocal.m4 with aclocal" -aclocal || die "aclocal failed" -autoconf --version | egrep '2\.5[0-9]' > /dev/null -if test $? -ne 0 -then - die "Your autoconf was not detected as being 2.5x" +test -f configure.ac || die "Can't find 'autoconf' dir; please cd into it first" +autoconf --version | egrep '2\.6[0-9]' > /dev/null +if test $? -ne 0 ; then + die "Your autoconf was not detected as being 2.6x" +fi +cwd=`pwd` +if test -d ../../../autoconf/m4 ; then + cd ../../../autoconf/m4 + llvm_m4=`pwd` + llvm_src_root=../../.. + llvm_obj_root=../../.. + cd $cwd +elif test -d ../../llvm/autoconf/m4 ; then + cd ../../llvm/autoconf/m4 + llvm_m4=`pwd` + llvm_src_root=../.. + llvm_obj_root=../.. + cd $cwd +else + while true ; do + echo "LLVM source root not found." + read -p "Enter full path to LLVM source:" + if test -d "$REPLY/autoconf/m4" ; then + llvm_src_root="$REPLY" + llvm_m4="$REPLY/autoconf/m4" + read -p "Enter full path to LLVM objects (empty for same as source):" + if test -d "$REPLY" ; then + llvm_obj_root="$REPLY" + else + llvm_obj_root="$llvm_src_root" + fi + break + fi + done fi -echo "Regenerating configure with autoconf 2.5x" -autoconf -o ../configure configure.ac || die "autoconf failed" +# Patch the LLVM_ROOT in configure.ac, if it needs it +cp configure.ac configure.bak +sed -e "s#^LLVM_SRC_ROOT=.*#LLVM_SRC_ROOT=\"$llvm_src_root\"#" \ + -e "s#^LLVM_OBJ_ROOT=.*#LLVM_OBJ_ROOT=\"$llvm_obj_root\"#" configure.bak > configure.ac +echo "Regenerating aclocal.m4 with aclocal" +rm -f aclocal.m4 +aclocal -I $llvm_m4 -I "$llvm_m4/.." || die "aclocal failed" +echo "Regenerating configure with autoconf 2.6x" +autoconf --warnings=all -o ../configure configure.ac || die "autoconf failed" cd .. exit 0 diff --git a/stacker/autoconf/configure.ac b/stacker/autoconf/configure.ac index 3f5326e5e77..d4a8bc584bc 100644 --- a/stacker/autoconf/configure.ac +++ b/stacker/autoconf/configure.ac @@ -1,7 +1,7 @@ dnl ************************************************************************** dnl * Initialize dnl ************************************************************************** -AC_INIT([[[Stacker]]],[[[1.0]]],[rspencer@x10sys.com]) +AC_INIT([[[Stacker]]],[[[2.0]]],[rspencer@reidspencer.com]) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) @@ -11,16 +11,6 @@ AC_CONFIG_SRCDIR([lib/compiler/StackerParser.y]) AC_CONFIG_FILES([Makefile.common]) -dnl Configure Makefiles -dnl List every Makefile that exists within your source tree - -AC_CONFIG_MAKEFILE(Makefile) -AC_CONFIG_MAKEFILE(lib/Makefile) -AC_CONFIG_MAKEFILE(lib/compiler/Makefile) -AC_CONFIG_MAKEFILE(lib/runtime/Makefile) -AC_CONFIG_MAKEFILE(test/Makefile) -AC_CONFIG_MAKEFILE(tools/Makefile) -AC_CONFIG_MAKEFILE(tools/stkrc/Makefile) dnl ************************************************************************** dnl * Determine which system we are building on @@ -68,12 +58,28 @@ dnl * Set the location of various third-party software packages dnl ************************************************************************** dnl Location of LLVM source code -AC_ARG_WITH(llvmsrc,AC_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),AC_SUBST(LLVM_SRC,[$withval]),AC_SUBST(LLVM_SRC,[`cd ${srcdir}/../..; pwd`])) +AC_ARG_WITH(llvmsrc,AS_HELP_STRING([--with-llvmsrc],[Location of LLVM Source Code]),AC_SUBST(LLVM_SRC,[$withval]),AC_SUBST(LLVM_SRC,[`cd ${srcdir}/../..; pwd`])) +AC_CONFIG_COMMANDS([llvm_src],[],[llvm_src=$LLVM_SRC]) dnl Location of LLVM object code -AC_ARG_WITH(llvmobj,AC_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) +AC_ARG_WITH(llvmobj,AS_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) +AC_CONFIG_COMMANDS([llvm_obj],[],[llvm_obj=$LLVM_OBJ]) + +dnl ************************************************************************** +dnl Configure Makefiles +dnl List every Makefile that exists within your source tree +dnl ************************************************************************** + +AC_CONFIG_MAKEFILE(Makefile) +AC_CONFIG_MAKEFILE(lib/Makefile) +AC_CONFIG_MAKEFILE(lib/compiler/Makefile) +AC_CONFIG_MAKEFILE(lib/runtime/Makefile) +AC_CONFIG_MAKEFILE(test/Makefile) +AC_CONFIG_MAKEFILE(tools/Makefile) +AC_CONFIG_MAKEFILE(tools/stkrc/Makefile) dnl ************************************************************************** dnl * Create the output files dnl ************************************************************************** + AC_OUTPUT |