Preserve user $CFLAGS
authorVincent Stehlé <v-stehle@ti.com>
Tue, 8 May 2012 09:12:42 +0000 (11:12 +0200)
committerRob Clark <rob@ti.com>
Thu, 10 May 2012 16:20:24 +0000 (11:20 -0500)
Do not override the $CFLAGS variable internally to allow specifying it at
configure time. Keep the Linux kernel include path flags in a separate
LIN_CFLAGS variable.

Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Makefile.am
configure.ac
util/Makefile.am

index dc13f6d5e5cab4defded2ddcad3cff3f76d10093..b47e6e9669533ebae84084841bc5c8d20659a5d4 100644 (file)
@@ -27,7 +27,7 @@ bin_PROGRAMS += viddec3test
 endif
 
 LDADD_COMMON = util/libutil.la @DRM_LIBS@ @X11_LIBS@ @DCE_LIBS@
 endif
 
 LDADD_COMMON = util/libutil.la @DRM_LIBS@ @X11_LIBS@ @DCE_LIBS@
-CFLAGS = @DRM_CFLAGS@ @X11_CFLAGS@ @DCE_CFLAGS@ @WARN_CFLAGS@ -I$(top_srcdir)/util
+AM_CFLAGS = @LIN_CFLAGS@ @DRM_CFLAGS@ @X11_CFLAGS@ @DCE_CFLAGS@ @WARN_CFLAGS@ -I$(top_srcdir)/util
 
 fliptest_SOURCES = fliptest.c
 fliptest_LDADD = $(LDADD_COMMON)
 
 fliptest_SOURCES = fliptest.c
 fliptest_LDADD = $(LDADD_COMMON)
index 217126bb9cdb9cae02c3df6caab938685985b246..95a872ff863aa75bbd72e57f69bd9608e7b40527 100644 (file)
@@ -45,7 +45,7 @@ AC_ARG_WITH([kernel-source],
 if test -r "$kernel_source/include/linux/videodev2.h"; then
     headers_cflags="$headers_cflags -I$kernel_source/include"
 
 if test -r "$kernel_source/include/linux/videodev2.h"; then
     headers_cflags="$headers_cflags -I$kernel_source/include"
 
-    AC_SUBST(CFLAGS, [$headers_cflags])
+    AC_SUBST(LIN_CFLAGS, [$headers_cflags])
     AC_MSG_NOTICE([$kversion provides videodev2.h])
 else
     AC_MSG_NOTICE([Could not find $kernel_source/include/linux/videodev2.h])
     AC_MSG_NOTICE([$kversion provides videodev2.h])
 else
     AC_MSG_NOTICE([Could not find $kernel_source/include/linux/videodev2.h])
index e00fe2a2b51192d0ff85f75915d340a66dfe7b7b..eb1341180d95fd5d24d6774178dc42a3ee294e82 100644 (file)
@@ -34,4 +34,4 @@ libutil_la_SOURCES += demux.c
 endif
 
 libutil_la_LIBADD = @DRM_LIBS@ @X11_LIBS@ @DCE_LIBS@
 endif
 
 libutil_la_LIBADD = @DRM_LIBS@ @X11_LIBS@ @DCE_LIBS@
-libutil_la_CFLAGS = @DRM_CFLAGS@ @X11_CFLAGS@ @DCE_CFLAGS@ @WARN_CFLAGS@
+libutil_la_CFLAGS = @LIN_CFLAGS@ @DRM_CFLAGS@ @X11_CFLAGS@ @DCE_CFLAGS@ @WARN_CFLAGS@