X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=config%2Flyxinclude.m4;h=0e9b426061af5f7d8dc276f24ec8679117c08450;hb=f6921d9161a03c6905c21d71d53f7499a4e7b6e2;hp=f77e3480f623d5db9fd451644f18a7d1f5a86654;hpb=134f3aedaf4150367cdc2f6855d695d3791a5353;p=features.git diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index f77e3480f6..0e9b426061 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -381,6 +381,10 @@ if test x$GXX = xyes; then 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 @@ -404,10 +408,13 @@ if test x$GXX = xyes; then fi dnl Warnings are for preprocessor too if test x$enable_warnings = xyes ; then - case $gxx_version in - 9.*) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra -Wno-deprecated-copy";; - *) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra";; - esac + AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra" + dnl Shut off warning -Wdeprecated-copy, which triggers too much + dnl note that g++ always accepts -Wno-xxx, even when -Wxxx is an error. + AC_LANG_PUSH(C++) + AX_CHECK_COMPILE_FLAG([-Wno-deprecated-copy], + [AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-copy"], [], [-Werror]) + AC_LANG_POP(C++) fi case $gxx_version in 2.*|3.*|4.@<:@0-6@:>@) AC_MSG_ERROR([gcc >= 4.7 is required]);; @@ -415,14 +422,14 @@ if test x$GXX = xyes; then if test x$enable_stdlib_debug = xyes ; then dnl FIXME: for clang/libc++, one should define _LIBCPP_DEBUG2=0 dnl See http://clang-developers.42468.n3.nabble.com/libc-debug-mode-td3336742.html - case $gxx_version in - *) + if test x$lyx_cv_lib_stdcxx = xyes ; then 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 + else + enable_stdlib_debug=no + fi fi fi @@ -602,6 +609,21 @@ dnl prevent clash with system zlib that might be dragged in by other libs ]) +dnl Usage: LYX_BUILD_INCLUDED_DTL : select if the included dtl should +dnl be built and installed. +AC_DEFUN([LYX_BUILD_INCLUDED_DTL],[ + AC_MSG_CHECKING([whether to build dv2dt and dt2dv]) + AC_ARG_WITH(included-dtl, + [AS_HELP_STRING([--with-included-dtl], [build and install the dv2dt and dt2dv programs supplied with LyX])], + [lyx_cv_with_included_dtl=$withval], + [lyx_cv_with_included_dtl=no]) + AM_CONDITIONAL(BUILD_INCLUDED_DTL, test x$lyx_cv_with_included_dtl = xyes) + AC_MSG_RESULT([$lyx_cv_with_included_dtl]) + if test x$lyx_cv_with_included_dtl = xyes ; then + lyx_flags="$lyx_flags build-dtl" + fi]) + + dnl Usage: LYX_CHECK_CALLSTACK_PRINTING: define LYX_CALLSTACK_PRINTING if the dnl necessary APIs are available to print callstacks. AC_DEFUN([LYX_CHECK_CALLSTACK_PRINTING],