build: Add dependency between libdrm and compositor for drm backend
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.
diff --git a/configure.ac b/configure.ac
index 7727930..91cf0be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,8 +78,6 @@
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 @@
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)