From 6a4682e19fa64b84164d88fff8bb6e0d97b7e9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Wed, 17 Aug 2016 16:22:57 +0200 Subject: [PATCH] build: Fix missing linking to libX11 when using X11 backend, #97383 --- configure.ac | 8 +++++++- src/Makefile.am | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b9458b7..311af4d 100644 --- a/configure.ac +++ b/configure.ac @@ -160,12 +160,18 @@ PKG_CHECK_EXISTS([gtk+-quartz-$with_gtk], [have_quartz=yes], [have_quartz=no]) AS_IF([test "x$have_quartz" = "xyes"], [AC_DEFINE([HAVE_QUARTZ], 1, [Have Quartz?])]) AM_CONDITIONAL([WITH_DISPLAY_QUARTZ], [test "x$have_quartz" = "xyes"]) +PKG_CHECK_EXISTS([gtk+-x11-$with_gtk], [have_x11=yes], [have_x11=no]) +AS_IF([test "x$have_x11" = "xyes"], [AC_DEFINE([HAVE_X11], 1, [Have X11?])]) +AM_CONDITIONAL([WITH_DISPLAY_X11], [test "x$have_x11" = "xyes"]) + PKG_CHECK_EXISTS([gtk+-win32-$with_gtk], [have_win32=yes], [have_win32=no]) AS_IF([test "x$have_win32" = "xyes"], [AC_DEFINE([HAVE_WINDOWS], 1, [Have Win32?])]) AM_CONDITIONAL([WITH_DISPLAY_WINDOWS], [test "x$have_win32" = "xyes"]) AC_CHECK_HEADERS([X11/XKBlib.h]) - +AS_IF([test "x$have_x11" = "xyes"], + [PKG_CHECK_MODULES(X11, x11) + SPICE_GTK_REQUIRES="${SPICE_GTK_REQUIRES} x11"]) AC_ARG_WITH([pnp-ids-path], AC_HELP_STRING([--with-pnp-ids-path], [Specify the path to pnp.ids @<:@default=(internal)@:>@]), diff --git a/src/Makefile.am b/src/Makefile.am index a820259..0bf13e5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -119,6 +119,7 @@ SPICE_GTK_LIBADD_COMMON = \ libspice-client-glib-2.0.la \ $(GTK_LIBS) \ $(CAIRO_LIBS) \ + $(X11_LIBS) \ $(LIBM) \ $(NULL) -- 2.9.3