summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-02-08 20:08:52 -0500
committerGaetan Nadon <memsize@videotron.ca>2010-02-08 20:09:41 -0500
commitd9a142d60603920069f478890884f20cbd7886b3 (patch)
tree3a20e339e5e9d7827433a8c8669dc12833dc54a0
parent269276497a4f452cc943afe0eb9072519621d36e (diff)
config: move compiler flags from configure.ac to Makefile.am
CFLAGS is an automake defined variable that should not be set by the module. It should not be AC_SUBST either, it already is. Use AM_CFLAGS in Makefile.am. This will allow the user to override the flags as they will be in the right order. The -g option is already part of the default flags. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac8
-rw-r--r--src/Makefile.am4
2 files changed, 3 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 792bf6a..2ee4985 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,14 +73,6 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-# blah, should be XORG_CWARNFLAGS
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall -Wstrict-prototypes -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -Wold-style-definition -Wbad-function-cast -Wdeclaration-after-statement"
-fi
-
-CFLAGS="$CFLAGS $CWARNFLAGS $XORG_CFLAGS "
-AC_SUBST([CFLAGS])
-
# Checks for libraries.
# Checks for header files.
diff --git a/src/Makefile.am b/src/Makefile.am
index b30d50d..14b68ec 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,10 +24,12 @@
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
+
+AM_CFLAGS = $(XORG_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS)
+
qxl_drv_la_LTLIBRARIES = qxl_drv.la
qxl_drv_la_LDFLAGS = -module -avoid-version
qxl_drv_ladir = @moduledir@/drivers
-AM_CFLAGS = -g
qxl_drv_la_SOURCES = \
qxl.h \