build: Add dependency between libdrm and compositor for drm backend
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 14 Oct 2013 12:57:10 +0000 (15:57 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 14 Oct 2013 21:56:26 +0000 (14:56 -0700)
The compositor uses libdrm in launcher-util.c if the drm backend is
built, but there was no explicit requirement in the build. egl brings
libdrm implicity so the build doesn't fail.

This patch adds an explicit dependency between the compositor and
libdrm if the drm backend is built, so that changes to the compositor
modules don't cause build failures.

configure.ac

index 7727930..91cf0be 100644 (file)
@@ -78,8 +78,6 @@ if test x$enable_xkbcommon = xyes; then
        COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon"
 fi
 
-PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
-
 AC_ARG_ENABLE(setuid-install, [  --enable-setuid-install],,
              enable_setuid_install=yes)
 AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
@@ -147,8 +145,12 @@ AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes -a x$e
 if test x$enable_drm_compositor = xyes -a x$enable_egl = xyes; then
   AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
   PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
+
+  # For libdrm usage in launcher-util.c
+  COMPOSITOR_MODULES="$COMPOSITOR_MODULES libdrm"
 fi
 
+PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
 
 AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
              enable_wayland_compositor=yes)