From 65ef3251a8b8a24d7cac2f5d6b76dd6e7adc2841 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 26 May 2009 19:50:37 +0000 Subject: [PATCH] partial fix for external boost detection git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29856 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/common.am | 6 +++++- config/lyxinclude.m4 | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/config/common.am b/config/common.am index dc12d57a06..3756a07aa7 100644 --- a/config/common.am +++ b/config/common.am @@ -33,7 +33,11 @@ BOOST_INCLUDES = -I$(top_srcdir)/boost BOOST_LIBS = $(top_builddir)/boost/liblyxboost.a else BOOST_INCLUDES = -BOOST_LIBS = -lboost_filesystem -lboost_regex -lboost_signals -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 LIBS = diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 9ec41461e8..f173f6962c 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -430,6 +430,20 @@ 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_plain != xyes -a x$lyx_boost_underscore != xyes ; then + LYX_ERROR([No suitable boost library found (do not use --without-included-boost)]) + fi + fi + AC_SUBST(BOOST_SEP) + AC_SUBST(BOOST_MT) + fi ])