@@ -439,6 +439,10 @@ if test "x$enable_werror" = "xyes"; then
439439 [ AC_LANG_SOURCE ( [ [ struct A { virtual void f(); }; struct B : A { void f() final; };] ] ) ] )
440440 AX_CHECK_COMPILE_FLAG ( [ -Werror=unreachable-code-loop-increment] ,[ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=unreachable-code-loop-increment"] ,,[ [ $CXXFLAG_WERROR] ] )
441441 AX_CHECK_COMPILE_FLAG ( [ -Werror=mismatched-tags] , [ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=mismatched-tags"] , [ ] , [ $CXXFLAG_WERROR] )
442+
443+ if test x$suppress_external_warnings != xno ; then
444+ AX_CHECK_COMPILE_FLAG ( [ -Werror=documentation] ,[ ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror=documentation"] ,,[ [ $CXXFLAG_WERROR] ] )
445+ fi
442446fi
443447
444448if test "x$CXXFLAGS_overridden" = "xno"; then
@@ -466,6 +470,10 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
466470 [ AC_LANG_SOURCE ( [ [ struct A { virtual void f(); }; struct B : A { void f() final; };] ] ) ] )
467471 AX_CHECK_COMPILE_FLAG ( [ -Wunreachable-code-loop-increment] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wunreachable-code-loop-increment"] ,,[ [ $CXXFLAG_WERROR] ] )
468472
473+ if test x$suppress_external_warnings != xno ; then
474+ AX_CHECK_COMPILE_FLAG ( [ -Wdocumentation] ,[ WARN_CXXFLAGS="$WARN_CXXFLAGS -Wdocumentation"] ,,[ [ $CXXFLAG_WERROR] ] )
475+ fi
476+
469477 dnl Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
470478 dnl unknown options if any other warning is produced. Test the -Wfoo case, and
471479 dnl set the -Wno-foo case if it works.
0 commit comments