[gtk-vnc] Explicitly link against X11 libs for XkbGetKeyboard
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Explicitly link against X11 libs for XkbGetKeyboard
- Date: Sat, 20 Mar 2010 18:10:08 +0000 (UTC)
commit f18f59cf0e1e162f2e7d6011396b0e875e144365
Author: Guido Günther <agx sigxcpu org>
Date: Sat Mar 20 18:04:29 2010 +0000
Explicitly link against X11 libs for XkbGetKeyboard
When building with --no-undefined and modern linkers, X11 won't
be found implicitly. Therefore it is neccessary to link directly
to X11
* configure.ac: Use pkgconfig to check for X11 libs
* src/Makefile.am: Link against X11
configure.ac | 4 ++++
src/Makefile.am | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2131706..f888ee3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,6 +105,10 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
+PKG_CHECK_MODULES(X11, x11,,AC_MSG_NOTICE([Not building against X11]))
+AC_SUBST(X11_CFLAGS)
+AC_SUBST(X11_LIBS)
+
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
diff --git a/src/Makefile.am b/src/Makefile.am
index 865505e..b066649 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,9 +5,11 @@ lib_LTLIBRARIES = libgtk-vnc-1.0.la
libgtk_vnc_1_0_la_LIBADD = @GTK_LIBS@ @GNUTLS_LIBS@ \
@GTHREAD_LIBS@ @SASL_LIBS@ \
+ @X11_LIBS@ \
../gnulib/lib/libgnu.la
libgtk_vnc_1_0_la_CFLAGS = @GTK_CFLAGS@ @GNUTLS_CFLAGS@ \
@GTHREAD_CFLAGS@ @SASL_CFLAGS@ @WARNING_CFLAGS@ \
+ @X11_CFLAGS@ \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"gtk-vnc\" \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]