[eog] Explicitly link to libX11
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Explicitly link to libX11
- Date: Mon, 22 Feb 2010 22:21:46 +0000 (UTC)
commit b50cd2f99d948bc94fed9d58a21b3a3d25fe1612
Author: Felix Riemann <friemann gnome org>
Date: Fri Feb 12 17:41:33 2010 +0100
Explicitly link to libX11
Explicitly links eog to libX11 if necessary. Should fix linker errors
using non-recursive linkers. Includes fallback for X11 distributions
without pkg-config support. Fixes bug #609184.
configure.ac | 24 ++++++++++++++++++++++++
cut-n-paste/totem-screensaver/Makefile.am | 3 +++
src/Makefile.am | 9 ++++++++-
3 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a120bc5..77c9d7e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,7 @@ if test "x$have_lcms" = "xyes"; then
EOG_MODULES="$EOG_MODULES lcms"
fi
+AM_CONDITIONAL([HAVE_LCMS], [test "x$have_lcms" = "xyes"])
# *********************
# Exempi (optional)
@@ -265,6 +266,29 @@ PKG_CHECK_MODULES(EOG, $EOG_MODULES)
AC_SUBST(EOG_CFLAGS)
AC_SUBST(EOG_LIBS)
+# *******************************************************
+# libX11 (required for TotemScrSaver and Color Profiling)
+# *******************************************************
+
+# Check GDK rendering target
+gdk_target=`$PKG_CONFIG --variable=target gdk-2.0`
+
+if test "x$have_lcms" = "xyes" || test "$gdk_target" = "x11"; then
+ PKG_CHECK_MODULES(X11, [x11], have_x11=yes, have_x11=no)
+
+ if test "x$have_x11" != "xyes"; then
+ # Fallback for X11 releases without .pc-files
+ AC_PATH_XTRA
+ if test x$no_x = xyes ; then
+ AC_MSG_ERROR([X development libraries (libX11) not found])
+ else
+ X11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
+ AC_SUBST(X11_LIBS)
+ have_x11=yes
+ fi
+ fi
+fi
+
# *****
# GConf
# *****
diff --git a/cut-n-paste/totem-screensaver/Makefile.am b/cut-n-paste/totem-screensaver/Makefile.am
index 3f71bf5..756dcfc 100644
--- a/cut-n-paste/totem-screensaver/Makefile.am
+++ b/cut-n-paste/totem-screensaver/Makefile.am
@@ -4,9 +4,12 @@ libtotemscrsaver_la_SOURCES = \
totem-scrsaver.h \
totem-scrsaver.c
+libtotemscrsaver_la_LIBADD = $(X11_LIBS)
+
libtotemscrsaver_la_CFLAGS = \
-I$(top_srcdir)/src \
$(EOG_CFLAGS) \
+ $(X11_CFLAGS) \
$(WARN_CFLAGS)
-include $(top_srcdir)/git.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index bbf296f..b3bd975 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -158,6 +158,14 @@ libeog_la_CFLAGS = \
libeog_la_LIBADD = \
$(EOG_LIBS)
+if HAVE_LCMS
+libeog_la_CFLAGS += \
+ $(X11_CFLAGS)
+
+libeog_la_LIBADD += \
+ $(X11_LIBS)
+endif
+
if ENABLE_PYTHON
libeog_la_CFLAGS += \
$(NO_STRICT_ALIASING_CFLAGS) \
@@ -183,7 +191,6 @@ eog_CFLAGS = \
eog_LDADD = \
libeog.la \
$(EOG_LIBS) \
- $(X_LIBS) \
$(LIBJPEG) \
$(toolbar_LIB) \
$(screensaver_LIB) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]