Skip to content
Snippets Groups Projects
Commit 61a78231 authored by Felix Yan's avatar Felix Yan Committed by Marge Bot
Browse files

m4: Correctly detect GCC version

When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here.

```
$ cc --version
cc (GCC) 13.2.1 20230801
...
```

This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler`

This patch makes it check for upper-cased "GCC" too so that it works correctly:

```
checking version of gcc... 13.2.1
```
parent 50bfdb46
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ AC_DEFUN([FP_GCC_VERSION], [
AC_MSG_ERROR([C compiler is required])
fi
if $CC --version | grep -q gcc; then
if $CC --version | grep -qi gcc; then
AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version],
[
# Be sure only to look at the first occurrence of the "version " string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment