Blob Blame History Raw
From 0c8ebc521dfc62ddb7a135ede5a601af68d94e8b Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 10 Feb 2010 16:28:46 +0000
Subject: [PATCH] Fix linking with LCMS support enabled

We use libX11 functions, so we need to link against them.

/usr/bin/ld: ./.libs/libeog.a(libeog_la-eog-window.o): undefined reference to symbol 'XFree'
/usr/bin/ld: note: 'XFree' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line
/usr/lib64/libX11.so.6: could not read symbols: Invalid operation

https://bugzilla.gnome.org/show_bug.cgi?id=609553
---
 configure.ac    |    2 +-
 src/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index a120bc5..1e011ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,7 +147,7 @@ AM_CONDITIONAL([HAVE_EXIF], [test "x$have_exif" = "xyes"])
 AC_ARG_WITH([cms], AC_HELP_STRING([--without-cms], [disable colour management support]))
 have_lcms=no
 if test x$with_cms != xno; then
-    PKG_CHECK_MODULES(LCMS, lcms, have_lcms=yes, have_lcms=no)
+    PKG_CHECK_MODULES(LCMS, lcms x11, have_lcms=yes, have_lcms=no)
 fi
 if test "x$have_lcms" = "xyes"; then
   AC_DEFINE(HAVE_LCMS, 1, [Little CMS Support.])
diff --git a/src/Makefile.am b/src/Makefile.am
index bbf296f..5ad8af9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -156,7 +156,7 @@ libeog_la_CFLAGS =						\
 	-DEOG_PLUGIN_DIR=\""$(libdir)/eog/plugins"\"
 
 libeog_la_LIBADD = \
-	$(EOG_LIBS)
+	$(EOG_LIBS) $(LCMS_LIBS)
 
 if ENABLE_PYTHON
 libeog_la_CFLAGS += 			\
-- 
1.6.6