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 ])