From e83c83807d4042a23d473cbdb4d39c2d79b873ca Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 20 Aug 2024 10:56:59 -0700 Subject: [PATCH] build: improve compiler version detection portability POSIX sed doesn't support extended regular expressions, so convert a call to the basic format. This caused a problem on AIX. Also, use the detected sed binary name instead of hard-coding one. --- m4/curl-compilers.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 0fde2f9455..3890d536c4 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -185,7 +185,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [ compiler_id="GNU_C" AC_MSG_CHECKING([compiler version]) # strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32' - gccver=`$CC -dumpversion | sed -E 's/-.+$//'` + gccver=`$CC -dumpversion | "$SED" 's/-.\{1,\}$//'` gccvhi=`echo $gccver | cut -d . -f1` if echo $gccver | grep -F '.' >/dev/null; then gccvlo=`echo $gccver | cut -d . -f2`