configure.ac: split the wayland client/server confusion
authorEmil Velikov <emil.velikov@collabora.com>
Fri, 1 Sep 2017 16:39:36 +0000 (17:39 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 19 Sep 2017 18:02:34 +0000 (19:02 +0100)
At the moment wayland-clients, such as the Vulkan drivers were
over-linking against libwayland-server.so.

That went unnoticed, since both client and server code uses the
wl*interface symbols, which are present in both libwayland-client.so and
libwayland-server.so.

I've looked at correcting that, although that's orthogonal to this fix.

Note: wayland-egl does _not_ depend on wayland-client, although it does
need wayland-egl.h. There's no distinct package that provides it (I have
a WIP on the topic) so current solution will do for now.

v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
configure.ac
src/amd/vulkan/Makefile.am
src/egl/Makefile.am
src/egl/wayland/wayland-drm/Makefile.am
src/egl/wayland/wayland-egl/Makefile.am
src/gbm/Makefile.am
src/intel/Makefile.vulkan.am
src/vulkan/Makefile.am

index 5fa608c4dd0b4a798ead88295c08d5dfc4302e2c..f5d960f9d92c8a235c02b59a761b18b50c5a1dc6 100644 (file)
@@ -1710,7 +1710,8 @@ for plat in $platforms; do
     case "$plat" in
     wayland)
 
-        PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
+        PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED])
+        PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED])
 
         if test "x$WAYLAND_SCANNER" = "x:"; then
                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
index 3350f5454039e17586ccdec8ffe7b1de1c85b97c..438872bbb48c8fa8a59a84b62f35880ebf10be77 100644 (file)
@@ -90,13 +90,13 @@ endif
 
 if HAVE_PLATFORM_WAYLAND
 AM_CPPFLAGS += \
-       $(WAYLAND_CFLAGS) \
+       $(WAYLAND_CLIENT_CFLAGS) \
        -DVK_USE_PLATFORM_WAYLAND_KHR
 
 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
 
 VULKAN_LIB_DEPS += \
-       $(WAYLAND_LIBS)
+       $(WAYLAND_CLIENT_LIBS)
 endif
 
 noinst_LTLIBRARIES = libvulkan_common.la
index 8ff1ffaba18c39fcb5d8ec8f299af73830149603..f140f5d641217989da15106e02c032963339371b 100644 (file)
@@ -79,10 +79,12 @@ if HAVE_PLATFORM_WAYLAND
 drivers/dri2/linux-dmabuf-unstable-v1-protocol.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
 drivers/dri2/egl_dri2.lo: drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h
 
-AM_CFLAGS += $(WAYLAND_CFLAGS)
-libEGL_common_la_LIBADD += $(WAYLAND_LIBS)
+AM_CFLAGS += $(WAYLAND_CLIENT_CFLAGS)
+libEGL_common_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
 libEGL_common_la_LIBADD += $(LIBDRM_LIBS)
+AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
 libEGL_common_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la
+libEGL_common_la_LIBADD += $(WAYLAND_SERVER_LIBS)
 dri2_backend_FILES += \
        drivers/dri2/platform_wayland.c \
        drivers/dri2/linux-dmabuf-unstable-v1-protocol.c \
index f40ff4841e06651d0b49ea9ba97ff418fc1591eb..b27edddafb1d722ae702434214ee47b2f438db90 100644 (file)
@@ -2,7 +2,7 @@ AM_CFLAGS = -I$(top_srcdir)/src/egl/main \
            -I$(top_srcdir)/include \
            $(DEFINES) \
            $(VISIBILITY_CFLAGS) \
-           $(WAYLAND_CFLAGS) 
+           $(WAYLAND_SERVER_CFLAGS)
 
 noinst_LTLIBRARIES = libwayland-drm.la
 libwayland_drm_la_SOURCES = \
index 846fa6247b20486b2b4ca46a77a40ed027a014d3..34394a17f0e4f37d8fccb7b308d5adc1d79bffa1 100644 (file)
@@ -3,7 +3,7 @@ pkgconfig_DATA = wayland-egl.pc
 
 AM_CFLAGS = $(DEFINES) \
            $(VISIBILITY_CFLAGS) \
-           $(WAYLAND_CFLAGS)
+           $(WAYLAND_CLIENT_CFLAGS)
 
 lib_LTLIBRARIES = libwayland-egl.la
 noinst_HEADERS = wayland-egl-priv.h
index f5fa81c7c968d2e11d506e41906e77961a3bdb33..805208a3ca91f8eed96ffd8dd706c2732474f0aa 100644 (file)
@@ -31,8 +31,8 @@ libgbm_la_LIBADD = \
        $(DLOPEN_LIBS)
 
 if HAVE_PLATFORM_WAYLAND
-AM_CFLAGS += $(WAYLAND_CFLAGS)
-libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_LIBS)
+AM_CFLAGS += $(WAYLAND_SERVER_CFLAGS)
+libgbm_la_LIBADD += $(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.la $(WAYLAND_SERVER_LIBS)
 endif
 
 if HAVE_DRI2
index 8a19f96096a1b7171fc01205ead21709e7af00fe..271b0a5079b2d7af5907dd19c5d413fb11be7f0e 100644 (file)
@@ -160,12 +160,12 @@ endif
 
 if HAVE_PLATFORM_WAYLAND
 VULKAN_CPPFLAGS += \
-       $(WAYLAND_CFLAGS) \
+       $(WAYLAND_CLIENT_CFLAGS) \
        -DVK_USE_PLATFORM_WAYLAND_KHR
 
 VULKAN_SOURCES += $(VULKAN_WSI_WAYLAND_FILES)
 
-VULKAN_LIB_DEPS += $(WAYLAND_LIBS)
+VULKAN_LIB_DEPS += $(WAYLAND_CLIENT_LIBS)
 endif
 
 noinst_LTLIBRARIES += vulkan/libvulkan_common.la
index 47ef05b01f6da3aa25dd6d03a62b11eabd9b5399..8766952eafb841ddb03ebe345d6b5a10f2e9b907 100644 (file)
@@ -70,7 +70,7 @@ wsi/wayland-drm-client-protocol.h : $(WL_DRM_XML)
 if HAVE_PLATFORM_WAYLAND
 AM_CPPFLAGS += \
        -I$(top_builddir)/src/vulkan/wsi \
-       $(WAYLAND_CFLAGS) \
+       $(WAYLAND_CLIENT_CFLAGS) \
        -DVK_USE_PLATFORM_WAYLAND_KHR
 
 VULKAN_WSI_SOURCES += \