When a configure test's result is merely a guess, not a determined fact, it's a good practice to flag it as a guess in the 'configure' output. Let's do so in a couple of more places.
2019-03-23 Bruno Haible <br...@clisp.org> Clarify that cross-compilation guesses are guesses. * m4/chown.m4 (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): When cross-compiling, add prefix 'guessing ' to gl_cv_func_chown_follows_symlink. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): When cross-compiling, add prefix 'guessing ' to gl_cv_func_fchownat_nofollow_works. * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): When cross-compiling, add prefix 'guessing ' to gl_cv_func_getcwd_abort_bug. * m4/glob.m4 (gl_GLOB): When cross-compiling, add prefix 'guessing ' to gl_cv_glob_lists_symlinks. * m4/malloc.m4 (_AC_FUNC_MALLOC_IF): When cross-compiling, add prefix 'guessing ' to ac_cv_func_malloc_0_nonnull. * m4/realloc.m4 (_AC_FUNC_REALLOC_IF): When cross-compiling, add prefix 'guessing ' to ac_cv_func_realloc_0_nonnull. * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, add prefix 'guessing ' to gl_cv_func_poll. * m4/iconv_open-utf.m4 (gl_FUNC_ICONV_OPEN_UTF_SUPPORT): When cross- compiling, add prefix 'guessing ' to gl_cv_func_iconv_supports_utf. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Update accordingly. diff --git a/m4/chown.m4 b/m4/chown.m4 index d92fd1c..ecfc0c0 100644 --- a/m4/chown.m4 +++ b/m4/chown.m4 @@ -1,4 +1,4 @@ -# serial 30 +# serial 31 # Determine whether we need the chown wrapper. dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2019 Free Software @@ -196,13 +196,16 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK], ]])], [gl_cv_func_chown_follows_symlink=yes], [gl_cv_func_chown_follows_symlink=no], - [gl_cv_func_chown_follows_symlink=yes] + [gl_cv_func_chown_follows_symlink="guessing yes"] ) ] ) - if test $gl_cv_func_chown_follows_symlink = no; then - AC_DEFINE([CHOWN_MODIFIES_SYMLINK], [1], - [Define if chown modifies symlinks.]) - fi + case "$gl_cv_func_chown_follows_symlink" in + *yes) ;; + *) + AC_DEFINE([CHOWN_MODIFIES_SYMLINK], [1], + [Define if chown modifies symlinks.]) + ;; + esac ]) diff --git a/m4/fchownat.m4 b/m4/fchownat.m4 index 023e3cb..042ef17 100644 --- a/m4/fchownat.m4 +++ b/m4/fchownat.m4 @@ -1,4 +1,4 @@ -# fchownat.m4 serial 3 +# fchownat.m4 serial 4 dnl Copyright (C) 2004-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -71,9 +71,9 @@ main () ]])], [gl_cv_func_fchownat_nofollow_works=yes], [gl_cv_func_fchownat_nofollow_works=no], - [gl_cv_func_fchownat_nofollow_works=no]) + [gl_cv_func_fchownat_nofollow_works="guessing no"]) ]) - AS_IF([test $gl_cv_func_fchownat_nofollow_works = no], [$1], [$2]) + AS_IF([test "$gl_cv_func_fchownat_nofollow_works" != yes], [$1], [$2]) ]) # gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG([ACTION-IF-BUGGY[, ACTION-IF-NOT_BUGGY]]) diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4 index 7929b67..f0f24a5 100644 --- a/m4/getcwd-abort-bug.m4 +++ b/m4/getcwd-abort-bug.m4 @@ -1,4 +1,4 @@ -# serial 9 +# serial 10 # Determine whether getcwd aborts when the length of the working directory # name is unusually large. Any length between 4k and 16k trigger the bug # when using glibc-2.4.90-9 or older. @@ -139,8 +139,16 @@ main () gl_cv_func_getcwd_abort_bug=yes else gl_cv_func_getcwd_abort_bug=no - fi], - [gl_cv_func_getcwd_abort_bug=yes]) + fi + ], + [gl_cv_func_getcwd_abort_bug="guessing yes"]) ]) - AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) + case "$gl_cv_func_getcwd_abort_bug" in + *yes) + $1 + ;; + *) + $2 + ;; + esac ]) diff --git a/m4/glob.m4 b/m4/glob.m4 index 93567af..00b4297 100644 --- a/m4/glob.m4 +++ b/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 21 +# glob.m4 serial 22 dnl Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -49,13 +49,14 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 ]])], [gl_cv_glob_lists_symlinks=yes], [gl_cv_glob_lists_symlinks=no], - [gl_cv_glob_lists_symlinks=no]) + [gl_cv_glob_lists_symlinks="guessing no"]) fi rm -f conf$$-globtest ]) - if test $gl_cv_glob_lists_symlinks = no; then - REPLACE_GLOB=1 - fi + case "$gl_cv_glob_lists_symlinks" in + *yes) ;; + *) REPLACE_GLOB=1 ;; + esac fi fi diff --git a/m4/iconv_open-utf.m4 b/m4/iconv_open-utf.m4 index b6547f7..df17132 100644 --- a/m4/iconv_open-utf.m4 +++ b/m4/iconv_open-utf.m4 @@ -1,4 +1,4 @@ -# iconv_open-utf.m4 serial 1 +# iconv_open-utf.m4 serial 2 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -214,13 +214,14 @@ int main () dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do. dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to" dnl direction. - gl_cv_func_iconv_supports_utf=no + gl_cv_func_iconv_supports_utf="guessing no" if test $gl_func_iconv_gnu = yes; then - gl_cv_func_iconv_supports_utf=yes + gl_cv_func_iconv_supports_utf="guessing yes" else changequote(,)dnl case "$host_os" in - solaris2.9 | solaris2.1[0-9]) gl_cv_func_iconv_supports_utf=yes ;; + solaris2.9 | solaris2.1[0-9]) + gl_cv_func_iconv_supports_utf="guessing yes" ;; esac changequote([,])dnl fi diff --git a/m4/iconv_open.m4 b/m4/iconv_open.m4 index 710a8ae..bfcd354 100644 --- a/m4/iconv_open.m4 +++ b/m4/iconv_open.m4 @@ -1,4 +1,4 @@ -# iconv_open.m4 serial 14 +# iconv_open.m4 serial 15 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -38,13 +38,16 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN], fi m4_ifdef([gl_FUNC_ICONV_OPEN_UTF_SUPPORT], [ gl_FUNC_ICONV_OPEN_UTF_SUPPORT - if test $gl_cv_func_iconv_supports_utf = no; then - REPLACE_ICONV_UTF=1 - AC_DEFINE([REPLACE_ICONV_UTF], [1], - [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.]) - REPLACE_ICONV=1 - gl_REPLACE_ICONV_OPEN - fi + case "$gl_cv_func_iconv_supports_utf" in + *yes) ;; + *) + REPLACE_ICONV_UTF=1 + AC_DEFINE([REPLACE_ICONV_UTF], [1], + [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.]) + REPLACE_ICONV=1 + gl_REPLACE_ICONV_OPEN + ;; + esac ]) fi ]) diff --git a/m4/malloc.m4 b/m4/malloc.m4 index f78a484..b9b8d4b 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,4 +1,4 @@ -# malloc.m4 serial 17 +# malloc.m4 serial 18 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -34,13 +34,20 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], # Guess yes on platforms where we know the result. *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; + ac_cv_func_malloc_0_nonnull="guessing yes" ;; # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; + *) ac_cv_func_malloc_0_nonnull="guessing no" ;; esac ]) ]) - AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) + case "$ac_cv_func_malloc_0_nonnull" in + *yes) + $1 + ;; + *) + $2 + ;; + esac ])# _AC_FUNC_MALLOC_IF ]) diff --git a/m4/poll.m4 b/m4/poll.m4 index 1fb6ef0..354d166 100644 --- a/m4/poll.m4 +++ b/m4/poll.m4 @@ -1,4 +1,4 @@ -# poll.m4 serial 18 +# poll.m4 serial 19 dnl Copyright (c) 2003, 2005-2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -54,16 +54,19 @@ AC_DEFUN([gl_FUNC_POLL], #if (defined(__APPLE__) && defined(__MACH__)) || defined(_AIX) This is MacOSX or AIX #endif -], [gl_cv_func_poll=no], [gl_cv_func_poll=yes])])]) - fi - if test $gl_cv_func_poll != yes; then - AC_CHECK_FUNC([poll], [ac_cv_func_poll=yes], [ac_cv_func_poll=no]) - if test $ac_cv_func_poll = no; then - HAVE_POLL=0 - else - REPLACE_POLL=1 - fi +], [gl_cv_func_poll="guessing no"], [gl_cv_func_poll="guessing yes"])])]) fi + case "$gl_cv_func_poll" in + *yes) ;; + *) + AC_CHECK_FUNC([poll], [ac_cv_func_poll=yes], [ac_cv_func_poll=no]) + if test $ac_cv_func_poll = no; then + HAVE_POLL=0 + else + REPLACE_POLL=1 + fi + ;; + esac if test $HAVE_POLL = 0 || test $REPLACE_POLL = 1; then : else diff --git a/m4/realloc.m4 b/m4/realloc.m4 index 1281a35..f9f15ad 100644 --- a/m4/realloc.m4 +++ b/m4/realloc.m4 @@ -1,4 +1,4 @@ -# realloc.m4 serial 15 +# realloc.m4 serial 16 dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -34,13 +34,20 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF], # Guess yes on platforms where we know the result. *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_realloc_0_nonnull=yes ;; + ac_cv_func_realloc_0_nonnull="guessing yes" ;; # If we don't know, assume the worst. - *) ac_cv_func_realloc_0_nonnull=no ;; + *) ac_cv_func_realloc_0_nonnull="guessing no" ;; esac ]) ]) - AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) + case "$ac_cv_func_realloc_0_nonnull" in + *yes) + $1 + ;; + *) + $2 + ;; + esac ])# AC_FUNC_REALLOC ])