Fix PR608:
authorReid Spencer <rspencer@reidspencer.com>
Wed, 27 Jul 2005 21:58:38 +0000 (21:58 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Wed, 27 Jul 2005 21:58:38 +0000 (21:58 +0000)
Previously the script assumed the version number was the last field, now
it assumes it is the first sequence of digits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22527 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/configure.ac
configure
include/llvm/Config/config.h.in

index 42775d33493a58771e990f5823d374c9f069f5a7..b7e11e69e6a482ab7d73a42e29cb57882de7ca5a 100644 (file)
@@ -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])
index d93b4d81bd1a4125c2aa479bb696e3630b7c593b..023cdd085ff70cb032cf7914e534c27573f30387 100755 (executable)
--- a/configure
+++ b/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
index ecd6b55e51ca885225bdbb242589b71f4759e4c4..79204ca2f760db3aadab169c4091dadc94367111 100644 (file)
 /* 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 <sys/stat.h> do not work properly. */