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:08:52 -0500
commit05d0d0fcee0ecf596f489554ac4688dda0cd815d (patch)
treeaa9ce3bdd6f5a89895d128a9edbcfceaa20f46ba
parentec2d3b6055d5f4eda11f924e3f52e80a093307e8 (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. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac4
-rw-r--r--src/Makefile.am3
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