lyx_flags="$lyx_flags build=$build_type"
case $build_type in
development) lyx_devel_version=yes
- AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
LYX_DATE="not released yet" ;;
prerelease) lyx_prerelease=yes ;;
esac
if test x$CLANG = xno; then
dnl Useful for global version info
gxx_version=`${CXX} -dumpversion`
+ case $gxx_version in
+ *.*) ;;
+ *) gxx_version=`${CXX} -dumpfullversion` ;;
+ esac
CXX_VERSION="($gxx_version)"
else
gxx_version=clang-$clang_version
dnl Warnings are for preprocessor too
if test x$enable_warnings = xyes ; then
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra"
- fi
+ case $gxx_version in
+ 9.*|10.*|clang-10*)
+ AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-copy";;
+ *);;
+ esac
+ fi
case $gxx_version in
2.*|3.*) AC_ERROR([gcc >= 4.6 is required]);;
4.0*|4.1*|4.2*|4.3*|4.4*|4.5*) AC_ERROR([gcc >= 4.6 is required]);;
lyx_flags="$lyx_flags stdlib-debug"
AC_DEFINE(_GLIBCXX_DEBUG, 1, [libstdc++ debug mode])
AC_DEFINE(_GLIBCXX_DEBUG_PEDANTIC, 1, [libstdc++ pedantic debug mode])
+ AC_SUBST(STDLIB_DEBUG, "-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
;;
esac
fi
dnl this is used by the macro blow to general a proper config.h.in entry
m4_define([LYX_AH_CHECK_DECL],
[AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1),
- [Define if you have the prototype for function `$1'])])
+ [Define if you have the prototype for function `$1'])])dnl`
dnl Check things are declared in headers to avoid errors or warnings.
dnl Called like LYX_CHECK_DECL(function, header1 header2...)
dnl this is used by the macro below to generate a proper config.h.in entry
m4_define([LYX_AH_CHECK_DEF],
[AH_TEMPLATE(AS_TR_CPP(HAVE_DEF_$1),
- [Define to 1 if `$1' is defined in `$2'])])
+ [Define to 1 if `$1' is defined in `$2'])])dnl'
dnl Check whether name is defined in header by using it in codesnippet.
dnl Called like LYX_CHECK_DEF(name, header, codesnippet)
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])])