Use xorg CFLAGS and fix AC_USE_SYSTEM_EXTENSIONS autotools was warning that AC_USE_SYSTEM_EXTENSIONS was being called too late, so move it earlier. Also shove BASE_CFLAGS into CFLAGS so we get all the added warning flags from xorg. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
diff --git a/configure.ac b/configure.ac
index d149c21..f4eefdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,9 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects])
AM_MAINTAINER_MODE
+# Get _GNU_SOURCE and friends
+AC_USE_SYSTEM_EXTENSIONS
+
# Initialize libtool
AC_PROG_LIBTOOL
@@ -42,9 +45,6 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
XORG_CHECK_MALLOC_ZERO
-# Get _GNU_SOURCE and friends
-AC_USE_SYSTEM_EXTENSIONS
-
# Check for programs
AC_PROG_LEX
AC_PROG_YACC
@@ -72,8 +72,9 @@ if test "x$CC_FOR_BUILD" = x; then
fi
fi
-if test "x$GCC" = xyes ; then
- CFLAGS="$CFLAGS -fvisibility=hidden"
+CFLAGS="$CFLAGS $BASE_CFLAGS"
+if test "x$GCC" = xyes ; then
+ CFLAGS="$CFLAGS -fvisibility=hidden"
fi
# Obtain protocols headers include directives