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>