From c4134a6cb6bf3d9364fd2374e79647859dbd57c3 Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Mon, 8 Feb 2010 20:08:52 -0500 Subject: [PATCH] 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. Signed-off-by: Gaetan Nadon --- configure.ac | 3 --- src/Makefile.am | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index f2329a0..62666c6 100644 --- a/configure.ac +++ b/configure.ac @@ -62,9 +62,6 @@ XORG_DRIVER_CHECK_EXT(XFreeXDGA, xf86dgaproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) -CFLAGS="$CFLAGS $XORG_CFLAGS " -AC_SUBST([CFLAGS]) - # Checks for libraries. # Checks for header files. diff --git a/src/Makefile.am b/src/Makefile.am index 8cf4f1f..6705742 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,9 @@ # -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) + dummy_drv_la_LTLIBRARIES = dummy_drv.la dummy_drv_la_LDFLAGS = -module -avoid-version dummy_drv_ladir = @moduledir@/drivers