From 4bae54afac2f184292c159dfa1e71891d9150b45 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Wed, 26 Nov 2008 14:22:17 +0000 Subject: [PATCH] Bug #536299 Fix underlinking issue: Conditionally add -lX11 to gnome-utils Follow-up to r17683. Patch by Andi5. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17723 57a11ea4-9604-0410-9ed3-97b8803252fd --- configure.in | 1 + src/gnome-utils/Makefile.am | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/configure.in b/configure.in index 2cae852737..e15c43880a 100644 --- a/configure.in +++ b/configure.in @@ -217,6 +217,7 @@ AM_CONDITIONAL(GNUCASH_SEPARATE_BUILDDIR, test "x${srcdir}" != "x.") # These are unavailable on windows/mingw32 AC_CHECK_HEADERS(X11/Xlib.h glob.h) +AM_CONDITIONAL(HAVE_X11_XLIB_H, test "x$ac_cv_header_X11_Xlib_h" = "xyes") AC_CHECK_FUNCS(chown gethostname getppid getuid gettimeofday gmtime_r) AC_CHECK_FUNCS(gethostid link) diff --git a/src/gnome-utils/Makefile.am b/src/gnome-utils/Makefile.am index 47f740b0c3..ccf5e9ae19 100644 --- a/src/gnome-utils/Makefile.am +++ b/src/gnome-utils/Makefile.am @@ -199,6 +199,10 @@ libgncmod_gnome_utils_la_LIBADD = \ ${REGEX_LIBS} \ ${LIBXML2_LIBS} +if HAVE_X11_XLIB_H + libgncmod_gnome_utils_la_LIBADD += -lX11 +endif + if BUILDING_FROM_SVN swig-gnome-utils.c: gnome-utils.i gnc-html.h \ ${top_srcdir}/src/base-typemaps.i