summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-06-07 12:06:00 -0700
committerArnaud Fontaine <arnau@debian.org>2010-11-14 20:11:08 +0900
commit378d9e50af2040dbaa9837353e55aa054431b640 (patch)
tree17dcfa13cc9a89ff06b363ce8d0bbf131016dbdd
parenta3695ff0c46f2a906425281b1dd2f59f9dce60c7 (diff)
Bug #7150: Check for gcc & Sun cc in configure.ac and use correct flags to turn on more warnings for each
This is the first of two fixes needed to get xcb-util building on Solaris. Signed-off-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r--configure.ac10
-rw-r--r--keysyms/Makefile.am2
2 files changed, 11 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 87dd55e..5d38a68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,16 @@ fi
AC_PROG_CC
AC_PROG_LIBTOOL
+if test "x$GCC" = xyes ; then
+ CWARNFLAGS="-Wall"
+else
+ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
+ if test "x$SUNCC" = "xyes"; then
+ CWARNFLAGS="-v"
+ fi
+fi
+AC_SUBST(CWARNFLAGS)
+
xcbincludedir='${includedir}/xcb'
AC_SUBST(xcbincludedir)
diff --git a/keysyms/Makefile.am b/keysyms/Makefile.am
index 6765333..e5a38cd 100644
--- a/keysyms/Makefile.am
+++ b/keysyms/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBKeysyms.la
xcbinclude_HEADERS = xcb_keysyms.h
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
libXCBKeysyms_la_SOURCES = keysyms.c
libXCBKeysyms_la_CFLAGS = $(XCB_CFLAGS)