mirror of
https://github.com/curl/curl.git
synced 2025-09-12 15:12:42 +03:00
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.
This commit is contained in:
parent
ae2c753a88
commit
e83c83807d
|
@ -185,7 +185,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
|
||||||
compiler_id="GNU_C"
|
compiler_id="GNU_C"
|
||||||
AC_MSG_CHECKING([compiler version])
|
AC_MSG_CHECKING([compiler version])
|
||||||
# strip '-suffix' parts, e.g. Ubuntu Windows cross-gcc returns '10-win32'
|
# 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`
|
gccvhi=`echo $gccver | cut -d . -f1`
|
||||||
if echo $gccver | grep -F '.' >/dev/null; then
|
if echo $gccver | grep -F '.' >/dev/null; then
|
||||||
gccvlo=`echo $gccver | cut -d . -f2`
|
gccvlo=`echo $gccver | cut -d . -f2`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user