]> The Tcpdump Group git mirrors - tcpdump/commitdiff
configure: use ac_c_werror_flag to force unknown compiler flags to fail.
authorGuy Harris <[email protected]>
Sun, 25 Jul 2021 09:22:42 +0000 (02:22 -0700)
committerGuy Harris <[email protected]>
Sun, 25 Jul 2021 09:22:42 +0000 (02:22 -0700)
It's not a documented feature, but it's what the documented
AC_LANG_WERROR has used for 13 years, and there's no push/pop mechanism
for AC_LANG_WERROR, so you can't ensure that "fail even on warnings"
will be applied *only* in AC_LBL_CHECK_COMPILER_OPT(), as that's what we
want.  (If we can make sure that *no* compiler tests will produce
warnings, except for the ones we *want* to fail if they produce
warnings, we could just do AC_LANG_WERROR, but that might be tricky to
ensure in the general case.)

We do this because not all compilers have a command-line flag to force
all warnings, *including* warnings from unknown commad-line flags (I'm
looking at *you* IBM XL C!), so we have to have the test check to make
sure no warnings are produced (which, for AC_TRY_COMPILE(), means
"nothing is written to the standard output").

In addition, AC_TRY_COMPILE() generates a return; don't add one:

If we pass [return 0] to AC_TRY_COMPILE(), the test program it compiles
has two "return 0;" statements in a row, and one of the -W flags we
tests reports a warning for that.

We were testing whether a -W flag is supported by checking the standard
error of the compiler to see if *any* error/warning messages are
generated, and treating the flag as unsupported if any are, that meant
that -Wunreachable-code-return was be treated as unsupported even though
it *is* supported.

This should fix that.  (I'm so glad autoconf makes this all so difficult
to do correctly....)

aclocal.m4
configure

index ef5efe02387bc146ba9000048bb265746f70a6bc..f12438aea29c7e672fd02905e302578aa59d7e21 100644 (file)
@@ -210,36 +210,6 @@ AC_DEFUN(AC_LBL_C_INIT,
     fi
 ])
 
-dnl
-dnl Check whether, if you pass an unknown warning option to the
-dnl compiler, it fails or just prints a warning message and succeeds.
-dnl Set ac_lbl_unknown_warning_option_error to the appropriate flag
-dnl to force an error if it would otherwise just print a warning message
-dnl and succeed.
-dnl
-AC_DEFUN(AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR,
-    [
-       AC_MSG_CHECKING([whether the compiler fails when given an unknown warning option])
-       save_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
-       AC_TRY_COMPILE(
-           [],
-           [return 0],
-           [
-               AC_MSG_RESULT([no])
-               #
-               # We're assuming this is clang, where
-               # -Werror=unknown-warning-option is the appropriate
-               # option to force the compiler to fail.
-               #
-               ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
-           ],
-           [
-               AC_MSG_RESULT([yes])
-           ])
-       CFLAGS="$save_CFLAGS"
-    ])
-
 dnl
 dnl Check whether the compiler option specified as the second argument
 dnl is supported by the compiler and, if so, add it to the macro
@@ -249,21 +219,53 @@ AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
     [
        AC_MSG_CHECKING([whether the compiler supports the $2 option])
        save_CFLAGS="$CFLAGS"
-       if expr "x$2" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error $2"
-       elif expr "x$2" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror $2"
-       elif expr "x$2" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror $2"
-       else
-           CFLAGS="$CFLAGS $2"
-       fi
+       CFLAGS="$CFLAGS $2"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        AC_TRY_COMPILE(
            [],
-           [return 0],
+           [],
            [
                AC_MSG_RESULT([yes])
                CFLAGS="$save_CFLAGS"
@@ -273,6 +275,7 @@ AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
                AC_MSG_RESULT([no])
                CFLAGS="$save_CFLAGS"
            ])
+       ac_c_werror_flag="$save_ac_c_werror_flag"
     ])
 
 dnl
