summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)