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 19:49:48 +0900
commit7addcb94f4fb814d312bec27bcd7e30486d4061e (patch)
tree8ccc8a57ae4dd1f6bbc36cca50990b9eb9f4f704
parent7c3ea033e51c0e00e68325ec53dca5ba3717b610 (diff)
downloadxcb-util-7addcb94f4fb814d312bec27bcd7e30486d4061e.tar.gz
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--atom/Makefile.am2
-rw-r--r--configure.ac10
-rw-r--r--event/Makefile.am2
3 files changed, 12 insertions, 2 deletions
diff --git a/atom/Makefile.am b/atom/Makefile.am
index eaff571..de642a8 100644
--- a/atom/Makefile.am
+++ b/atom/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBAtom.la
xcbinclude_HEADERS = xcb_atom.h
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
libXCBAtom_la_SOURCES = atoms.c atomlist.m4 atoms.gperf.m4 xcb_atom.h.m4
libXCBAtom_la_CFLAGS = $(XCB_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 30189c4..c00e8c6 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/event/Makefile.am b/event/Makefile.am
index 32440bd..bd53055 100644
--- a/event/Makefile.am
+++ b/event/Makefile.am
@@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBEvent.la
xcbinclude_HEADERS = xcb_event.h
-AM_CFLAGS = -Wall
+AM_CFLAGS = $(CWARNFLAGS)
libXCBEvent_la_SOURCES = events.c
libXCBEvent_la_CFLAGS = $(XCB_CFLAGS)