Minor performance improvement: do not call _xcb_in_expect_reply unless it is needed...
[free-sw/xcb/libxcb] / configure.ac
index f445683..ccd549a 100644 (file)
@@ -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()