[Xcb] [PATCH libxcb 02/11] autoconf: use the warning variables from xorg

Gaetan Nadon memsize at videotron.ca
Tue Jan 7 11:00:39 PST 2014


The BASE_CFLAGS variable contains only warnings, just like the XCB
version of CWARNFLAGS. This will result in no changes in the binaries
produced. Xorg was missing -fd for SUNCC so it has been added to util-macros
v 1.18.

Do not get confused with the xorg deprecated CWARNFLAGS variable which
contains an option that is not a warning, -fno-strict-aliasing. This
option, should it be needed, can be added using the XORG_TESTSET_CFLAG
macro.

Reviewed-by: Josh Triplett <josh at joshtriplett.org>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 configure.ac    |   13 +------------
 src/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index e6a837f..6927283 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,17 +180,6 @@ AC_CHECK_DECL([IOV_MAX], [],
 xcbincludedir='${includedir}/xcb'
 AC_SUBST(xcbincludedir)
 
-if  test "x$GCC" = xyes ; then
-    CWARNFLAGS="-Wall -Wpointer-arith -Wold-style-definition \
-		-Wstrict-prototypes -Wmissing-declarations -Wnested-externs"
-else
-    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
-    if test "x$SUNCC" = "xyes"; then
-	CWARNFLAGS="-v -fd"
-    fi
-fi
-AC_SUBST(CWARNFLAGS)
-
 XCB_CHECK_VISIBILITY()
 
 XCB_CHECK_DOXYGEN()
@@ -342,7 +331,7 @@ echo ""
 echo "  Used CFLAGS:"
 echo "    CPPFLAGS............: ${CPPFLAGS}"
 echo "    CFLAGS..............: ${CFLAGS}"
-echo "    Warning CFLAGS......: ${CWARNFLAGS}"
+echo "    Warning CFLAGS......: ${BASE_CFLAGS}"
 echo ""
 echo "  Installation:"
 echo "    Prefix..............: ${prefix}"
diff --git a/src/Makefile.am b/src/Makefile.am
index f2875dd..5d44b9b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@ EXTSOURCES =	xproto.c \
 		bigreq.c \
 		xc_misc.c
 
-AM_CFLAGS = $(CWARNFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
+AM_CFLAGS = $(BASE_CFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
 libxcb_la_LIBADD = $(NEEDED_LIBS) $(XDMCP_LIBS)
 libxcb_la_SOURCES = \
 		xcb_conn.c xcb_out.c xcb_in.c xcb_ext.c xcb_xid.c \
-- 
1.7.9.5



More information about the Xcb mailing list