diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-02-08 20:08:52 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-02-08 20:08:52 -0500 |
commit | b65010bb9a5b835bf8e1dcbf26514c21b59795cd (patch) | |
tree | f35774c11accf2360632864c9790525f6b3d4b29 | |
parent | 822e062c023f44ef0bfbe6ecdcc54e8c754fa23c (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.ac | 5 | ||||
-rw-r--r-- | src/Makefile.am | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index d642c2d..af924be 100644 --- a/configure.ac +++ b/configure.ac @@ -61,9 +61,6 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # 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. SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" @@ -77,11 +74,9 @@ 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 AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) - DRIVER_NAME=ark AC_SUBST([DRIVER_NAME]) diff --git a/src/Makefile.am b/src/Makefile.am index a605e6c..fdc7bea 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) + ark_drv_la_LTLIBRARIES = ark_drv.la ark_drv_la_LDFLAGS = -module -avoid-version ark_drv_ladir = @moduledir@/drivers |