From e61fc10ae25a075bc360d3e290ef5c21d629a547 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 ++++++++++ convenient/Makefile.am | 2 +- event/Makefile.am | 2 +- icccm/Makefile.am | 2 +- image/Makefile.am | 2 +- keysyms/Makefile.am | 2 +- property/Makefile.am | 2 +- reply/Makefile.am | 2 +- wm/Makefile.am | 2 +- 10 files changed, 19 insertions(+), 9 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 8b3c4ba..1204b00 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/convenient/Makefile.am b/convenient/Makefile.am index bd9eab4..ebc4a10 100644 --- a/convenient/Makefile.am +++ b/convenient/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBAux.la xcbinclude_HEADERS = xcb_aux.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) libXCBAux_la_SOURCES = xcb_aux.c libXCBAux_la_CFLAGS = $(XCB_CFLAGS) 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) diff --git a/icccm/Makefile.am b/icccm/Makefile.am index cf78df0..f5ff32a 100644 --- a/icccm/Makefile.am +++ b/icccm/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBICCCM.la xcbinclude_HEADERS = xcb_icccm.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) libXCBICCCM_la_SOURCES = icccm.c libXCBICCCM_la_CFLAGS = $(XCB_CFLAGS) $(XCB_ATOM_CFLAGS) $(XCB_EVENT_CFLAGS) \ diff --git a/image/Makefile.am b/image/Makefile.am index 1237aad..d688fca 100644 --- a/image/Makefile.am +++ b/image/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBImage.la xcbinclude_HEADERS = xcb_image.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) XCB_IMAGE_LIBS = libXCBImage.la 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) diff --git a/property/Makefile.am b/property/Makefile.am index e96b4c0..c6c7a44 100644 --- a/property/Makefile.am +++ b/property/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBProperty.la xcbinclude_HEADERS = xcb_property.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) libXCBProperty_la_SOURCES = prop.c libXCBProperty_la_CFLAGS = $(XCB_CFLAGS) $(XCB_EVENT_CFLAGS) diff --git a/reply/Makefile.am b/reply/Makefile.am index 504c68d..06b03c8 100644 --- a/reply/Makefile.am +++ b/reply/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBReply.la xcbinclude_HEADERS = xcb_reply.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) XCB_REPLY_LIBS = libXCBReply.la diff --git a/wm/Makefile.am b/wm/Makefile.am index a5fbc9c..c436185 100644 --- a/wm/Makefile.am +++ b/wm/Makefile.am @@ -5,7 +5,7 @@ lib_LTLIBRARIES = libXCBWM.la xcbinclude_HEADERS = xcb_wm.h -AM_CFLAGS = -Wall +AM_CFLAGS = $(CWARNFLAGS) XCB_XCBWM_LIBS = libXCBWM.la -- cgit v1.2.3