From 6863fe9606ec4c13a0644ea347d8b1877cb5f9fc Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sun, 26 Jun 2016 19:45:50 +0200 Subject: [PATCH] Fix build with autotools and gcc 6 --- config/lyxinclude.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index c43ae99d80..629247b3e5 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -841,9 +841,17 @@ dnl Defines HAVE_DEF_{NAME} AC_DEFUN([LYX_CHECK_DEF], [LYX_AH_CHECK_DEF($1, $2) AC_MSG_CHECKING([whether $1 is defined by header $2]) + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS" + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$AM_CXXFLAGS $CXXFLAGS" + AC_LANG_PUSH(C++) AC_TRY_COMPILE([#include <$2>], [$3], lyx_have_def_name=yes, lyx_have_def_name=no) + AC_LANG_POP(C++) + CXXFLAGS=$save_CXXFLAGS + CPPFLAGS=$save_CPPFLAGS AC_MSG_RESULT($lyx_have_def_name) if test "x$lyx_have_def_name" = xyes; then AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DEF_$1))