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.
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`