summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-11-08 00:52:02 +0100
committerKevin Ryde <user42@zip.com.au>2001-11-08 00:52:02 +0100
commit936cb18c360179a509642003b13f21dfe0044f86 (patch)
treec70a2578d165abe6cd074d4c44341897b4152b31 /acinclude.m4
parent93913b52dada31238bf59fa95b92306585363371 (diff)
downloadgmp-936cb18c360179a509642003b13f21dfe0044f86.tar.gz
* acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
Solaris 8.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m411
1 files changed, 6 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 002f54f23..e651c9e47 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -455,8 +455,9 @@ dnl accordingly, or to "error" if the version number string can't be
dnl parsed.
dnl
dnl gcc --version is normally just "2.7.2.3" or "2.95.3" or whatever, but
-dnl egcs gives something like "egcs-2.91". sed doesn't support "?" so a
-dnl pattern "(egcs-)*" is used.
+dnl egcs gives something like "egcs-2.91". "[a-z-]*" is used to match that
+dnl (Solaris 8 sed doesn't support "?" or "*" of a group, like "\(...\)?"
+dnl or "\(...\)*".)
dnl
dnl There's no caching here, so that different CC's can be tested.
@@ -464,15 +465,15 @@ AC_DEFUN(GMP_GCC_VERSION_GE,
[tmp_version=`($1 --version) 2>&AC_FD_CC`
echo "$1 --version '$tmp_version'" >&AC_FD_CC
-major=`(echo "$tmp_version" | sed -n ['s/^\(egcs-\)*\([0-9][0-9]*\).*/\2/p']) 2>&AC_FD_CC`
+major=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
echo " major '$major'" >&AC_FD_CC
ifelse([$3],,,
-[minor=`(echo "$tmp_version" | sed -n ['s/^\(egcs-\)*[0-9][0-9]*\.\([0-9][0-9]*\).*/\2/p']) 2>&AC_FD_CC`
+[minor=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
echo " minor '$minor'" >&AC_FD_CC])
ifelse([$4],,,
-[subminor=`(echo "$tmp_version" | sed -n ['s/^\(egcs-\)*[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\2/p']) 2>&AC_FD_CC`
+[subminor=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
echo " subminor '$subminor'" >&AC_FD_CC])
if test -z "$major"; then