configure: Test GCC-specific compiler flags only when using GCC
Commit 23373d01d
"configure: Test compiler flags" (v4.4.0) made
configure test whether compiler flags work, to let us use flags that
work only for some compilers.
Unfortunately, the Sun C compiler accepts invalid options with a
warning, breaking the test. Observed on Solaris 10.
Fix by testing the compiler flags only when AC_PROG_CC detected GCC.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
6cff488537
commit
13362acc46
1 changed files with 5 additions and 0 deletions
|
@ -91,6 +91,9 @@ MY_WITH_READLINE
|
||||||
|
|
||||||
### Checks for typedefs, structures, and compiler characteristics
|
### Checks for typedefs, structures, and compiler characteristics
|
||||||
|
|
||||||
|
if test "$GCC"
|
||||||
|
then
|
||||||
|
|
||||||
# Enable useful warnings
|
# Enable useful warnings
|
||||||
# Some of them are commented out because the code needs cleanup first
|
# Some of them are commented out because the code needs cleanup first
|
||||||
# Clang needs to be tested with -Werror=unknown-warning-option
|
# Clang needs to be tested with -Werror=unknown-warning-option
|
||||||
|
@ -168,6 +171,8 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
]])])
|
]])])
|
||||||
|
|
||||||
|
fi # $GCC
|
||||||
|
|
||||||
|
|
||||||
### Checks for library functions
|
### Checks for library functions
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue