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 <mems...@videotron.ca> --- configure.ac | 4 ---- src/Makefile.am | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 34d1d91..7c25cf0 100644 --- a/configure.ac +++ b/configure.ac @@ -71,9 +71,6 @@ AM_CONDITIONAL(XF86RUSH, test "x$have_xf86rush" = xyes) AC_SUBST([XF86RUSH_LIBS]) AC_SUBST([XF86RUSH_CFLAGS]) -CFLAGS="$CFLAGS $XORG_CFLAGS $XF86RUSH_CFLAGS" -AC_SUBST([CFLAGS]) - save_CFLAGS="$CFLAGS" CFLAGS="$XORG_CFLAGS" AC_CHECK_DECL(xf86ConfigIsaEntity, @@ -97,7 +94,6 @@ AC_HEADER_STDC if test "x$XSERVER_LIBPCIACCESS" = xyes; then PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) - XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" fi DRIVER_NAME=apm diff --git a/src/Makefile.am b/src/Makefile.am index 8a6779e..1fc336a 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) $(XF86RUSH_CFLAGS) + apm_drv_la_LTLIBRARIES = apm_drv.la apm_drv_la_LDFLAGS = -module -avoid-version apm_drv_ladir = @moduledir@/drivers -- 1.6.0.4 _______________________________________________ xorg-devel mailing list xorg-devel@lists.x.org http://lists.x.org/mailman/listinfo/xorg-devel