]> git.lyx.org Git - lyx.git/commitdiff
Autoconf: use included boost when system boost is not available
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 20 Dec 2020 18:26:01 +0000 (19:26 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 20 Dec 2020 18:27:01 +0000 (19:27 +0100)
config/lyxinclude.m4

index 0e9ff19b5bb8d5854aa8ef7cba2306ed2c57782f..6053a573a1a25817fb13a19405c73f7e6cbbba14 100644 (file)
@@ -454,6 +454,18 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
            [lyx_cv_with_included_boost=no])
        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 = xno ; then
+           AC_LANG_PUSH(C++)
+           AC_MSG_CHECKING([for boost library])
+           AC_LINK_IFELSE(
+               [AC_LANG_PROGRAM([#include <boost/crc.hpp>],
+                   [boost::crc_32_type crc;])],
+               [AC_MSG_RESULT([yes])],
+               [AC_MSG_RESULT([no])
+               lyx_cv_with_included_boost=yes
+           ])
+           AC_LANG_POP(C++)
+       fi
        if test x$lyx_cv_with_included_boost = xyes ; then
            lyx_included_libs="$lyx_included_libs boost"
            BOOST_INCLUDES='-I$(top_srcdir)/3rdparty/boost'