From 80492e220aa7fce8b9d2a40cf21d945eca73ef46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 26 Apr 2011 11:10:32 -0400 Subject: [PATCH] configure: Only check dependencies for the enabled compositor backends --- clients/Makefile.am | 2 -- compositor/Makefile.am | 14 +++++++++----- configure.ac | 7 +++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/clients/Makefile.am b/clients/Makefile.am index ee61efd6..ca11be32 100644 --- a/clients/Makefile.am +++ b/clients/Makefile.am @@ -16,8 +16,6 @@ noinst_LIBRARIES = libtoytoolkit.a AM_CFLAGS = $(GCC_CFLAGS) AM_CPPFLAGS = \ -DDATADIR='"$(datadir)"' \ - -I$(top_builddir)/wayland \ - -I$(top_srcdir)/wayland \ $(CLIENT_CFLAGS) libtoytoolkit_a_SOURCES = \ diff --git a/compositor/Makefile.am b/compositor/Makefile.am index 650c9d0f..fc78d88d 100644 --- a/compositor/Makefile.am +++ b/compositor/Makefile.am @@ -2,15 +2,21 @@ noinst_PROGRAMS = compositor AM_CPPFLAGS = \ -DDATADIR='"$(datadir)"' \ - -I$(top_builddir)/wayland \ - -I$(top_srcdir)/wayland \ - $(COMPOSITOR_CFLAGS) + $(COMPOSITOR_CFLAGS) \ + $(X11_COMPOSITOR_CFLAGS) \ + $(WAYLAND_COMPOSITOR_CFLAGS) \ + $(WAYLAND_COMPOSITOR_CFLAGS) \ + $(OPENWFD_COMPOSITOR_CFLAGS) AM_CFLAGS = $(GCC_CFLAGS) compositor_LDFLAGS = -export-dynamic compositor_LDADD = \ $(COMPOSITOR_LIBS) \ + $(X11_COMPOSITOR_LIBS) \ + $(DRM_COMPOSITOR_LIBS) \ + $(WAYLAND_COMPOSITOR_LIBS) \ + $(OPENWFD_COMPOSITOR_LIBS) \ $(DLOPEN_LIBS) if ENABLE_DRM_COMPOSITOR @@ -27,8 +33,6 @@ endif if ENABLE_OPENWFD_COMPOSITOR openwfd_compositor_sources = compositor-openwfd.c -AM_CPPFLAGS += $(OPENWFD_CFLAGS) -compositor_LDADD += $(OPENWFD_LIBS) endif compositor_SOURCES = \ diff --git a/configure.ac b/configure.ac index 8c5a8af9..ed9f4a74 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AC_CHECK_FUNC([dlopen], [], AC_SUBST(DLOPEN_LIBS) PKG_CHECK_MODULES(COMPOSITOR, - [wayland-server wayland-client wayland-egl egl >= 7.10 glesv2 gdk-pixbuf-2.0 libudev >= 136 libdrm >= 2.4.23] pixman-1 x11 x11-xcb) + [wayland-server egl >= 7.10 glesv2 gdk-pixbuf-2.0 pixman-1]) PKG_CHECK_MODULES(SIMPLE_CLIENT, [egl >= 7.10 glesv2 wayland-client wayland-egl]) PKG_CHECK_MODULES(CLIENT, [wayland-client wayland-egl egl >= 7.10 gl cairo >= 1.10.0 gdk-pixbuf-2.0 glib-2.0 gobject-2.0 xkbcommon]) PKG_CHECK_MODULES(POPPLER, [poppler-glib gdk-2.0 gio-2.0], @@ -50,6 +50,7 @@ AC_ARG_ENABLE(x11-compositor, [ --enable-x11-compositor],, AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor == xyes) if test x$enable_x11_compositor == xyes; then AC_DEFINE([BUILD_X11_COMPOSITOR], [1], [Build the X11 compositor]) + PKG_CHECK_MODULES(X11_COMPOSITOR, [x11 x11-xcb]) fi @@ -58,6 +59,7 @@ AC_ARG_ENABLE(drm-compositor, [ --enable-drm-compositor],, AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor == xyes) if test x$enable_drm_compositor == xyes; then AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor]) + PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.23]) fi @@ -66,7 +68,7 @@ AC_ARG_ENABLE(openwfd-compositor, [ --enable-openwfd-compositor],, AM_CONDITIONAL(ENABLE_OPENWFD_COMPOSITOR, test x$enable_openwfd_compositor == xyes) if test x$enable_openwfd_compositor == xyes; then AC_DEFINE([BUILD_OPENWFD_COMPOSITOR], [1], [Build the OpenWF compositor]) - PKG_CHECK_MODULES(OPENWFD, [openwfd]) + PKG_CHECK_MODULES(OPENWFD_COMPOSITOR, [openwfd]) fi @@ -77,6 +79,7 @@ AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR, if test x$enable_wayland_compositor == xyes; then AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1], [Build the Wayland (nested) compositor]) + PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client wayland-egl]) fi