Paul Eggert wrote:
> diff --git a/m4/fstatat.m4 b/m4/fstatat.m4
> index d53e8d9196..ceeb211d34 100644
> --- a/m4/fstatat.m4
> +++ b/m4/fstatat.m4
...
> + [gl_saved_CFLAGS=$CFLAGS
> + CFLAGS="$CFLAGS -Wno-nonnull"
> + AC_RUN_IFELSE(
...
I think two things are wrong here:
- A missing statement
CFLAGS=$gl_saved_CFLAGS
after the AC_RUN_IFELSE macro.
- The -Wno-nonnull option surely works only with gcc, clang, and
compatible compilers. How about testing whether -Wno-nonnull
works, first?
AC_CACHE_CHECK([whether -Wnonnull is supported],
[gl_cv_cc_nonnull_supported],
[gl_saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wnonnull"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[gl_cv_cc_nonnull_supported=yes],
[gl_cv_cc_nonnull_supported=no])
CFLAGS="$gl_saved_CFLAGS"
])
Bruno