From bf758660c9c0e20abd141a1215e2e2b1ac342097 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Thu, 1 Aug 2019 13:39:47 +0200 Subject: [PATCH] configure/xwayland: No libdrm nor epoxy without glamor When building Xwayland without neither DRI nor GLamor support enabled with the autotools build system, the resulting binary would still link against libdrm and epoxy even though those are not used/needed. Make sure we require and link against libdrm and epoxy only if needed. Signed-off-by: Olivier Fourdan --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 92b593acb..8b1d3982e 100644 --- a/configure.ac +++ b/configure.ac @@ -2297,10 +2297,16 @@ AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) dnl Xwayland DDX -XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10 $LIBDRM epoxy" +XWAYLANDMODULES="wayland-client >= 1.3.0 wayland-protocols >= 1.10" if test "x$XF86VIDMODE" = xyes; then XWAYLANDMODULES="$XWAYLANDMODULES $VIDMODEPROTO" fi +if test "x$DRM" = xyes; then + XWAYLANDMODULES="$XWAYLANDMODULES $LIBDRM" +fi +if test "x$GLAMOR" = xyes; then + XWAYLANDMODULES="$XWAYLANDMODULES epoxy" +fi PKG_CHECK_MODULES(XWAYLANDMODULES, [$XWAYLANDMODULES], [have_xwayland=yes], [have_xwayland=no]) AC_MSG_CHECKING([whether to build Xwayland DDX]) if test "x$XWAYLAND" = xauto; then