diff mbox

[i-g-t] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}

Message ID 20161026153536.5946-1-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov Oct. 26, 2016, 3:35 p.m. UTC
From: Emil Velikov <emil.velikov@collabora.com>

Currently the latter is only set when using --enable-intel.

Whereas for the CFLAGS with "enable", it's set by PKG_CHECK_MODULES
and it's set locally for "disable". Yet, in either case it's not
propagated through, this one can get a range of build issues regardless of
the actual state of the toggle.

Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reported-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
If interested, one can do a fine grained addition in the respective
files, but this is the quickest fix ;-)

On a related note: seems like the nouveau and vc4 CFLAGS are _not_
propagated either. Any volunteers ?
---
 configure.ac | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 735cfd5..1c747b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,12 +178,15 @@  fi
 if test "x$INTEL" = xyes; then
 	PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64])
 	AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])
-	DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
-	AC_SUBST([DRM_LIBS])
 else
 	DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/
-	AC_SUBST([DRM_INTEL_CFLAGS])
+	DRM_INTEL_LIBS=
 fi
+DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS"
+DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
+AC_SUBST([DRM_CFLAGS])
+AC_SUBST([DRM_LIBS])
+
 AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
 
 # for dma-buf tests