diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 9fe42e8847..f0e2ad1c84 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -409,7 +409,8 @@ if test x$GXX = xyes; then 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";; + 9.*) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra" + AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-copy";; *) AM_CPPFLAGS="$AM_CPPFLAGS -Wall -Wextra";; esac fi