mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Cleanup the code for boost configuration
This commit is contained in:
parent
2730f9e2b5
commit
3cbd343a55
@ -28,14 +28,4 @@ endif
|
|||||||
|
|
||||||
SUFFIXES = .gch
|
SUFFIXES = .gch
|
||||||
|
|
||||||
if USE_INCLUDED_BOOST
|
|
||||||
BOOST_INCLUDES = -I$(top_srcdir)/boost
|
|
||||||
BOOST_LIBS = $(top_builddir)/boost/liblyxboost.a
|
|
||||||
else
|
|
||||||
BOOST_INCLUDES =
|
|
||||||
BOOST_REGEX = -lboost_regex$(BOOST_MT)
|
|
||||||
BOOST_SIGNALS = -lboost_signals$(BOOST_MT)
|
|
||||||
BOOST_LIBS = $(BOOST_REGEX) $(BOOST_SIGNALS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
LIBS =
|
LIBS =
|
||||||
|
@ -311,28 +311,39 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
|
|||||||
[lyx_cv_with_included_boost=yes])
|
[lyx_cv_with_included_boost=yes])
|
||||||
AM_CONDITIONAL(USE_INCLUDED_BOOST, test x$lyx_cv_with_included_boost = xyes)
|
AM_CONDITIONAL(USE_INCLUDED_BOOST, test x$lyx_cv_with_included_boost = xyes)
|
||||||
AC_MSG_RESULT([$lyx_cv_with_included_boost])
|
AC_MSG_RESULT([$lyx_cv_with_included_boost])
|
||||||
if test x$lyx_cv_with_included_boost != xyes ; then
|
if test x$lyx_cv_with_included_boost = xyes ; then
|
||||||
AC_LANG_PUSH(C++)
|
BOOST_INCLUDES='-I$(top_srcdir)/boost'
|
||||||
save_LIBS=$LIBS
|
BOOST_LIBS='$(top_builddir)/boost/liblyxboost.a'
|
||||||
|
else
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
save_LIBS=$LIBS
|
||||||
|
|
||||||
LIBS="$save_LIBS -lboost_signals -lm"
|
AC_MSG_CHECKING([for multithreaded boost libraries])
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/signal.hpp>], [boost::signal<void ()> s;])], [lyx_boost_plain=yes], [])
|
LIBS="$save_LIBS -lboost_signals-mt -lm $LIBTHREAD"
|
||||||
LIBS="$save_LIBS -lboost_signals-mt -lm $LIBTHREAD"
|
AC_LINK_IFELSE(
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/signal.hpp>], [boost::signal<void ()> s;])], [lyx_boost_mt=yes], [])
|
[AC_LANG_PROGRAM([#include <boost/signal.hpp>],
|
||||||
|
[boost::signal<void ()> s;])],
|
||||||
LIBS=$save_LIBS
|
[AC_MSG_RESULT([yes])
|
||||||
AC_LANG_POP(C++)
|
BOOST_MT="-mt"],
|
||||||
|
[AC_MSG_RESULT([no])
|
||||||
if test x$lyx_boost_mt = xyes ; then
|
AC_MSG_CHECKING([for plain boost libraries])
|
||||||
BOOST_MT="-mt"
|
LIBS="$save_LIBS -lboost_signals -lm"
|
||||||
else
|
AC_LINK_IFELSE(
|
||||||
BOOST_MT=""
|
[AC_LANG_PROGRAM([#include <boost/signal.hpp>],
|
||||||
if test x$lyx_boost_plain != xyes ; then
|
[boost::signal<void ()> s;])],
|
||||||
AC_MSG_ERROR([cannot find suitable boost library (do not use --without-included-boost)])
|
[AC_MSG_RESULT([yes])
|
||||||
fi
|
BOOST_MT=""],
|
||||||
fi
|
[AC_MSG_RESULT([no])
|
||||||
AC_SUBST(BOOST_MT)
|
AC_MSG_ERROR([cannot find suitable boost library (do not use --without-included-boost)])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
LIBS=$save_LIBS
|
||||||
|
AC_LANG_POP(C++)
|
||||||
|
BOOST_INCLUDES=
|
||||||
|
BOOST_LIBS="-lboost_regex${BOOST_MT} -lboost_signals${BOOST_MT}"
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(BOOST_INCLUDES)
|
||||||
|
AC_SUBST(BOOST_LIBS)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user