summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-05-01 22:47:37 +0200
committerBruno Haible <bruno@clisp.org>2012-05-04 03:33:08 +0200
commit9f1f81e4362dd265a2fa54b30b16ceed123cd4e5 (patch)
tree502426cd9a3222dbca4572a328ebda918c9c68e0
parent6d3de8267949cc5cf4f5ff98efcd132d93a9c861 (diff)
downloadgnulib-9f1f81e4362dd265a2fa54b30b16ceed123cd4e5.tar.gz
Avoid "guessing no" guesses when cross-compiling to glibc systems.
* m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes". * m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes". * m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes". * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes". * m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_chown_slash_works, gl_cv_func_chown_ctime_works to "guessing yes". * m4/lchown.m4 (gl_FUNC_LCHOWN): Update. * m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes". * m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes". * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_open_directory_works to "guessing yes". * m4/fstat.m4 (gl_FUNC_FSTAT): Update. * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to "guessing yes". * m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes". * m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_floorf_ieee to "guessing yes". * m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes". * m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes". * m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes". * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_getgroups_works to "guessing yes". * m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes". * m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_hypotf_ieee to "guessing yes". * m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_hypotl_ieee to "guessing yes". * m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_link_works to "guessing yes". * m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes". * m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes". * m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes". * m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log10f_ieee to "guessing yes". * m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes". * m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log1pf_ieee to "guessing yes". * m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log1pl_ieee to "guessing yes". * m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes". * m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes". * m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works, gl_cv_func_mkdir_trailing_dot_works to "guessing yes". * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_mkfifo_works to "guessing yes". * m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_mknod_works to "guessing yes". * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to "guessing yes". * m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes". * m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes". * m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes". * m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_svid_putenv to "guessing yes". * m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_readlink_works to "guessing yes". * m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to "guessing yes". * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee to "guessing yes". * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee to "guessing yes". * m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_rmdir_works to "guessing yes". * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_unlink_honors_slashes, gl_cv_func_unlink_parent_fails to "guessing yes". * m4/remove.m4 (gl_FUNC_REMOVE): Update. * m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_rename_slash_dst_works, gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works, gl_cv_func_rename_dest_works to "guessing yes". * m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes". * m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_roundf_ieee to "guessing yes". * m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_roundl_ieee to "guessing yes". * m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_setenv_works to "guessing yes". (gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_unsetenv_works to "guessing yes". * m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_sleep_works to "guessing yes". * m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_stat_file_slash to "guessing yes". * m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When cross-compiling to glibc systems, set gl_cv_func_symlink_works to "guessing yes". * m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes". * m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_truncf_ieee to "guessing yes". * m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_truncl_ieee to "guessing yes". * m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_usleep_works to "guessing yes". * m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross- compiling to glibc systems, set gl_cv_func_futimesat_works to "guessing yes".
-rw-r--r--ChangeLog153
-rw-r--r--m4/cbrtl.m411
-rw-r--r--m4/ceil.m411
-rw-r--r--m4/ceilf.m411
-rw-r--r--m4/ceill.m411
-rw-r--r--m4/chown.m445
-rw-r--r--m4/exp2l.m411
-rw-r--r--m4/expm1.m411
-rw-r--r--m4/fchdir.m420
-rw-r--r--m4/fdopendir.m420
-rw-r--r--m4/floor.m411
-rw-r--r--m4/floorf.m411
-rw-r--r--m4/fmod.m411
-rw-r--r--m4/fmodf.m411
-rw-r--r--m4/fmodl.m411
-rw-r--r--m4/fstat.m412
-rw-r--r--m4/getgroups.m418
-rw-r--r--m4/hypot.m411
-rw-r--r--m4/hypotf.m411
-rw-r--r--m4/hypotl.m411
-rw-r--r--m4/lchown.m418
-rw-r--r--m4/link.m420
-rw-r--r--m4/log.m411
-rw-r--r--m4/log10.m411
-rw-r--r--m4/log10f.m411
-rw-r--r--m4/log1p.m411
-rw-r--r--m4/log1pf.m411
-rw-r--r--m4/log1pl.m411
-rw-r--r--m4/log2.m411
-rw-r--r--m4/log2f.m411
-rw-r--r--m4/logf.m411
-rw-r--r--m4/mkdir.m441
-rw-r--r--m4/mkfifo.m424
-rw-r--r--m4/mknod.m425
-rw-r--r--m4/mkstemp.m420
-rw-r--r--m4/modf.m411
-rw-r--r--m4/modff.m411
-rw-r--r--m4/modfl.m411
-rw-r--r--m4/putenv.m420
-rw-r--r--m4/readlink.m430
-rw-r--r--m4/remainder.m411
-rw-r--r--m4/remainderf.m411
-rw-r--r--m4/remainderl.m411
-rw-r--r--m4/remove.m413
-rw-r--r--m4/rename.m494
-rw-r--r--m4/rmdir.m420
-rw-r--r--m4/round.m411
-rw-r--r--m4/roundf.m411
-rw-r--r--m4/roundl.m411
-rw-r--r--m4/setenv.m438
-rw-r--r--m4/sleep.m420
-rw-r--r--m4/stat.m410
-rw-r--r--m4/symlink.m420
-rw-r--r--m4/trunc.m411
-rw-r--r--m4/truncf.m411
-rw-r--r--m4/truncl.m411
-rw-r--r--m4/unlink.m430
-rw-r--r--m4/usleep.m420
-rw-r--r--m4/utimens.m422
59 files changed, 904 insertions, 234 deletions
diff --git a/ChangeLog b/ChangeLog
index b247bce662..8fafa5c335 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,158 @@
2012-05-03 Bruno Haible <bruno@clisp.org>
+ Avoid "guessing no" guesses when cross-compiling to glibc systems.
+ * m4/cbrtl.m4 (gl_FUNC_CBRTL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_cbrtl_ieee to "guessing yes".
+ * m4/ceil.m4 (gl_FUNC_CEIL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_ceil_ieee to "guessing yes".
+ * m4/ceilf.m4 (gl_FUNC_CEILF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_ceilf_ieee to "guessing yes".
+ * m4/ceill.m4 (gl_FUNC_CEILL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_ceill_ieee to "guessing yes".
+ * m4/chown.m4 (gl_FUNC_CHOWN): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_chown_slash_works,
+ gl_cv_func_chown_ctime_works to "guessing yes".
+ * m4/lchown.m4 (gl_FUNC_LCHOWN): Update.
+ * m4/exp2l.m4 (gl_FUNC_EXP2L): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_exp2l_ieee to "guessing yes".
+ * m4/expm1.m4 (gl_FUNC_EXPM1): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_expm1_ieee to "guessing yes".
+ * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_open_directory_works to
+ "guessing yes".
+ * m4/fstat.m4 (gl_FUNC_FSTAT): Update.
+ * m4/fdopendir.m4 (gl_FUNC_FDOPENDIR): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_fdopendir_works to
+ "guessing yes".
+ * m4/floor.m4 (gl_FUNC_FLOOR): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_floor_ieee to "guessing yes".
+ * m4/floorf.m4 (gl_FUNC_FLOORF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_floorf_ieee to
+ "guessing yes".
+ * m4/fmod.m4 (gl_FUNC_FMOD): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_fmod_ieee to "guessing yes".
+ * m4/fmodf.m4 (gl_FUNC_FMODF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_fmodf_ieee to "guessing yes".
+ * m4/fmodl.m4 (gl_FUNC_FMODL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_fmodl_ieee to "guessing yes".
+ * m4/getgroups.m4 (gl_FUNC_GETGROUPS): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_getgroups_works to
+ "guessing yes".
+ * m4/hypot.m4 (gl_FUNC_HYPOT): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_hypot_ieee to "guessing yes".
+ * m4/hypotf.m4 (gl_FUNC_HYPOTF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_hypotf_ieee to
+ "guessing yes".
+ * m4/hypotl.m4 (gl_FUNC_HYPOTL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_hypotl_ieee to
+ "guessing yes".
+ * m4/link.m4 (gl_FUNC_LINK): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_link_works to "guessing yes".
+ * m4/log.m4 (gl_FUNC_LOG): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log_ieee to "guessing yes".
+ * m4/logf.m4 (gl_FUNC_LOGF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_logf_ieee to "guessing yes".
+ * m4/log10.m4 (gl_FUNC_LOG10): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log10_ieee to "guessing yes".
+ * m4/log10f.m4 (gl_FUNC_LOG10F): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log10f_ieee to
+ "guessing yes".
+ * m4/log1p.m4 (gl_FUNC_LOG1P): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log1p_ieee to "guessing yes".
+ * m4/log1pf.m4 (gl_FUNC_LOG1PF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log1pf_ieee to
+ "guessing yes".
+ * m4/log1pl.m4 (gl_FUNC_LOG1PL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log1pl_ieee to
+ "guessing yes".
+ * m4/log2.m4 (gl_FUNC_LOG2): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log2_ieee to "guessing yes".
+ * m4/log2f.m4 (gl_FUNC_LOG2F): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_log2f_ieee to "guessing yes".
+ * m4/mkdir.m4 (gl_FUNC_MKDIR): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_mkdir_trailing_slash_works,
+ gl_cv_func_mkdir_trailing_dot_works to "guessing yes".
+ * m4/mkfifo.m4 (gl_FUNC_MKFIFO): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_mkfifo_works to
+ "guessing yes".
+ * m4/mknod.m4 (gl_FUNC_MKNOD): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_mknod_works to
+ "guessing yes".
+ * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_working_mkstemp to
+ "guessing yes".
+ * m4/modf.m4 (gl_FUNC_MODF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_modf_ieee to "guessing yes".
+ * m4/modff.m4 (gl_FUNC_MODFF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_modff_ieee to "guessing yes".
+ * m4/modfl.m4 (gl_FUNC_MODFL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_modfl_ieee to "guessing yes".
+ * m4/putenv.m4 (gl_FUNC_PUTENV): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_svid_putenv to
+ "guessing yes".
+ * m4/readlink.m4 (gl_FUNC_READLINK): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_readlink_works to
+ "guessing yes".
+ * m4/remainder.m4 (gl_FUNC_REMAINDER): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_remainder_ieee to
+ "guessing yes".
+ * m4/remainderf.m4 (gl_FUNC_REMAINDERF): Require AC_CANONICAL_HOST.
+ When cross-compiling to glibc systems, set gl_cv_func_remainderf_ieee
+ to "guessing yes".
+ * m4/remainderl.m4 (gl_FUNC_REMAINDERL): Require AC_CANONICAL_HOST.
+ When cross-compiling to glibc systems, set gl_cv_func_remainderl_ieee
+ to "guessing yes".
+ * m4/rmdir.m4 (gl_FUNC_RMDIR): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_rmdir_works to
+ "guessing yes".
+ * m4/unlink.m4 (gl_FUNC_UNLINK): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_unlink_honors_slashes,
+ gl_cv_func_unlink_parent_fails to "guessing yes".
+ * m4/remove.m4 (gl_FUNC_REMOVE): Update.
+ * m4/rename.m4 (gl_FUNC_RENAME): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_rename_slash_dst_works,
+ gl_cv_func_rename_slash_src_works, gl_cv_func_rename_link_works,
+ gl_cv_func_rename_dest_works to "guessing yes".
+ * m4/round.m4 (gl_FUNC_ROUND): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_round_ieee to "guessing yes".
+ * m4/roundf.m4 (gl_FUNC_ROUNDF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_roundf_ieee to
+ "guessing yes".
+ * m4/roundl.m4 (gl_FUNC_ROUNDL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_roundl_ieee to
+ "guessing yes".
+ * m4/setenv.m4 (gl_FUNC_SETENV): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_setenv_works to
+ "guessing yes".
+ (gl_FUNC_UNSETENV): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_unsetenv_works to
+ "guessing yes".
+ * m4/sleep.m4 (gl_FUNC_SLEEP): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_sleep_works to
+ "guessing yes".
+ * m4/stat.m4 (gl_FUNC_STAT): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_stat_file_slash to
+ "guessing yes".
+ * m4/symlink.m4 (gl_FUNC_SYMLINK): Require AC_CANONICAL_HOST. When
+ cross-compiling to glibc systems, set gl_cv_func_symlink_works to
+ "guessing yes".
+ * m4/trunc.m4 (gl_FUNC_TRUNC): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_trunc_ieee to "guessing yes".
+ * m4/truncf.m4 (gl_FUNC_TRUNCF): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_truncf_ieee to
+ "guessing yes".
+ * m4/truncl.m4 (gl_FUNC_TRUNCL): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_truncl_ieee to
+ "guessing yes".
+ * m4/usleep.m4 (gl_FUNC_USLEEP): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_usleep_works to
+ "guessing yes".
+ * m4/utimens.m4 (gl_UTIMENS): Require AC_CANONICAL_HOST. When cross-
+ compiling to glibc systems, set gl_cv_func_futimesat_works to
+ "guessing yes".
+
+2012-05-03 Bruno Haible <bruno@clisp.org>
+
Say "guessing yes" or "guessing no" when cross-compiling.
* m4/dup2.m4 (gl_FUNC_DUP2): When cross-compiling, set
gl_cv_func_dup2_works to "guessing yes" or "guessing no".
diff --git a/m4/cbrtl.m4 b/m4/cbrtl.m4
index 323a5fcd28..af7782cbf0 100644
--- a/m4/cbrtl.m4
+++ b/m4/cbrtl.m4
@@ -1,4 +1,4 @@
-# cbrtl.m4 serial 4
+# cbrtl.m4 serial 5
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FUNC_CBRTL],
m4_ifdef([gl_FUNC_CBRTL_IEEE], [
if test $gl_cbrtl_required = ieee && test $REPLACE_CBRTL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether cbrtl works according to ISO C 99 with IEC 60559],
[gl_cv_func_cbrtl_ieee],
[
@@ -70,7 +71,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_cbrtl_ieee=yes],
[gl_cv_func_cbrtl_ieee=no],
- [gl_cv_func_cbrtl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_cbrtl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_cbrtl_ieee" in
diff --git a/m4/ceil.m4 b/m4/ceil.m4
index fd9ac4cb5c..890517b493 100644
--- a/m4/ceil.m4
+++ b/m4/ceil.m4
@@ -1,4 +1,4 @@
-# ceil.m4 serial 8
+# ceil.m4 serial 9
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_CEIL],
fi
m4_ifdef([gl_FUNC_CEIL_IEEE], [
if test $gl_ceil_required = ieee && test $REPLACE_CEIL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether ceil works according to ISO C 99 with IEC 60559],
[gl_cv_func_ceil_ieee],
[
@@ -44,7 +45,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_ceil_ieee=yes],
[gl_cv_func_ceil_ieee=no],
- [gl_cv_func_ceil_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ceil_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceil_ieee" in
diff --git a/m4/ceilf.m4 b/m4/ceilf.m4
index 6212d7f1f2..b4efc6668e 100644
--- a/m4/ceilf.m4
+++ b/m4/ceilf.m4
@@ -1,4 +1,4 @@
-# ceilf.m4 serial 13
+# ceilf.m4 serial 14
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_CEILF],
fi
m4_ifdef([gl_FUNC_CEILF_IEEE], [
if test $gl_ceilf_required = ieee && test $REPLACE_CEILF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether ceilf works according to ISO C 99 with IEC 60559],
[gl_cv_func_ceilf_ieee],
[
@@ -51,7 +52,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_ceilf_ieee=yes],
[gl_cv_func_ceilf_ieee=no],
- [gl_cv_func_ceilf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_ceilf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ceilf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceilf_ieee" in
diff --git a/m4/ceill.m4 b/m4/ceill.m4
index 700c54b1e5..26aa6ae238 100644
--- a/m4/ceill.m4
+++ b/m4/ceill.m4
@@ -1,4 +1,4 @@
-# ceill.m4 serial 13
+# ceill.m4 serial 14
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_CEILL],
fi
m4_ifdef([gl_FUNC_CEILL_IEEE], [
if test $gl_ceill_required = ieee && test $REPLACE_CEILL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether ceill works according to ISO C 99 with IEC 60559],
[gl_cv_func_ceill_ieee],
[
@@ -50,7 +51,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_ceill_ieee=yes],
[gl_cv_func_ceill_ieee=no],
- [gl_cv_func_ceill_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_ceill_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_ceill_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceill_ieee" in
diff --git a/m4/chown.m4 b/m4/chown.m4
index 5f20e1b1cf..bb7b29598e 100644
--- a/m4/chown.m4
+++ b/m4/chown.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
# Determine whether we need the chown wrapper.
dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2012 Free Software
@@ -20,6 +20,7 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN],
AC_REQUIRE([AC_TYPE_UID_T])
AC_REQUIRE([AC_FUNC_CHOWN])
AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([chown fchown])
dnl mingw lacks chown altogether.
@@ -53,13 +54,22 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN],
]])],
[gl_cv_func_chown_slash_works=yes],
[gl_cv_func_chown_slash_works=no],
- [gl_cv_func_chown_slash_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_chown_slash_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.link conftest.file])
- if test "$gl_cv_func_chown_slash_works" != yes; then
- AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1],
- [Define to 1 if chown mishandles trailing slash.])
- REPLACE_CHOWN=1
- fi
+ case "$gl_cv_func_chown_slash_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([CHOWN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if chown mishandles trailing slash.])
+ REPLACE_CHOWN=1
+ ;;
+ esac
dnl OpenBSD fails to update ctime if ownership does not change.
AC_CACHE_CHECK([whether chown always updates ctime],
@@ -80,13 +90,22 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN],
]])],
[gl_cv_func_chown_ctime_works=yes],
[gl_cv_func_chown_ctime_works=no],
- [gl_cv_func_chown_ctime_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_chown_ctime_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.file])
- if test "$gl_cv_func_chown_ctime_works" != yes; then
- AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails
- to change ctime when at least one argument was not -1.])
- REPLACE_CHOWN=1
- fi
+ case "$gl_cv_func_chown_ctime_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([CHOWN_CHANGE_TIME_BUG], [1], [Define to 1 if chown fails
+ to change ctime when at least one argument was not -1.])
+ REPLACE_CHOWN=1
+ ;;
+ esac
fi
])
diff --git a/m4/exp2l.m4 b/m4/exp2l.m4
index 605cd14c76..3104a58ea8 100644
--- a/m4/exp2l.m4
+++ b/m4/exp2l.m4
@@ -1,4 +1,4 @@
-# exp2l.m4 serial 2
+# exp2l.m4 serial 3
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,6 +28,7 @@ AC_DEFUN([gl_FUNC_EXP2L],
AC_CHECK_DECL([exp2l], , [HAVE_DECL_EXP2L=0], [[#include <math.h>]])
m4_ifdef([gl_FUNC_EXP2L_IEEE], [
if test $gl_exp2l_required = ieee && test $REPLACE_EXP2L = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether exp2l works according to ISO C 99 with IEC 60559],
[gl_cv_func_exp2l_ieee],
[
@@ -62,7 +63,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_exp2l_ieee=yes],
[gl_cv_func_exp2l_ieee=no],
- [gl_cv_func_exp2l_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_exp2l_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_exp2l_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_exp2l_ieee" in
diff --git a/m4/expm1.m4 b/m4/expm1.m4
index 4f34ef371d..f134a9dbf1 100644
--- a/m4/expm1.m4
+++ b/m4/expm1.m4
@@ -1,4 +1,4 @@
-# expm1.m4 serial 2
+# expm1.m4 serial 3
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -58,6 +58,7 @@ AC_DEFUN([gl_FUNC_EXPM1],
:
m4_ifdef([gl_FUNC_EXPM1_IEEE], [
if test $gl_expm1_required = ieee && test $REPLACE_EXPM1 = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether expm1 works according to ISO C 99 with IEC 60559],
[gl_cv_func_expm1_ieee],
[
@@ -83,7 +84,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_expm1_ieee=yes],
[gl_cv_func_expm1_ieee=no],
- [gl_cv_func_expm1_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_expm1_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_expm1_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_expm1_ieee" in
diff --git a/m4/fchdir.m4 b/m4/fchdir.m4
index 85796c1a35..8af494c563 100644
--- a/m4/fchdir.m4
+++ b/m4/fchdir.m4
@@ -1,4 +1,4 @@
-# fchdir.m4 serial 20
+# fchdir.m4 serial 21
dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_DECLS_ONCE([fchdir])
if test $ac_cv_have_decl_fchdir = no; then
@@ -29,11 +30,20 @@ AC_DEFUN([gl_FUNC_FCHDIR],
]], [return open(".", O_RDONLY) < 0;])],
[gl_cv_func_open_directory_works=yes],
[gl_cv_func_open_directory_works=no],
- [gl_cv_func_open_directory_works="guessing no"])])
- if test "$gl_cv_func_open_directory_works" != yes; then
- AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_open_directory_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_open_directory_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([REPLACE_OPEN_DIRECTORY], [1], [Define to 1 if open() should
work around the inability to open a directory.])
- fi
+ ;;
+ esac
fi
])
diff --git a/m4/fdopendir.m4 b/m4/fdopendir.m4
index 2088b115f7..f4db17ba98 100644
--- a/m4/fdopendir.m4
+++ b/m4/fdopendir.m4
@@ -1,4 +1,4 @@
-# serial 9
+# serial 10
# See if we need to provide fdopendir.
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_FDOPENDIR],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
@@ -43,9 +44,18 @@ DIR *fdopendir (int);
return result;])],
[gl_cv_func_fdopendir_works=yes],
[gl_cv_func_fdopendir_works=no],
- [gl_cv_func_fdopendir_works="guessing no"])])
- if test "$gl_cv_func_fdopendir_works" != yes; then
- REPLACE_FDOPENDIR=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_fdopendir_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_fdopendir_works" in
+ *yes) ;;
+ *)
+ REPLACE_FDOPENDIR=1
+ ;;
+ esac
fi
])
diff --git a/m4/floor.m4 b/m4/floor.m4
index 501d63640e..a6e7ec8115 100644
--- a/m4/floor.m4
+++ b/m4/floor.m4
@@ -1,4 +1,4 @@
-# floor.m4 serial 7
+# floor.m4 serial 8
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_FLOOR],
fi
m4_ifdef([gl_FUNC_FLOOR_IEEE], [
if test $gl_floor_required = ieee && test $REPLACE_FLOOR = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether floor works according to ISO C 99 with IEC 60559],
[gl_cv_func_floor_ieee],
[
@@ -40,7 +41,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_floor_ieee=yes],
[gl_cv_func_floor_ieee=no],
- [gl_cv_func_floor_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_floor_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_floor_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_floor_ieee" in
diff --git a/m4/floorf.m4 b/m4/floorf.m4
index 6e792a1ffe..77f6a266a9 100644
--- a/m4/floorf.m4
+++ b/m4/floorf.m4
@@ -1,4 +1,4 @@
-# floorf.m4 serial 12
+# floorf.m4 serial 13
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_FLOORF],
fi
m4_ifdef([gl_FUNC_FLOORF_IEEE], [
if test $gl_floorf_required = ieee && test $REPLACE_FLOORF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether floorf works according to ISO C 99 with IEC 60559],
[gl_cv_func_floorf_ieee],
[
@@ -47,7 +48,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_floorf_ieee=yes],
[gl_cv_func_floorf_ieee=no],
- [gl_cv_func_floorf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_floorf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_floorf_ieee" in
diff --git a/m4/fmod.m4 b/m4/fmod.m4
index 26dd47e1e0..9373710cb2 100644
--- a/m4/fmod.m4
+++ b/m4/fmod.m4
@@ -1,4 +1,4 @@
-# fmod.m4 serial 3
+# fmod.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_FMOD],
m4_ifdef([gl_FUNC_FMOD_IEEE], [
if test $gl_fmod_required = ieee && test $REPLACE_FMOD = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether fmod works according to ISO C 99 with IEC 60559],
[gl_cv_func_fmod_ieee],
[
@@ -56,7 +57,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_fmod_ieee=yes],
[gl_cv_func_fmod_ieee=no],
- [gl_cv_func_fmod_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_fmod_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_fmod_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_fmod_ieee" in
diff --git a/m4/fmodf.m4 b/m4/fmodf.m4
index df3ac74c51..d8ce46684c 100644
--- a/m4/fmodf.m4
+++ b/m4/fmodf.m4
@@ -1,4 +1,4 @@
-# fmodf.m4 serial 4
+# fmodf.m4 serial 5
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,7 @@ AC_DEFUN([gl_FUNC_FMODF],
FMODF_LIBM="$FMOD_LIBM"
m4_ifdef([gl_FUNC_FMODF_IEEE], [
if test $gl_fmodf_required = ieee && test $REPLACE_FMODF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether fmodf works according to ISO C 99 with IEC 60559],
[gl_cv_func_fmodf_ieee],
[
@@ -57,7 +58,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_fmodf_ieee=yes],
[gl_cv_func_fmodf_ieee=no],
- [gl_cv_func_fmodf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_fmodf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_fmodf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_fmodf_ieee" in
diff --git a/m4/fmodl.m4 b/m4/fmodl.m4
index 93bc007ace..7e6374b711 100644
--- a/m4/fmodl.m4
+++ b/m4/fmodl.m4
@@ -1,4 +1,4 @@
-# fmodl.m4 serial 4
+# fmodl.m4 serial 5
dnl Copyright (C) 2011-2012 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,6 +34,7 @@ AC_DEFUN([gl_FUNC_FMODL],
fi
m4_ifdef([gl_FUNC_FMODL_IEEE], [
if test $gl_fmodl_required = ieee && test $REPLACE_FMODL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether fmodl works according to ISO C 99 with IEC 60559],
[gl_cv_func_fmodl_ieee],
[
@@ -68,7 +69,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_fmodl_ieee=yes],
[gl_cv_func_fmodl_ieee=no],
- [gl_cv_func_fmodl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_fmodl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_fmodl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_fmodl_ieee" in
diff --git a/m4/fstat.m4 b/m4/fstat.m4
index fb07fed4c0..3ab3297b2c 100644
--- a/m4/fstat.m4
+++ b/m4/fstat.m4
@@ -1,4 +1,4 @@
-# fstat.m4 serial 2
+# fstat.m4 serial 3
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -21,9 +21,13 @@ AC_DEFUN([gl_FUNC_FSTAT],
dnl Replace fstat() for supporting the gnulib-defined open() on directories.
m4_ifdef([gl_FUNC_FCHDIR], [
gl_TEST_FCHDIR
- if test $HAVE_FCHDIR = 0 \
- && test "$gl_cv_func_open_directory_works" != yes; then
- REPLACE_FSTAT=1
+ if test $HAVE_FCHDIR = 0; then
+ case "$gl_cv_func_open_directory_works" in
+ *yes) ;;
+ *)
+ REPLACE_FSTAT=1
+ ;;
+ esac
fi
])
])
diff --git a/m4/getgroups.m4 b/m4/getgroups.m4
index 08837173f5..f582b8d813 100644
--- a/m4/getgroups.m4
+++ b/m4/getgroups.m4
@@ -1,4 +1,4 @@
-# serial 16
+# serial 17
dnl From Jim Meyering.
dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
AC_REQUIRE([AC_FUNC_GETGROUPS])
AC_REQUIRE([AC_TYPE_GETGROUPS])
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
if test "$ac_cv_func_getgroups" != yes; then
HAVE_GETGROUPS=0
elif test "$ac_cv_func_getgroups_works.$ac_cv_type_getgroups" != yes.gid_t
@@ -31,10 +32,17 @@ AC_DEFUN([gl_FUNC_GETGROUPS],
return getgroups (-1, list) != -1;]])],
[gl_cv_func_getgroups_works=yes],
[gl_cv_func_getgroups_works=no],
- [gl_cv_func_getgroups_works="guessing no"])])
- if test "$gl_cv_func_getgroups_works" != yes; then
- REPLACE_GETGROUPS=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_getgroups_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_getgroups_works" in
+ *yes) ;;
+ *) REPLACE_GETGROUPS=1 ;;
+ esac
fi
test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
])
diff --git a/m4/hypot.m4 b/m4/hypot.m4
index 52df05f32d..05e6c5fed4 100644
--- a/m4/hypot.m4
+++ b/m4/hypot.m4
@@ -1,4 +1,4 @@
-# hypot.m4 serial 3
+# hypot.m4 serial 4
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -17,6 +17,7 @@ AC_DEFUN([gl_FUNC_HYPOT],
m4_ifdef([gl_FUNC_HYPOT_IEEE], [
if test $gl_hypot_required = ieee && test $REPLACE_HYPOT = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether hypot works according to ISO C 99 with IEC 60559],
[gl_cv_func_hypot_ieee],
[
@@ -53,7 +54,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_hypot_ieee=yes],
[gl_cv_func_hypot_ieee=no],
- [gl_cv_func_hypot_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_hypot_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_hypot_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_hypot_ieee" in
diff --git a/m4/hypotf.m4 b/m4/hypotf.m4
index b4ebe9e234..d84f438970 100644
--- a/m4/hypotf.m4
+++ b/m4/hypotf.m4
@@ -1,4 +1,4 @@
-# hypotf.m4 serial 3
+# hypotf.m4 serial 4
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,7 @@ AC_DEFUN([gl_FUNC_HYPOTF],
esac
m4_ifdef([gl_FUNC_HYPOTF_IEEE], [
if test $gl_hypotf_required = ieee && test $REPLACE_HYPOTF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether hypotf works according to ISO C 99 with IEC 60559],
[gl_cv_func_hypotf_ieee],
[
@@ -67,7 +68,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_hypotf_ieee=yes],
[gl_cv_func_hypotf_ieee=no],
- [gl_cv_func_hypotf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_hypotf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_hypotf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_hypotf_ieee" in
diff --git a/m4/hypotl.m4 b/m4/hypotl.m4
index 7af4cb0ef9..0f21dd2f0b 100644
--- a/m4/hypotl.m4
+++ b/m4/hypotl.m4
@@ -1,4 +1,4 @@
-# hypotl.m4 serial 4
+# hypotl.m4 serial 5
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_HYPOTL],
m4_ifdef([gl_FUNC_HYPOTL_IEEE], [
if test $gl_hypotl_required = ieee && test $REPLACE_HYPOTL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether hypotl works according to ISO C 99 with IEC 60559],
[gl_cv_func_hypotl_ieee],
[
@@ -69,7 +70,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_hypotl_ieee=yes],
[gl_cv_func_hypotl_ieee=no],
- [gl_cv_func_hypotl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_hypotl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_hypotl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_hypotl_ieee" in
diff --git a/m4/lchown.m4 b/m4/lchown.m4
index 7ce578bc3f..4a247f41a9 100644
--- a/m4/lchown.m4
+++ b/m4/lchown.m4
@@ -1,4 +1,4 @@
-# serial 16
+# serial 17
# Determine whether we need the lchown wrapper.
dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2012 Free Software Foundation,
@@ -20,9 +20,19 @@ AC_DEFUN([gl_FUNC_LCHOWN],
AC_CHECK_FUNCS([lchown])
if test $ac_cv_func_lchown = no; then
HAVE_LCHOWN=0
- elif test "$gl_cv_func_chown_slash_works" != yes \
- || test "$gl_cv_func_chown_ctime_works" != yes; then
+ else
dnl Trailing slash and ctime bugs in chown also occur in lchown.
- REPLACE_LCHOWN=1
+ case "$gl_cv_func_chown_slash_works" in
+ *yes) ;;
+ *)
+ REPLACE_LCHOWN=1
+ ;;
+ esac
+ case "$gl_cv_func_chown_ctime_works" in
+ *yes) ;;
+ *)
+ REPLACE_LCHOWN=1
+ ;;
+ esac
fi
])
diff --git a/m4/link.m4 b/m4/link.m4
index e0dc7801ef..0f3d4fc869 100644
--- a/m4/link.m4
+++ b/m4/link.m4
@@ -1,4 +1,4 @@
-# link.m4 serial 7
+# link.m4 serial 8
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_LINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([link])
if test $ac_cv_func_link = no; then
HAVE_LINK=0
@@ -36,10 +37,19 @@ AC_DEFUN([gl_FUNC_LINK],
return result;
]])],
[gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
- [gl_cv_func_link_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_link_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.a conftest.b conftest.lnk])
- if test "$gl_cv_func_link_works" != yes; then
- REPLACE_LINK=1
- fi
+ case "$gl_cv_func_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_LINK=1
+ ;;
+ esac
fi
])
diff --git a/m4/log.m4 b/m4/log.m4
index d5d5664621..a04362ae53 100644
--- a/m4/log.m4
+++ b/m4/log.m4
@@ -1,4 +1,4 @@
-# log.m4 serial 3
+# log.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,7 @@ AC_DEFUN([gl_FUNC_LOG],
m4_ifdef([gl_FUNC_LOG_IEEE], [
if test $gl_log_required = ieee && test $REPLACE_LOG = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log works according to ISO C 99 with IEC 60559],
[gl_cv_func_log_ieee],
[
@@ -56,7 +57,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log_ieee=yes],
[gl_cv_func_log_ieee=no],
- [gl_cv_func_log_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log_ieee" in
diff --git a/m4/log10.m4 b/m4/log10.m4
index 08122ca80f..51ae27d96b 100644
--- a/m4/log10.m4
+++ b/m4/log10.m4
@@ -1,4 +1,4 @@
-# log10.m4 serial 3
+# log10.m4 serial 4
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,7 @@ AC_DEFUN([gl_FUNC_LOG10],
m4_ifdef([gl_FUNC_LOG10_IEEE], [
if test $gl_log10_required = ieee && test $REPLACE_LOG10 = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log10 works according to ISO C 99 with IEC 60559],
[gl_cv_func_log10_ieee],
[
@@ -56,7 +57,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log10_ieee=yes],
[gl_cv_func_log10_ieee=no],
- [gl_cv_func_log10_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log10_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log10_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log10_ieee" in
diff --git a/m4/log10f.m4 b/m4/log10f.m4
index e2dc60d7fe..e3000d0ed7 100644
--- a/m4/log10f.m4
+++ b/m4/log10f.m4
@@ -1,4 +1,4 @@
-# log10f.m4 serial 4
+# log10f.m4 serial 5
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_LOG10F],
m4_ifdef([gl_FUNC_LOG10F_IEEE], [
if test $gl_log10f_required = ieee && test $REPLACE_LOG10F = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log10f works according to ISO C 99 with IEC 60559],
[gl_cv_func_log10f_ieee],
[
@@ -66,7 +67,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log10f_ieee=yes],
[gl_cv_func_log10f_ieee=no],
- [gl_cv_func_log10f_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log10f_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log10f_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log10f_ieee" in
diff --git a/m4/log1p.m4 b/m4/log1p.m4
index 8d2b15ca04..4bca324e9d 100644
--- a/m4/log1p.m4
+++ b/m4/log1p.m4
@@ -1,4 +1,4 @@
-# log1p.m4 serial 2
+# log1p.m4 serial 3
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,6 +24,7 @@ AC_DEFUN([gl_FUNC_LOG1P],
:
m4_ifdef([gl_FUNC_LOG1P_IEEE], [
if test $gl_log1p_required = ieee && test $REPLACE_LOG1P = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log1p works according to ISO C 99 with IEC 60559],
[gl_cv_func_log1p_ieee],
[
@@ -50,7 +51,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log1p_ieee=yes],
[gl_cv_func_log1p_ieee=no],
- [gl_cv_func_log1p_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log1p_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log1p_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log1p_ieee" in
diff --git a/m4/log1pf.m4 b/m4/log1pf.m4
index 0f75e94ce5..e76ed9e430 100644
--- a/m4/log1pf.m4
+++ b/m4/log1pf.m4
@@ -1,4 +1,4 @@
-# log1pf.m4 serial 2
+# log1pf.m4 serial 3
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_LOG1PF],
m4_ifdef([gl_FUNC_LOG1PF_IEEE], [
if test $gl_log1pf_required = ieee && test $REPLACE_LOG1PF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log1pf works according to ISO C 99 with IEC 60559],
[gl_cv_func_log1pf_ieee],
[
@@ -59,7 +60,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log1pf_ieee=yes],
[gl_cv_func_log1pf_ieee=no],
- [gl_cv_func_log1pf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log1pf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log1pf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log1pf_ieee" in
diff --git a/m4/log1pl.m4 b/m4/log1pl.m4
index 5a72299f45..cd4f6672e1 100644
--- a/m4/log1pl.m4
+++ b/m4/log1pl.m4
@@ -1,4 +1,4 @@
-# log1pl.m4 serial 2
+# log1pl.m4 serial 3
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,6 +24,7 @@ AC_DEFUN([gl_FUNC_LOG1PL],
LOG1PL_LIBM="$LOG1P_LIBM"
m4_ifdef([gl_FUNC_LOG1PL_IEEE], [
if test $gl_log1pl_required = ieee && test $REPLACE_LOG1PL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log1pl works according to ISO C 99 with IEC 60559],
[gl_cv_func_log1pl_ieee],
[
@@ -50,7 +51,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log1pl_ieee=yes],
[gl_cv_func_log1pl_ieee=no],
- [gl_cv_func_log1pl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log1pl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log1pl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log1pl_ieee" in
diff --git a/m4/log2.m4 b/m4/log2.m4
index 48d0838ceb..3f425e8982 100644
--- a/m4/log2.m4
+++ b/m4/log2.m4
@@ -1,4 +1,4 @@
-# log2.m4 serial 2
+# log2.m4 serial 3
dnl Copyright (C) 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FUNC_LOG2],
m4_ifdef([gl_FUNC_LOG2_IEEE], [
if test $gl_log2_required = ieee && test $REPLACE_LOG2 = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log2 works according to ISO C 99 with IEC 60559],
[gl_cv_func_log2_ieee],
[
@@ -77,7 +78,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log2_ieee=yes],
[gl_cv_func_log2_ieee=no],
- [gl_cv_func_log2_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log2_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log2_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log2_ieee" in
diff --git a/m4/log2f.m4 b/m4/log2f.m4
index d9fffd0aaa..24a85552ce 100644
--- a/m4/log2f.m4
+++ b/m4/log2f.m4
@@ -1,4 +1,4 @@
-# log2f.m4 serial 2
+# log2f.m4 serial 3
dnl Copyright (C) 2010-2012 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,6 +38,7 @@ AC_DEFUN([gl_FUNC_LOG2F],
m4_ifdef([gl_FUNC_LOG2F_IEEE], [
if test $gl_log2f_required = ieee && test $REPLACE_LOG2F = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether log2f works according to ISO C 99 with IEC 60559],
[gl_cv_func_log2f_ieee],
[
@@ -78,7 +79,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_log2f_ieee=yes],
[gl_cv_func_log2f_ieee=no],
- [gl_cv_func_log2f_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_log2f_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_log2f_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_log2f_ieee" in
diff --git a/m4/logf.m4 b/m4/logf.m4
index 231603c4fa..44c9090ca6 100644
--- a/m4/logf.m4
+++ b/m4/logf.m4
@@ -1,4 +1,4 @@
-# logf.m4 serial 5
+# logf.m4 serial 6
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,6 +33,7 @@ AC_DEFUN([gl_FUNC_LOGF],
m4_ifdef([gl_FUNC_LOGF_IEEE], [
if test $gl_logf_required = ieee && test $REPLACE_LOGF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether logf works according to ISO C 99 with IEC 60559],
[gl_cv_func_logf_ieee],
[
@@ -66,7 +67,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_logf_ieee=yes],
[gl_cv_func_logf_ieee=no],
- [gl_cv_func_logf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_logf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_logf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_logf_ieee" in
diff --git a/m4/mkdir.m4 b/m4/mkdir.m4
index a034dff4dc..e413250994 100644
--- a/m4/mkdir.m4
+++ b/m4/mkdir.m4
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
# Copyright (C) 2001, 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -11,6 +11,7 @@
AC_DEFUN([gl_FUNC_MKDIR],
[dnl
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether mkdir handles trailing slash],
[gl_cv_func_mkdir_trailing_slash_works],
@@ -21,13 +22,22 @@ AC_DEFUN([gl_FUNC_MKDIR],
]], [return mkdir ("conftest.dir/", 0700);])],
[gl_cv_func_mkdir_trailing_slash_works=yes],
[gl_cv_func_mkdir_trailing_slash_works=no],
- [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.dir
]
)
- if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
- REPLACE_MKDIR=1
- fi
+ case "$gl_cv_func_mkdir_trailing_slash_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+ ;;
+ esac
AC_CACHE_CHECK([whether mkdir handles trailing dot],
[gl_cv_func_mkdir_trailing_dot_works],
@@ -38,13 +48,22 @@ AC_DEFUN([gl_FUNC_MKDIR],
]], [return !mkdir ("conftest.dir/./", 0700);])],
[gl_cv_func_mkdir_trailing_dot_works=yes],
[gl_cv_func_mkdir_trailing_dot_works=no],
- [gl_cv_func_mkdir_trailing_dot_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.dir
]
)
- if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
- REPLACE_MKDIR=1
- AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
- creates a directory given with a trailing dot component.])
- fi
+ case "$gl_cv_func_mkdir_trailing_dot_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKDIR=1
+ AC_DEFINE([FUNC_MKDIR_DOT_BUG], [1], [Define to 1 if mkdir mistakenly
+ creates a directory given with a trailing dot component.])
+ ;;
+ esac
])
diff --git a/m4/mkfifo.m4 b/m4/mkfifo.m4
index 3c88e622eb..e39d628550 100644
--- a/m4/mkfifo.m4
+++ b/m4/mkfifo.m4
@@ -1,4 +1,4 @@
-# serial 3
+# serial 4
# See if we need to provide mkfifo replacement.
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_MKFIFO],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([mkfifo])
if test $ac_cv_func_mkfifo = no; then
HAVE_MKFIFO=0
@@ -37,12 +38,21 @@ AC_DEFUN([gl_FUNC_MKFIFO],
return result;
]])],
[gl_cv_func_mkfifo_works=yes], [gl_cv_func_mkfifo_works=no],
- [gl_cv_func_mkfifo_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mkfifo_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.tmp conftest.lnk])
- if test "$gl_cv_func_mkfifo_works" != yes; then
- AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo
- does not reject trailing slash])
- REPLACE_MKFIFO=1
- fi
+ case "$gl_cv_func_mkfifo_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo
+ does not reject trailing slash])
+ REPLACE_MKFIFO=1
+ ;;
+ esac
fi
])
diff --git a/m4/mknod.m4 b/m4/mknod.m4
index 04c55de334..79cf6fd589 100644
--- a/m4/mknod.m4
+++ b/m4/mknod.m4
@@ -1,4 +1,4 @@
-# serial 4
+# serial 5
# See if we need to provide mknod replacement.
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_MKNOD],
[
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_FUNC_MKFIFO])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([mknod])
@@ -34,14 +35,24 @@ AC_DEFUN([gl_FUNC_MKNOD],
[(set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)])
fi
gl_cv_func_mknod_works=no],
- [gl_cv_func_mknod_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_mknod_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.fifo])
- if test "$gl_cv_func_mknod_works" != yes; then
- AC_DEFINE([MKNOD_FIFO_BUG], [1], [Define to 1 if mknod cannot create
- a fifo without super-user privileges])
- fi
+ case "$gl_cv_func_mknod_works" in
+ *yes) ;;
+ *)
+ REPLACE_MKNOD=1
+ AC_DEFINE([MKNOD_FIFO_BUG], [1], [Define to 1 if mknod cannot create
+ a fifo without super-user privileges])
+ ;;
+ esac
dnl Systems that mishandle trailing slash on mkfifo also goof on mknod.
- if test $REPLACE_MKFIFO = 1 || test "$gl_cv_func_mknod_works" != yes; then
+ if test $REPLACE_MKFIFO = 1; then
REPLACE_MKNOD=1
fi
fi
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
index cc57da4087..cee0572805 100644
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 22
+#serial 23
# Copyright (C) 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -16,6 +16,7 @@
AC_DEFUN([gl_FUNC_MKSTEMP],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([mkstemp])
if test $ac_cv_func_mkstemp = yes; then
@@ -55,12 +56,21 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
return result;]])],
[gl_cv_func_working_mkstemp=yes],
[gl_cv_func_working_mkstemp=no],
- [gl_cv_func_working_mkstemp="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_working_mkstemp="guessing no" ;;
+ esac
+ ])
rm -rf conftest.mkstemp
])
- if test "$gl_cv_func_working_mkstemp" != yes; then
- REPLACE_MKSTEMP=1
- fi
+ case "$gl_cv_func_working_mkstemp" in
+ *yes) ;;
+ *)
+ REPLACE_MKSTEMP=1
+ ;;
+ esac
else
HAVE_MKSTEMP=0
fi
diff --git a/m4/modf.m4 b/m4/modf.m4
index 43a6696758..07495f036b 100644
--- a/m4/modf.m4
+++ b/m4/modf.m4
@@ -1,4 +1,4 @@
-# modf.m4 serial 2
+# modf.m4 serial 3
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_MODF],
m4_ifdef([gl_FUNC_MODF_IEEE], [
if test $gl_modf_required = ieee && test $REPLACE_MODF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether modf works according to ISO C 99 with IEC 60559],
[gl_cv_func_modf_ieee],
[
@@ -59,7 +60,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_modf_ieee=yes],
[gl_cv_func_modf_ieee=no],
- [gl_cv_func_modf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_modf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_modf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_modf_ieee" in
diff --git a/m4/modff.m4 b/m4/modff.m4
index 2d4fc72d93..7c95d467b6 100644
--- a/m4/modff.m4
+++ b/m4/modff.m4
@@ -1,4 +1,4 @@
-# modff.m4 serial 4
+# modff.m4 serial 5
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_MODFF],
:
m4_ifdef([gl_FUNC_MODFF_IEEE], [
if test $gl_modff_required = ieee && test $REPLACE_MODFF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether modff works according to ISO C 99 with IEC 60559],
[gl_cv_func_modff_ieee],
[
@@ -67,7 +68,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_modff_ieee=yes],
[gl_cv_func_modff_ieee=no],
- [gl_cv_func_modff_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_modff_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_modff_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_modff_ieee" in
diff --git a/m4/modfl.m4 b/m4/modfl.m4
index 7056050788..4d3932c28b 100644
--- a/m4/modfl.m4
+++ b/m4/modfl.m4
@@ -1,4 +1,4 @@
-# modfl.m4 serial 2
+# modfl.m4 serial 3
dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -22,6 +22,7 @@ AC_DEFUN([gl_FUNC_MODFL],
:
m4_ifdef([gl_FUNC_MODFL_IEEE], [
if test $gl_modfl_required = ieee && test $REPLACE_MODFL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether modfl works according to ISO C 99 with IEC 60559],
[gl_cv_func_modfl_ieee],
[
@@ -61,7 +62,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_modfl_ieee=yes],
[gl_cv_func_modfl_ieee=no],
- [gl_cv_func_modfl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_modfl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_modfl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_modfl_ieee" in
diff --git a/m4/putenv.m4 b/m4/putenv.m4
index 1cb23a594f..b971b1204d 100644
--- a/m4/putenv.m4
+++ b/m4/putenv.m4
@@ -1,4 +1,4 @@
-# putenv.m4 serial 18
+# putenv.m4 serial 19
dnl Copyright (C) 2002-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@ dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
AC_DEFUN([gl_FUNC_PUTENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
[gl_cv_func_svid_putenv],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
@@ -32,9 +33,18 @@ AC_DEFUN([gl_FUNC_PUTENV],
gl_cv_func_svid_putenv=yes,
gl_cv_func_svid_putenv=no,
dnl When crosscompiling, assume putenv is broken.
- gl_cv_func_svid_putenv=no)
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_svid_putenv="guessing no" ;;
+ esac
+ ])
])
- if test $gl_cv_func_svid_putenv = no; then
- REPLACE_PUTENV=1
- fi
+ case "$gl_cv_func_svid_putenv" in
+ *yes) ;;
+ *)
+ REPLACE_PUTENV=1
+ ;;
+ esac
])
diff --git a/m4/readlink.m4 b/m4/readlink.m4
index 107083f7c7..ccf5141d40 100644
--- a/m4/readlink.m4
+++ b/m4/readlink.m4
@@ -1,4 +1,4 @@
-# readlink.m4 serial 11
+# readlink.m4 serial 12
dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_READLINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([readlink])
if test $ac_cv_func_readlink = no; then
HAVE_READLINK=0
@@ -32,15 +33,26 @@ AC_DEFUN([gl_FUNC_READLINK],
]], [[char buf[20];
return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
[gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
- [gl_cv_func_readlink_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_readlink_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.link conftest.lnk2])
- if test "$gl_cv_func_readlink_works" != yes; then
- AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
- fails to recognize a trailing slash.])
- REPLACE_READLINK=1
- elif test "$gl_cv_decl_readlink_works" != yes; then
- REPLACE_READLINK=1
- fi
+ case "$gl_cv_func_readlink_works" in
+ *yes)
+ if test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+ fi
+ ;;
+ *)
+ AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+ fails to recognize a trailing slash.])
+ REPLACE_READLINK=1
+ ;;
+ esac
fi
])
diff --git a/m4/remainder.m4 b/m4/remainder.m4
index f788a20fc7..393191dd63 100644
--- a/m4/remainder.m4
+++ b/m4/remainder.m4
@@ -1,4 +1,4 @@
-# remainder.m4 serial 3
+# remainder.m4 serial 4
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -56,6 +56,7 @@ AC_DEFUN([gl_FUNC_REMAINDER],
:
m4_ifdef([gl_FUNC_REMAINDER_IEEE], [
if test $gl_remainder_required = ieee && test $REPLACE_REMAINDER = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether remainder works according to ISO C 99 with IEC 60559],
[gl_cv_func_remainder_ieee],
[
@@ -90,7 +91,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_remainder_ieee=yes],
[gl_cv_func_remainder_ieee=no],
- [gl_cv_func_remainder_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_remainder_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_remainder_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_remainder_ieee" in
diff --git a/m4/remainderf.m4 b/m4/remainderf.m4
index 8ac990536c..e82da352c9 100644
--- a/m4/remainderf.m4
+++ b/m4/remainderf.m4
@@ -1,4 +1,4 @@
-# remainderf.m4 serial 6
+# remainderf.m4 serial 7
dnl Copyright (C) 2012 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,6 +54,7 @@ AC_DEFUN([gl_FUNC_REMAINDERF],
m4_ifdef([gl_FUNC_REMAINDERF_IEEE], [
if test $gl_remainderf_required = ieee && test $REPLACE_REMAINDERF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether remainderf works according to ISO C 99 with IEC 60559],
[gl_cv_func_remainderf_ieee],
[
@@ -93,7 +94,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_remainderf_ieee=yes],
[gl_cv_func_remainderf_ieee=no],
- [gl_cv_func_remainderf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_remainderf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_remainderf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_remainderf_ieee" in
diff --git a/m4/remainderl.m4 b/m4/remainderl.m4
index b40464a836..d6ff8a72c6 100644
--- a/m4/remainderl.m4
+++ b/m4/remainderl.m4
@@ -1,4 +1,4 @@
-# remainderl.m4 serial 6
+# remainderl.m4 serial 7
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -59,6 +59,7 @@ AC_DEFUN([gl_FUNC_REMAINDERL],
m4_ifdef([gl_FUNC_REMAINDERL_IEEE], [
if test $gl_remainderl_required = ieee && test $REPLACE_REMAINDERL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether remainderl works according to ISO C 99 with IEC 60559],
[gl_cv_func_remainderl_ieee],
[
@@ -98,7 +99,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_remainderl_ieee=yes],
[gl_cv_func_remainderl_ieee=no],
- [gl_cv_func_remainderl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_remainderl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_remainderl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_remainderl_ieee" in
diff --git a/m4/remove.m4 b/m4/remove.m4
index c5d47a44c7..b4a468a996 100644
--- a/m4/remove.m4
+++ b/m4/remove.m4
@@ -1,4 +1,4 @@
-# remove.m4 serial 3
+# remove.m4 serial 4
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,16 @@ AC_DEFUN([gl_FUNC_REMOVE],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_RMDIR])
AC_REQUIRE([gl_FUNC_UNLINK])
- if test "$gl_cv_func_rmdir_works:$gl_cv_func_unlink_works" != yes:yes; then
+ if { case "$gl_cv_func_rmdir_works" in
+ *yes) false;;
+ *) true;;
+ esac
+ } \
+ || { case "$gl_cv_func_unlink_works" in
+ *yes) false;;
+ *) true;;
+ esac
+ }; then
dnl If either underlying syscall is broken, then remove likely has
dnl the same bug; blindly use our replacement.
REPLACE_REMOVE=1
diff --git a/m4/rename.m4 b/m4/rename.m4
index 59cc5c76f1..378b5ecfce 100644
--- a/m4/rename.m4
+++ b/m4/rename.m4
@@ -1,4 +1,4 @@
-# serial 25
+# serial 26
# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -54,15 +54,24 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_dst_works=yes],
[gl_cv_func_rename_slash_dst_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_slash_dst_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
])
- if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
- [Define if rename does not correctly handle slashes on the destination
- argument, such as on Solaris 10 or NetBSD 1.6.])
- fi
+ case "$gl_cv_func_rename_slash_dst_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
+ [Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6.])
+ ;;
+ esac
dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
dnl Solaris 9 mistakenly allows rename("file/","name").
@@ -97,15 +106,24 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_src_works=yes],
[gl_cv_func_rename_slash_src_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_slash_src_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_slash_src_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
])
- if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
- [Define if rename does not correctly handle slashes on the source
- argument, such as on Solaris 9 or cygwin 1.5.])
- fi
+ case "$gl_cv_func_rename_slash_src_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
+ [Define if rename does not correctly handle slashes on the source
+ argument, such as on Solaris 9 or cygwin 1.5.])
+ ;;
+ esac
dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
dnl on rename("h1","h2").
@@ -137,7 +155,13 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_link_works=yes],
[gl_cv_func_rename_link_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_link_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_link_works="guessing no" ;;
+ esac
+ ])
else
gl_cv_func_rename_link_works="guessing no"
fi
@@ -146,12 +170,15 @@ AC_DEFUN([gl_FUNC_RENAME],
gl_cv_func_rename_link_works=yes
fi
])
- if test "x$gl_cv_func_rename_link_works" != xyes; then
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
- [Define if rename fails to leave hard links alone, as on NetBSD 1.6
- or Cygwin 1.5.])
- fi
+ case "$gl_cv_func_rename_link_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
+ [Define if rename fails to leave hard links alone, as on NetBSD 1.6
+ or Cygwin 1.5.])
+ ;;
+ esac
dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
dnl mingw mistakenly forbids rename("dir1","dir2").
@@ -177,13 +204,22 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_dest_works=yes],
[gl_cv_func_rename_dest_works=no],
dnl When crosscompiling, assume rename is broken.
- [gl_cv_func_rename_dest_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rename_dest_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.f conftest.d1 conftest.d2
])
- if test "x$gl_cv_func_rename_dest_works" != xyes; then
- REPLACE_RENAME=1
- AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
- [Define if rename does not work when the destination file exists,
- as on Cygwin 1.5 or Windows.])
- fi
+ case "$gl_cv_func_rename_dest_works" in
+ *yes) ;;
+ *)
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
+ [Define if rename does not work when the destination file exists,
+ as on Cygwin 1.5 or Windows.])
+ ;;
+ esac
])
diff --git a/m4/rmdir.m4 b/m4/rmdir.m4
index c5f24cda58..34ca87639b 100644
--- a/m4/rmdir.m4
+++ b/m4/rmdir.m4
@@ -1,4 +1,4 @@
-# rmdir.m4 serial 12
+# rmdir.m4 serial 13
dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RMDIR],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Detect cygwin 1.5.x bug.
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
@@ -31,9 +32,18 @@ AC_DEFUN([gl_FUNC_RMDIR],
return result;
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
- [gl_cv_func_rmdir_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_rmdir_works="guessing no" ;;
+ esac
+ ])
rm -rf conftest.dir conftest.file])
- if test x"$gl_cv_func_rmdir_works" != xyes; then
- REPLACE_RMDIR=1
- fi
+ case "$gl_cv_func_rmdir_works" in
+ *yes) ;;
+ *)
+ REPLACE_RMDIR=1
+ ;;
+ esac
])
diff --git a/m4/round.m4 b/m4/round.m4
index 805eba9d51..514c4f73ef 100644
--- a/m4/round.m4
+++ b/m4/round.m4
@@ -1,4 +1,4 @@
-# round.m4 serial 15
+# round.m4 serial 16
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -72,6 +72,7 @@ int main()
m4_ifdef([gl_FUNC_ROUND_IEEE], [
if test $gl_round_required = ieee && test $REPLACE_ROUND = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether round works according to ISO C 99 with IEC 60559],
[gl_cv_func_round_ieee],
[
@@ -102,7 +103,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_round_ieee=yes],
[gl_cv_func_round_ieee=no],
- [gl_cv_func_round_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_round_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_round_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_round_ieee" in
diff --git a/m4/roundf.m4 b/m4/roundf.m4
index fc07b762ce..b1c4787e04 100644
--- a/m4/roundf.m4
+++ b/m4/roundf.m4
@@ -1,4 +1,4 @@
-# roundf.m4 serial 16
+# roundf.m4 serial 17
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -69,6 +69,7 @@ int main()
m4_ifdef([gl_FUNC_ROUNDF_IEEE], [
if test $gl_roundf_required = ieee && test $REPLACE_ROUNDF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether roundf works according to ISO C 99 with IEC 60559],
[gl_cv_func_roundf_ieee],
[
@@ -103,7 +104,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_roundf_ieee=yes],
[gl_cv_func_roundf_ieee=no],
- [gl_cv_func_roundf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_roundf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_roundf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_roundf_ieee" in
diff --git a/m4/roundl.m4 b/m4/roundl.m4
index a48f878d3e..e4c860cb8e 100644
--- a/m4/roundl.m4
+++ b/m4/roundl.m4
@@ -1,4 +1,4 @@
-# roundl.m4 serial 14
+# roundl.m4 serial 15
dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -28,6 +28,7 @@ AC_DEFUN([gl_FUNC_ROUNDL],
m4_ifdef([gl_FUNC_ROUNDL_IEEE], [
if test $gl_roundl_required = ieee && test $REPLACE_ROUNDL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether roundl works according to ISO C 99 with IEC 60559],
[gl_cv_func_roundl_ieee],
[
@@ -62,7 +63,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_roundl_ieee=yes],
[gl_cv_func_roundl_ieee=no],
- [gl_cv_func_roundl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_roundl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_roundl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_roundl_ieee" in
diff --git a/m4/setenv.m4 b/m4/setenv.m4
index a1f30bc47b..e1931e7eb2 100644
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -1,4 +1,4 @@
-# setenv.m4 serial 25
+# setenv.m4 serial 26
dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SETENV],
[
AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
if test $ac_cv_func_setenv = no; then
HAVE_SETENV=0
else
@@ -33,10 +34,19 @@ AC_DEFUN([gl_FUNC_SETENV],
return result;
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
- [gl_cv_func_setenv_works="guessing no"])])
- if test "$gl_cv_func_setenv_works" != yes; then
- REPLACE_SETENV=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_setenv_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_setenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_SETENV=1
+ ;;
+ esac
fi
])
@@ -56,6 +66,7 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
AC_DEFUN([gl_FUNC_UNSETENV],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_DECLS_ONCE([unsetenv])
if test $ac_cv_have_decl_unsetenv = no; then
HAVE_DECL_UNSETENV=0
@@ -115,10 +126,19 @@ int unsetenv (const char *name);
if (getenv ("a")) return 6;
]])],
[gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
- [gl_cv_func_unsetenv_works="guessing no"])])
- if test "$gl_cv_func_unsetenv_works" != yes; then
- REPLACE_UNSETENV=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unsetenv_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_unsetenv_works" in
+ *yes) ;;
+ *)
+ REPLACE_UNSETENV=1
+ ;;
+ esac
fi
])
diff --git a/m4/sleep.m4 b/m4/sleep.m4
index 7e736d454f..49197faf1a 100644
--- a/m4/sleep.m4
+++ b/m4/sleep.m4
@@ -1,4 +1,4 @@
-# sleep.m4 serial 6
+# sleep.m4 serial 7
dnl Copyright (C) 2007-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SLEEP],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl We expect to see the declaration of sleep() in a header file.
dnl Older versions of mingw have a sleep() function that is an alias to
dnl _sleep() in MSVCRT. It has a different signature than POSIX sleep():
@@ -44,9 +45,18 @@ handle_alarm (int sig)
return 0;
]])],
[gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
- [gl_cv_func_sleep_works="guessing no"])])
- if test "$gl_cv_func_sleep_works" != yes; then
- REPLACE_SLEEP=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_sleep_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_sleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_SLEEP=1
+ ;;
+ esac
fi
])
diff --git a/m4/stat.m4 b/m4/stat.m4
index 1e0d0dd723..a8b79f5bcb 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 9
+# serial 10
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -47,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
return result;
]])],
[gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
- [gl_cv_func_stat_file_slash="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+ ])
rm -f conftest.tmp conftest.lnk])
case $gl_cv_func_stat_dir_slash in
*no) REPLACE_STAT=1
diff --git a/m4/symlink.m4 b/m4/symlink.m4
index f84b21e40e..cfd90ec2b6 100644
--- a/m4/symlink.m4
+++ b/m4/symlink.m4
@@ -1,4 +1,4 @@
-# serial 5
+# serial 6
# See if we need to provide symlink replacement.
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
@@ -11,6 +11,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_SYMLINK],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([symlink])
dnl The best we can do on mingw is provide a dummy that always fails, so
dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1,
@@ -34,10 +35,19 @@ AC_DEFUN([gl_FUNC_SYMLINK],
return result;
]])],
[gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
- [gl_cv_func_symlink_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_symlink_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.f conftest.link conftest.lnk2])
- if test "$gl_cv_func_symlink_works" != yes; then
- REPLACE_SYMLINK=1
- fi
+ case "$gl_cv_func_symlink_works" in
+ *yes) ;;
+ *)
+ REPLACE_SYMLINK=1
+ ;;
+ esac
fi
])
diff --git a/m4/trunc.m4 b/m4/trunc.m4
index e9d52956de..278384d9b1 100644
--- a/m4/trunc.m4
+++ b/m4/trunc.m4
@@ -1,4 +1,4 @@
-# trunc.m4 serial 8
+# trunc.m4 serial 9
dnl Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -43,6 +43,7 @@ AC_DEFUN([gl_FUNC_TRUNC],
fi
m4_ifdef([gl_FUNC_TRUNC_IEEE], [
if test $gl_trunc_required = ieee && test $REPLACE_TRUNC = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether trunc works according to ISO C 99 with IEC 60559],
[gl_cv_func_trunc_ieee],
[
@@ -68,7 +69,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_trunc_ieee=yes],
[gl_cv_func_trunc_ieee=no],
- [gl_cv_func_trunc_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_trunc_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_trunc_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_trunc_ieee" in
diff --git a/m4/truncf.m4 b/m4/truncf.m4
index b9cebfd169..0d39cb32ee 100644
--- a/m4/truncf.m4
+++ b/m4/truncf.m4
@@ -1,4 +1,4 @@
-# truncf.m4 serial 8
+# truncf.m4 serial 9
dnl Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -43,6 +43,7 @@ AC_DEFUN([gl_FUNC_TRUNCF],
fi
m4_ifdef([gl_FUNC_TRUNCF_IEEE], [
if test $gl_truncf_required = ieee && test $REPLACE_TRUNCF = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether truncf works according to ISO C 99 with IEC 60559],
[gl_cv_func_truncf_ieee],
[
@@ -68,7 +69,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_truncf_ieee=yes],
[gl_cv_func_truncf_ieee=no],
- [gl_cv_func_truncf_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_truncf_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_truncf_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_truncf_ieee" in
diff --git a/m4/truncl.m4 b/m4/truncl.m4
index 4bcf2cfa0b..eb1beabf52 100644
--- a/m4/truncl.m4
+++ b/m4/truncl.m4
@@ -1,4 +1,4 @@
-# truncl.m4 serial 10
+# truncl.m4 serial 11
dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -74,6 +74,7 @@ int main()
esac
m4_ifdef([gl_FUNC_TRUNCL_IEEE], [
if test $gl_truncl_required = ieee && test $REPLACE_TRUNCL = 0; then
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether truncl works according to ISO C 99 with IEC 60559],
[gl_cv_func_truncl_ieee],
[
@@ -99,7 +100,13 @@ int main (int argc, char *argv[])
]])],
[gl_cv_func_truncl_ieee=yes],
[gl_cv_func_truncl_ieee=no],
- [gl_cv_func_truncl_ieee="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_truncl_ieee="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_truncl_ieee="guessing no" ;;
+ esac
+ ])
LIBS="$save_LIBS"
])
case "$gl_cv_func_truncl_ieee" in
diff --git a/m4/unlink.m4 b/m4/unlink.m4
index 4adf76238b..cb0d54593d 100644
--- a/m4/unlink.m4
+++ b/m4/unlink.m4
@@ -1,4 +1,4 @@
-# unlink.m4 serial 9
+# unlink.m4 serial 10
dnl Copyright (C) 2009-2012 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,6 +9,7 @@ AC_DEFUN([gl_FUNC_UNLINK],
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_HEADERS_ONCE([unistd.h])
+
dnl Detect FreeBSD 7.2, AIX 7.1, Solaris 9 bug.
AC_CACHE_CHECK([whether unlink honors trailing slashes],
[gl_cv_func_unlink_honors_slashes],
@@ -41,8 +42,20 @@ AC_DEFUN([gl_FUNC_UNLINK],
]])],
[gl_cv_func_unlink_honors_slashes=yes],
[gl_cv_func_unlink_honors_slashes=no],
- [gl_cv_func_unlink_honors_slashes="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
+ esac
+ ])
rm -f conftest.file conftest.lnk])
+ case "$gl_cv_func_unlink_honors_slashes" in
+ *no)
+ REPLACE_UNLINK=1
+ ;;
+ esac
+
dnl Detect MacOS X 10.5.6 bug: On read-write HFS mounts, unlink("..") or
dnl unlink("../..") succeeds without doing anything.
AC_CACHE_CHECK([whether unlink of a parent directory fails as it should],
@@ -93,7 +106,9 @@ AC_DEFUN([gl_FUNC_UNLINK],
]])],
[gl_cv_func_unlink_parent_fails=yes],
[gl_cv_func_unlink_parent_fails=no],
- [gl_cv_func_unlink_parent_fails="guessing no"])
+ [# If we don't know, assume the worst.
+ gl_cv_func_unlink_parent_fails="guessing no"
+ ])
unset GL_SUBDIR_FOR_UNLINK
rm -rf "$tmp"
else
@@ -107,16 +122,9 @@ AC_DEFUN([gl_FUNC_UNLINK],
])
case "$gl_cv_func_unlink_parent_fails" in
*no)
+ REPLACE_UNLINK=1
AC_DEFINE([UNLINK_PARENT_BUG], [1],
[Define to 1 if unlink() on a parent directory may succeed])
;;
esac
- if test "$gl_cv_func_unlink_honors_slashes" != yes \
- || { case "$gl_cv_func_unlink_parent_fails" in
- *yes) false;;
- *no) true;;
- esac
- }; then
- REPLACE_UNLINK=1
- fi
])
diff --git a/m4/usleep.m4 b/m4/usleep.m4
index 07fa9e9d43..f64daf787c 100644
--- a/m4/usleep.m4
+++ b/m4/usleep.m4
@@ -1,4 +1,4 @@
-# usleep.m4 serial 2
+# usleep.m4 serial 3
dnl Copyright (C) 2009-2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,6 +12,7 @@ AC_DEFUN([gl_FUNC_USLEEP],
dnl usleep was required in POSIX 2001, but dropped as obsolete in
dnl POSIX 2008; therefore, it is not always exposed in headers.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([usleep])
AC_CHECK_TYPE([useconds_t], [],
[AC_DEFINE([useconds_t], [unsigned int], [Define to an unsigned 32-bit
@@ -27,9 +28,18 @@ AC_DEFUN([gl_FUNC_USLEEP],
#include <unistd.h>
]], [[return !!usleep (1000000);]])],
[gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no],
- [gl_cv_func_usleep_works="guessing no"])])
- if test "$gl_cv_func_usleep_works" != yes; then
- REPLACE_USLEEP=1
- fi
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_usleep_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_usleep_works="guessing no" ;;
+ esac
+ ])])
+ case "$gl_cv_func_usleep_works" in
+ *yes) ;;
+ *)
+ REPLACE_USLEEP=1
+ ;;
+ esac
fi
])
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index 8be4b0774c..6a8b6ab78c 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-dnl serial 6
+dnl serial 7
AC_DEFUN([gl_UTIMENS],
[
@@ -11,6 +11,7 @@ AC_DEFUN([gl_UTIMENS],
AC_REQUIRE([gl_FUNC_UTIMES])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([futimes futimesat futimens utimensat lutimes])
if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
@@ -30,11 +31,20 @@ AC_DEFUN([gl_UTIMENS],
]])],
[gl_cv_func_futimesat_works=yes],
[gl_cv_func_futimesat_works=no],
- [gl_cv_func_futimesat_works="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_futimesat_works="guessing no" ;;
+ esac
+ ])
rm -f conftest.file])
- if test "$gl_cv_func_futimesat_works" != yes; then
- AC_DEFINE([FUTIMESAT_NULL_BUG], [1],
- [Define to 1 if futimesat mishandles a NULL file name.])
- fi
+ case "$gl_cv_func_futimesat_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([FUTIMESAT_NULL_BUG], [1],
+ [Define to 1 if futimesat mishandles a NULL file name.])
+ ;;
+ esac
fi
])