diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2016-08-19 12:07:13 -0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-08-19 21:25:07 +0400 |
commit | 11dcc17b0a01e9f06a3cc6dbb6051326779677e3 (patch) | |
tree | 9a6c7c7316d2e095d10081a46eab67d8e94ef75e | |
parent | a131a63936fc32d3561333431ee43bf0a7bbe2f9 (diff) |
Add missing libX11 reference to build system
GTK on its own is not enough to ensure libX11 is properly linked with
libspice-client-gtk. This patch adds X11_LIBS to SPICE_GTK_LIBADD_COMMON
(and X11_CFLAGS to a relevant section as well) in src/Makefile.am, and
performs an approriate pkg-config based check to determine the correct
values in configure.ac when not building for win32 or quartz.
For more info see http://bugs.gentoo.org/585118
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b9458b7..9b2351d 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,10 @@ 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_quartz" != "xyes" && test "x$have_win32" != "xyes"], + [PKG_CHECK_MODULES(X11,x11)]) +AC_SUBST(X11_CFLAGS) +AC_SUBST(X11_LIBS) AC_ARG_WITH([pnp-ids-path], AC_HELP_STRING([--with-pnp-ids-path], diff --git a/src/Makefile.am b/src/Makefile.am index fd90db3..7542580 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -100,6 +100,7 @@ SPICE_COMMON_CPPFLAGS = \ $(GUDEV_CFLAGS) \ $(SOUP_CFLAGS) \ $(PHODAV_CFLAGS) \ + $(X11_CFLAGS) \ $(LZ4_CFLAGS) \ $(NULL) @@ -120,6 +121,7 @@ SPICE_GTK_LIBADD_COMMON = \ libspice-client-glib-2.0.la \ $(GTK_LIBS) \ $(CAIRO_LIBS) \ + $(X11_LIBS) \ $(LIBM) \ $(NULL) |