Jürgen Spitzmüller wrote:

> A short message: I think we are ready.

What about this small fix for external boost detection? The debian packagers
discovered that the current detection does not work for boost installations
with default settings anymore: The single threaded versions are not built
anymore by default.

This patch fixes this in a minimalistic way. It does not do any version
checks (bug 4118), but at least it makes LyX usable with external boost
installations using the default settings from boost.org (the official
debian boost packages use these for example).


Georg
Index: config/common.am
===================================================================
--- config/common.am	(Revision 29807)
+++ config/common.am	(Arbeitskopie)
@@ -33,10 +33,10 @@ BOOST_INCLUDES = -I$(top_srcdir)/boost
 BOOST_LIBS = $(top_builddir)/boost/liblyxboost.la
 else
 BOOST_INCLUDES =
-BOOST_FILESYSTEM = -lboost_filesystem
-BOOST_REGEX = -lboost_regex
-BOOST_SIGNALS = -lboost_signals
-BOOST_IOSTREAMS = -lboost_iostreams
+BOOST_FILESYSTEM = -lboost_filesystem$(BOOST_MT)
+BOOST_REGEX = -lboost_regex$(BOOST_MT)
+BOOST_SIGNALS = -lboost_signals$(BOOST_MT)
+BOOST_IOSTREAMS = -lboost_iostreams$(BOOST_MT)
 BOOST_LIBS = $(BOOST_FILESYSTEM) $(BOOST_REGEX) $(BOOST_SIGNALS) $(BOOST_IOSTREAMS)
 endif
 
Index: config/lyxinclude.m4
===================================================================
--- config/lyxinclude.m4	(Revision 29807)
+++ config/lyxinclude.m4	(Arbeitskopie)
@@ -430,6 +430,19 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
 	    [lyx_cv_with_included_boost=yes])
 	AM_CONDITIONAL(USE_INCLUDED_BOOST, test x$lyx_cv_with_included_boost = xyes)
 	AC_MSG_RESULT([$lyx_cv_with_included_boost])
+	if test x$lyx_cv_with_included_boost != xyes ; then
+		AC_CHECK_LIB(boost_signals, main, [lyx_boost_underscore=yes], [], [-lm])
+		AC_CHECK_LIB(boost_signals-mt, main, [lyx_boost_underscore_mt=yes], [], [-lm $LIBTHREAD])
+		if test x$lyx_boost_underscore_mt = xyes ; then
+			BOOST_MT="-mt"
+		else
+			BOOST_MT=""
+			if test x$lyx_boost_underscore != xyes ; then
+				LYX_ERROR([No suitable boost library found (use --with-included-boost)])
+			fi
+		fi
+		AC_SUBST(BOOST_MT)
+	fi
 ])
 
 

Reply via email to