summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-10-26 17:18:47 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2016-11-09 15:41:45 +0100
commit31a00b1cfa90e8834c028a4cac8c2fd51ae7ee69 (patch)
treefe14c713d8a9c1368594e381eb9cc64c8aef6a59
parent8db658c0d0eea431ebf267e3ea5218cc1b979a9e (diff)
configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
Currently the latter is only set when using --enable-intel. Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the variable, while for "disable" we do it locally. In either case the CFLAGS is not propagated through, this one can get build issues regardless of the actual state of the toggle. v2: Add -I for the include directive and correctly propagate $(top_srcdir). 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.velikov@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Tested-by: Brian Starkey <brian.starkey@arm.com>
-rw-r--r--configure.ac11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 735cfd59..e181c83f 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_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/
+ 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