From 7addcb94f4fb814d312bec27bcd7e30486d4061e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 7 Jun 2006 12:06:00 -0700 Subject: 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 --- atom/Makefile.am | 2 +- configure.ac | 10 ++++++++++ event/Makefile.am | 2 +- 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) -- cgit v1.2.1