diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2006-04-19 21:40:42 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-04-19 21:40:42 -0700 |
commit | f705456744fe4beb193d27eb64fa9157102db753 (patch) | |
tree | 7b91b8b078cd82c0ec4c1ef56804f19bcbb57437 /configure.ac | |
parent | 6f369fde3c676e2b1a67bd71923b61942991d726 (diff) |
Only set CWARNFLAGS to gnu flags if $GCC is set. Otherwise check for Sun compiler and use its enhanced warning flag.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f445683..ccd549a 100644 --- a/configure.ac +++ b/configure.ac @@ -106,8 +106,15 @@ AC_HELP_STRING([--without-debug], [compile without debugging]), AC_CACHE_CHECK([what debugging options to apply], [CDEBUGFLAGS], [CDEBUGFLAGS="-g"]) AC_SUBST(CDEBUGFLAGS) -CWARNFLAGS="-Wall -pedantic -Wpointer-arith \ - -Wstrict-prototypes -Wmissing-declarations -Wnested-externs" +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -pedantic -Wpointer-arith \ + -Wstrict-prototypes -Wmissing-declarations -Wnested-externs" +else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi AC_SUBST(CWARNFLAGS) GCC_CHECK_VISIBILITY() |