From: Antony Dovgal Date: Fri, 23 May 2008 19:10:01 +0000 (+0000) Subject: improve regexp to support b0rked SED versions (i.e. Solaris) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1691 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e73cd561b676a0728e555af67f80212195f93eff;p=php improve regexp to support b0rked SED versions (i.e. Solaris) --- diff --git a/configure.in b/configure.in index aa40c40b3a..42e68849ab 100644 --- a/configure.in +++ b/configure.in @@ -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