]> git.lyx.org Git - lyx.git/blobdiff - config/lyxinclude.m4
* sk.po
[lyx.git] / config / lyxinclude.m4
index c62960ad88bb659084126ad9650e084af0d2a3bc..ed12f3d630566c6ee61bba20ff055665530f5f04 100644 (file)
@@ -321,8 +321,17 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
        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])
+               AC_LANG_PUSH(C++)
+               SAVED_LDFLAGS=$LDFLAGS
+
+               LDFLAGS="$SAVED_LDFLAGS -lboost_signals -lm"
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/signal.hpp>], [boost::signal<void ()> s;])], [lyx_boost_underscore=yes], [])
+               LDFLAGS="$SAVED_LDFLAGS -lboost_signals-mt -lm $LIBTHREAD"
+               AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <boost/signal.hpp>], [boost::signal<void ()> s;])], [lyx_boost_underscore_mt=yes], [])
+
+               LDFLAGS=$SAVED_LDFLAGS
+               AC_LANG_POP(C++)
+
                if test x$lyx_boost_underscore_mt = xyes ; then
                        BOOST_MT="-mt"
                else
@@ -512,12 +521,15 @@ case $lyx_use_packaging in
           default_prefix=$ac_default_prefix
           case ${host} in
           *cygwin*) lyx_install_cygwin=true ;;
-          esac ;;
+               *apple-darwin*) lyx_install_macosx=true ;;
+          esac
+          lyx_install_posix=true ;;
     *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
 esac
 AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
-AM_CONDITIONAL(INSTALL_CYGWIN, $lyx_install_cygwin)
 AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
+AM_CONDITIONAL(INSTALL_CYGWIN, $lyx_install_cygwin)
+AM_CONDITIONAL(INSTALL_POSIX, $lyx_install_posix)
 dnl Next two lines are only for autoconf <= 2.59
 datadir='${datarootdir}'
 AC_SUBST(datarootdir)
@@ -635,3 +647,24 @@ AC_DEFUN([LYX_SET_VERSION_INFO],
  AC_SUBST(LYX_DIR_VER,"$lyx_dir_ver")
  AC_SUBST(LYX_USERDIR_VER,"$lyx_userdir_ver")
 ])
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Copied from autoconf 2.68, added a check that python version is < 3.0
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+maxverhex = 50331648 # = 3.0.0.0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex or sys.hexversion >= maxverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])