Eli Schwartz wrote:
> > [case "$host_os" in
> > # Guess yes on musl systems.
> > *-musl* | midipix*) gl_cv_func_fpurge_works="guessing yes" ;;
> > # Otherwise obey --enable-cross-guesses.
> > *)
> > gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
> > esac
>
>
> As per the discussion, since we are saying case "b" is the correct
> probe, we want gl_cv_func_fpurge_works=no but we are "guessing yes" here.
>
> We should instead guess "no".
OK. Since this cross-compilation guess confuses you, let me remove it.
diff --git a/ChangeLog b/ChangeLog
index 51c477244f..9662b37341 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +3,7 @@
fpurge: Improve configure test.
Reported by Eli Schwartz <[email protected]>.
* m4/fpurge.m4 (gl_FUNC_FPURGE): If fpurge is not declared, don't test
- whether it works.
+ whether it works. Remove now-redundant cross-compilation guess.
2024-11-25 Simon Josefsson <[email protected]>
diff --git a/m4/fpurge.m4 b/m4/fpurge.m4
index a8911a07bd..1e31a18a9d 100644
--- a/m4/fpurge.m4
+++ b/m4/fpurge.m4
@@ -1,5 +1,5 @@
# fpurge.m4
-# serial 15
+# serial 16
dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,7 +9,6 @@
AC_DEFUN([gl_FUNC_FPURGE],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([stdio_ext.h])
AC_CHECK_FUNCS_ONCE([fpurge])
gl_CHECK_FUNCS_ANDROID([__fpurge], [[#include <stdio_ext.h>]])
@@ -55,12 +54,8 @@ AC_DEFUN([gl_FUNC_FPURGE]
]])],
[gl_cv_func_fpurge_works=yes],
[gl_cv_func_fpurge_works=no],
- [case "$host_os" in
- # Guess yes on musl systems.
- *-musl* | midipix*) gl_cv_func_fpurge_works="guessing yes" ;;
- # Otherwise obey --enable-cross-guesses.
- *)
gl_cv_func_fpurge_works="$gl_cross_guess_normal" ;;
- esac
+ [# Obey --enable-cross-guesses.
+ gl_cv_func_fpurge_works="$gl_cross_guess_normal"
])
else
gl_cv_func_fpurge_works=no