@@ -922,7 +925,6 @@ AC_DEFUN(AC_LBL_DEVEL,
            # Skip all the warning option stuff on some compilers.
            #
            if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
-                   AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR()
                    AC_LBL_CHECK_COMPILER_OPT($1, -W)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
                    AC_LBL_CHECK_COMPILER_OPT($1, -Wassign-enum)
index eb91be591c88b1a01e1f53288e09ae2cce86190c..d52bcc0592cbf3e10668e4de6492c35801173af6 100755 (executable)
--- a/configure
+++ b/configure
@@ -676,7 +676,6 @@ infodir
 docdir
 oldincludedir
 includedir
-runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -757,7 +756,6 @@ datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1010,15 +1008,6 @@ do
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1156,7 +1145,7 @@ fi
 for ac_var in  exec_prefix prefix bindir sbindir libexecdir datarootdir \
                datadir sysconfdir sharedstatedir localstatedir includedir \
                oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-               libdir localedir mandir runstatedir
+               libdir localedir mandir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1309,7 +1298,6 @@ Fine tuning of the installation directories:
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -6717,64 +6705,60 @@ rm -f os-proto.h
            #
            if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
-$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
-       save_CFLAGS="$CFLAGS"
-       CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-return 0
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               #
-               # We're assuming this is clang, where
-               # -Werror=unknown-warning-option is the appropriate
-               # option to force the compiler to fail.
-               #
-               ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
-
-else
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       CFLAGS="$save_CFLAGS"
-
-
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
 $as_echo_n "checking whether the compiler supports the -W option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-W" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
-       elif expr "x-W" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -W"
-       elif expr "x-W" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -W"
-       else
-           CFLAGS="$CFLAGS -W"
-       fi
+       CFLAGS="$CFLAGS -W"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -6794,30 +6778,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
 $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wall" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
-       elif expr "x-Wall" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wall"
-       elif expr "x-Wall" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wall"
-       else
-           CFLAGS="$CFLAGS -Wall"
-       fi
+       CFLAGS="$CFLAGS -Wall"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -6837,30 +6854,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5
 $as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wassign-enum" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
-       elif expr "x-Wassign-enum" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wassign-enum"
-       else
-           CFLAGS="$CFLAGS -Wassign-enum"
-       fi
+       CFLAGS="$CFLAGS -Wassign-enum"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -6880,30 +6930,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
 $as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wcast-qual" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wcast-qual"
-       elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wcast-qual"
-       else
-           CFLAGS="$CFLAGS -Wcast-qual"
-       fi
+       CFLAGS="$CFLAGS -Wcast-qual"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -6923,30 +7006,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
 $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
-       elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
-       else
-           CFLAGS="$CFLAGS -Wmissing-prototypes"
-       fi
+       CFLAGS="$CFLAGS -Wmissing-prototypes"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -6966,30 +7082,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
 $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
-       elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
-       elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
-       else
-           CFLAGS="$CFLAGS -Wmissing-variable-declarations"
-       fi
+       CFLAGS="$CFLAGS -Wmissing-variable-declarations"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7009,30 +7158,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
 $as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wold-style-definition" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wold-style-definition"
-       elif expr "x-Wold-style-definition" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
-       elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wold-style-definition"
-       else
-           CFLAGS="$CFLAGS -Wold-style-definition"
-       fi
+       CFLAGS="$CFLAGS -Wold-style-definition"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7052,30 +7234,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpedantic" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
-       elif expr "x-Wpedantic" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
-       elif expr "x-Wpedantic" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpedantic"
-       else
-           CFLAGS="$CFLAGS -Wpedantic"
-       fi
+       CFLAGS="$CFLAGS -Wpedantic"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7095,30 +7310,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
-       elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-arith"
-       else
-           CFLAGS="$CFLAGS -Wpointer-arith"
-       fi
+       CFLAGS="$CFLAGS -Wpointer-arith"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7138,30 +7386,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
 $as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
-       elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-sign"
-       elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wpointer-sign"
-       else
-           CFLAGS="$CFLAGS -Wpointer-sign"
-       fi
+       CFLAGS="$CFLAGS -Wpointer-sign"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7181,30 +7462,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
 $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wshadow" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
-       elif expr "x-Wshadow" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
-       elif expr "x-Wshadow" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wshadow"
-       else
-           CFLAGS="$CFLAGS -Wshadow"
-       fi
+       CFLAGS="$CFLAGS -Wshadow"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7224,30 +7538,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
 $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wsign-compare" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
-       elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wsign-compare"
-       elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wsign-compare"
-       else
-           CFLAGS="$CFLAGS -Wsign-compare"
-       fi
+       CFLAGS="$CFLAGS -Wsign-compare"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7267,30 +7614,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
 $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
-       elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
-       else
-           CFLAGS="$CFLAGS -Wstrict-prototypes"
-       fi
+       CFLAGS="$CFLAGS -Wstrict-prototypes"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7310,30 +7690,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
 $as_echo_n "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wunreachable-code-return" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code-return"
-       elif expr "x-Wunreachable-code-return" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
-       elif expr "x-Wunreachable-code-return" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
-       else
-           CFLAGS="$CFLAGS -Wunreachable-code-return"
-       fi
+       CFLAGS="$CFLAGS -Wunreachable-code-return"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7353,30 +7766,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
 $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
-       elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
-       elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
-       else
-           CFLAGS="$CFLAGS -Wused-but-marked-unused"
-       fi
+       CFLAGS="$CFLAGS -Wused-but-marked-unused"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7396,30 +7842,63 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
 $as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
        save_CFLAGS="$CFLAGS"
-       if expr "x-Wwrite-strings" : "x-W.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
-       elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
-       then
-           CFLAGS="$CFLAGS -Werror -Wwrite-strings"
-       else
-           CFLAGS="$CFLAGS -Wwrite-strings"
-       fi
+       CFLAGS="$CFLAGS -Wwrite-strings"
+       #
+       # XXX - yes, this depends on the way AC_LANG_WERROR works,
+       # but no mechanism is provided to turn AC_LANG_WERROR on
+       # *and then turn it back off*, so that we *only* do it when
+       # testing compiler options - 15 years after somebody asked
+       # for it:
+       #
+       #     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
+       #
+       save_ac_c_werror_flag="$ac_c_werror_flag"
+       ac_c_werror_flag=yes
+       #
+       # XXX - with autoconf 2.69, at least, the test program that this
+       # tries to compile is:
+       #
+       # int
+       # main ()
+       # {
+       #
+       #   ;
+       #   return 0;
+       # }
+       #
+       # Hopefully, neither the empty statement nor the old-style
+       # definition of main() will, with any command-line flag
+       # whatsoever with which we test, on any compiler we test,
+       # will produce any warnings whatsoever; if it does, the
+       # command-line flag with which we test will be treated as
+       # not being supported even if it is supported.
+       #
+       # Thanks, autoconf, for making it *so* difficult to generate
+       # an absolute minimum valid C-with-everything-prototyped
+       # program as a test program, such as
+       #
+       #       int main(void) { return 0; }.
+       #
+       # (with autoconf 2.69, at least, using AC_LANG_CONFTEST() with
+       # AC_LANG_SOURCE([<code>]) produces the same function boilerplate
+       # as AC_LANG_PROGRAM([],[<code>]), complete with the main()
+       # function wrapper, the extra semicolon, and the return 0;,
+       # raising the question of "why, then, do both AC_LANG_SOURCE()
+       # and AC_LANG_PROGRAM() exist?").
+       #
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
 main ()
 {
-return 0
+
   ;
   return 0;
 }
@@ -7439,6 +7918,7 @@ $as_echo "no" >&6; }
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       ac_c_werror_flag="$save_ac_c_werror_flag"
 
            fi