]> granicus.if.org Git - php/commitdiff
improve regexp to support b0rked SED versions (i.e. Solaris)
authorAntony Dovgal <tony2001@php.net>
Fri, 23 May 2008 19:10:01 +0000 (19:10 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 23 May 2008 19:10:01 +0000 (19:10 +0000)
configure.in

index aa40c40b3aad0b01245526e283f098d97becfe7b..42e68849ab8c8015c5269189666691be02af9a22 100644 (file)
@@ -215,7 +215,7 @@ if test "$GCC" = "yes"; then
     GCC_MAJOR_VERSION=`$CC -dumpversion | /usr/bin/sed -nE '1s/([[0-9]]+)\.[[0-9]]+\..*/\1/;1p'`
     ;;
   *)
-    GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*\([[0-9]]\+\)\.[[0-9]]\+\..*/\1/;1p'`
+    GCC_MAJOR_VERSION=`$CC --version | $SED -n '1s/[[^0-9]]*//;1s/\..*//;1p'`
     ;;
   esac
   if test $GCC_MAJOR_VERSION -ge 4; then