From 2b381e0c1ef646d4ed6de9d61d2a77d157673eb5 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 27 Jul 2005 21:58:38 +0000 Subject: [PATCH] Fix PR608: Previously the script assumed the version number was the last field, now it assumes it is the first sequence of digits. llvm-svn: 22527 --- llvm/autoconf/configure.ac | 2 +- llvm/configure | 2 +- llvm/include/llvm/Config/config.h.in | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac index 42775d33493a..b7e11e69e6a4 100644 --- a/llvm/autoconf/configure.ac +++ b/llvm/autoconf/configure.ac @@ -404,7 +404,7 @@ fi dnl Verify that GCC is version 3.0 or higher if test "$GCC" = "yes" then - gccmajor=`$CC --version | head -n 1 | awk '{print $NF;}' | cut -d. -f1` + gccmajor=`$CC --version | head -n 1 | sed 's/[[^0-9]]*\([[0-9.]]\).*/\1/'` if test "$gccmajor" -lt "3" then AC_MSG_ERROR([gcc 3.x required, but you have a lower version]) diff --git a/llvm/configure b/llvm/configure index d93b4d81bd1a..023cdd085ff7 100755 --- a/llvm/configure +++ b/llvm/configure @@ -24842,7 +24842,7 @@ fi if test "$GCC" = "yes" then - gccmajor=`$CC --version | head -n 1 | awk '{print $NF;}' | cut -d. -f1` + gccmajor=`$CC --version | head -n 1 | sed 's/[^0-9]*\([0-9.]\).*/\1/'` if test "$gccmajor" -lt "3" then { { echo "$as_me:$LINENO: error: gcc 3.x required, but you have a lower version" >&5 diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in index ecd6b55e51ca..79204ca2f760 100644 --- a/llvm/include/llvm/Config/config.h.in +++ b/llvm/include/llvm/Config/config.h.in @@ -449,9 +449,9 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if the `S_IS*' macros in do not work properly. */