Commit a9b04535 authored by Bruno Haible's avatar Bruno Haible

Improve cross-compilation guesses for native Windows.

* m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native
Windows.
* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise.
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
* m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise.
* m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise.
* m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
* m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
* m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
* m4/dup.m4 (gl_FUNC_DUP): Likewise.
* m4/expl.m4 (gl_FUNC_EXPL): Likewise.
* m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise.
* m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
* m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
* m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise.
* m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
* m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
* m4/float_h.m4 (gl_FLOAT_H): Likewise.
* m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
* m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
* m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
* m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise.
* m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
* m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
* m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
* m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise.
* m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
* m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
* m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
* m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
* m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
* m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
* m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise.
* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
* m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
* m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise.
* m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
* m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise.
* m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise.
* m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
* m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise.
* m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise.
* m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise.
* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
* m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise.
* m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
* m4/modf.m4 (gl_FUNC_MODF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
* m4/perror.m4 (gl_FUNC_PERROR): Likewise.
* m4/popen.m4 (gl_FUNC_POPEN): Likewise.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
* m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
* m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
* m4/regex.m4 (gl_REGEX): Likewise.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF,
gl_FUNC_REMAINDERF_WORKS): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL,
gl_FUNC_REMAINDERL_WORKS): Likewise.
* m4/rename.m4 (gl_FUNC_RENAME): Likewise.
* m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
* m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
* m4/signbit.m4 (gl_SIGNBIT): Likewise.
* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
* m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise.
* m4/stdint.m4 (gl_STDINT_H): Likewise.
* m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise.
* m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
* m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
* m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
* m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
* m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
Likewise.
* m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
* m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native
Windows. Enable also on Autoconf 2.70.
* m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO,
gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess
for native Windows.
(gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
parent abc08a26
2017-07-13 Bruno Haible <bruno@clisp.org>
Improve cross-compilation guesses for native Windows.
* m4/btowc.m4 (gl_FUNC_BTOWC): Add cross-compilation guess for native
Windows.
* m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Likewise.
* m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Likewise.
* m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS): Likewise.
* m4/cbrtf.m4 (gl_FUNC_CBRTF_WORKS): Likewise.
* m4/cbrtl.m4 (gl_FUNC_CBRTL, gl_FUNC_CBRTL_WORKS): Likewise.
* m4/ceil.m4 (gl_FUNC_CEIL): Likewise.
* m4/ceilf.m4 (gl_FUNC_CEILF): Likewise.
* m4/ceill.m4 (gl_FUNC_CEILL): Likewise.
* m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
* m4/dup.m4 (gl_FUNC_DUP): Likewise.
* m4/expl.m4 (gl_FUNC_EXPL): Likewise.
* m4/exp2.m4 (gl_FUNC_EXP2_WORKS): Likewise.
* m4/exp2l.m4 (gl_FUNC_EXP2L): Likewise.
* m4/expm1.m4 (gl_FUNC_EXPM1): Likewise.
* m4/expm1f.m4 (gl_FUNC_EXPM1F_WORKS): Likewise.
* m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
* m4/fabsl.m4 (gl_FUNC_FABSL_WORKS): Likewise.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Likewise.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Likewise.
* m4/float_h.m4 (gl_FLOAT_H): Likewise.
* m4/floor.m4 (gl_FUNC_FLOOR): Likewise.
* m4/floorf.m4 (gl_FUNC_FLOORF): Likewise.
* m4/fma.m4 (gl_FUNC_FMA_WORKS): Likewise.
* m4/fmaf.m4 (gl_FUNC_FMAF_WORKS): Likewise.
* m4/fmal.m4 (gl_FUNC_FMAL_WORKS): Likewise.
* m4/fmod.m4 (gl_FUNC_FMOD): Likewise.
* m4/fmodf.m4 (gl_FUNC_FMODF): Likewise.
* m4/fmodl.m4 (gl_FUNC_FMODL): Likewise.
* m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
* m4/frexpf.m4 (gl_FUNC_FREXPF_WORKS): Likewise.
* m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
* m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY_CLOBBER): Likewise.
* m4/hypot.m4 (gl_FUNC_HYPOT): Likewise.
* m4/hypotf.m4 (gl_FUNC_HYPOTF, gl_FUNC_HYPOTF_WORKS): Likewise.
* m4/hypotl.m4 (gl_FUNC_HYPOTL, gl_FUNC_HYPOTL_WORKS): Likewise.
* m4/ilogb.m4 (gl_FUNC_ILOGB_WORKS): Likewise.
* m4/ilogbf.m4 (gl_FUNC_ILOGBF_WORKS): Likewise.
* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Likewise.
* m4/isinf.m4 (gl_ISINFL_WORKS): Likewise.
* m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
* m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
* m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
* m4/log.m4 (gl_FUNC_LOG, gl_FUNC_LOG_WORKS): Likewise.
* m4/logf.m4 (gl_FUNC_LOGF, gl_FUNC_LOGF_WORKS): Likewise.
* m4/logl.m4 (gl_FUNC_LOGL_WORKS): Likewise.
* m4/log10.m4 (gl_FUNC_LOG10, gl_FUNC_LOG10_WORKS): Likewise.
* m4/log10f.m4 (gl_FUNC_LOG10F, gl_FUNC_LOG10F_WORKS): Likewise.
* m4/log10l.m4 (gl_FUNC_LOG10L_WORKS): Likewise.
* m4/log1p.m4 (gl_FUNC_LOG1P): Likewise.
* m4/log1pf.m4 (gl_FUNC_LOG1PF, gl_FUNC_LOG1PF_WORKS): Likewise.
* m4/log1pl.m4 (gl_FUNC_LOG1PL): Likewise.
* m4/log2.m4 (gl_FUNC_LOG2, gl_FUNC_LOG2_WORKS): Likewise.
* m4/log2f.m4 (gl_FUNC_LOG2F, gl_FUNC_LOG2F_WORKS): Likewise.
* m4/log2l.m4 (gl_FUNC_LOG2L_WORKS): Likewise.
* m4/logb.m4 (gl_FUNC_LOGB_WORKS): Likewise.
* m4/logbf.m4 (gl_FUNC_LOGBF_WORKS): Likewise.
* m4/logbl.m4 (gl_FUNC_LOGBL_WORKS): Likewise.
* m4/lstat.m4 (gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Likewise.
* m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT, gl_MBRTOWC_C_LOCALE): Likewise.
* m4/mkdir.m4 (gl_FUNC_MKDIR): Likewise.
* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Likewise.
* m4/mktime.m4 (gl_FUNC_MKTIME_WORKS): Likewise.
* m4/modf.m4 (gl_FUNC_MODF): Likewise.
* m4/modff.m4 (gl_FUNC_MODFF): Likewise.
* m4/modfl.m4 (gl_FUNC_MODFL): Likewise.
* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
* m4/perror.m4 (gl_FUNC_PERROR): Likewise.
* m4/popen.m4 (gl_FUNC_POPEN): Likewise.
* m4/posix_spawn.m4 (gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE,
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2,
gl_FUNC_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN): Likewise.
* m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Likewise.
* m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
* m4/regex.m4 (gl_REGEX): Likewise.
* m4/remainder.m4 (gl_FUNC_REMAINDER): Likewise.
* m4/remainderf.m4 (gl_FUNC_REMAINDERF,
gl_FUNC_REMAINDERF_WORKS): Likewise.
* m4/remainderl.m4 (gl_FUNC_REMAINDERL,
gl_FUNC_REMAINDERL_WORKS): Likewise.
* m4/rename.m4 (gl_FUNC_RENAME): Likewise.
* m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
* m4/rmdir.m4 (gl_FUNC_RMDIR): Likewise.
* m4/round.m4 (gl_FUNC_ROUND): Likewise.
* m4/roundf.m4 (gl_FUNC_ROUNDF): Likewise.
* m4/roundl.m4 (gl_FUNC_ROUNDL): Likewise.
* m4/signbit.m4 (gl_SIGNBIT): Likewise.
* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
* m4/sqrtl.m4 (gl_FUNC_SQRTL_WORKS): Likewise.
* m4/stdint.m4 (gl_STDINT_H): Likewise.
* m4/strerror.m4 (gl_FUNC_STRERROR_0): Likewise.
* m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
* m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
* m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
* m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
* m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
* m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
* m4/tsearch.m4 (gl_FUNC_TSEARCH): Likewise.
* m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
* m4/ungetc.m4 (gl_FUNC_UNGETC_WORKS): Likewise.
* m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Likewise.
* m4/unlink.m4 (gl_FUNC_UNLINK): Likewise.
* m4/usleep.m4 (gl_FUNC_USLEEP): Likewise.
* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
* m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION, gl_WCSRTOMBS_NULL):
Likewise.
* m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
* m4/chown.m4 (AC_FUNC_CHOWN): Add cross-compilation guess for native
Windows. Enable also on Autoconf 2.70.
* m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO,
gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): Add cross-compilation guess
for native Windows.
(gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
gl_VSNPRINTF_ZEROSIZE_C99): Add comment.
2017-07-13 Bruno Haible <bruno@clisp.org>
Improve cross-compilation guesses for native Windows.
# btowc.m4 serial 10
# btowc.m4 serial 11
dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -50,6 +50,8 @@ changequote(,)dnl
case "$host_os" in
# Guess no on Cygwin.
cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_nul="guessing yes" ;;
esac
......@@ -65,10 +67,12 @@ changequote([,])dnl
dnl is present.
changequote(,)dnl
case "$host_os" in
# Guess no on IRIX.
irix*) gl_cv_func_btowc_eof="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_eof="guessing yes" ;;
# Guess no on IRIX.
irix*) gl_cv_func_btowc_eof="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
# Guess yes otherwise.
*) gl_cv_func_btowc_eof="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none; then
......
......@@ -7,7 +7,7 @@
# Written by Paul Eggert.
# serial 15
# serial 16
AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
[
......@@ -123,9 +123,15 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC],
]])],
[ac_cv_sys_stack_overflow_works=yes],
[ac_cv_sys_stack_overflow_works=no],
[ac_cv_sys_stack_overflow_works=cross-compiling])])
[case "$host_os" in
# Guess no on native Windows.
mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
*) ac_cv_sys_stack_overflow_works=cross-compiling ;;
esac
])
])
if test $ac_cv_sys_stack_overflow_works = yes; then
if test "$ac_cv_sys_stack_overflow_works" = yes; then
AC_DEFINE([HAVE_STACK_OVERFLOW_HANDLING], [1],
[Define to 1 if extending the stack slightly past the limit causes
a SIGSEGV which can be handled on an alternate stack established
......@@ -194,7 +200,7 @@ int main ()
fi
AC_CACHE_CHECK([for precise C stack overflow detection],
ac_cv_sys_xsi_stack_overflow_heuristic,
[ac_cv_sys_xsi_stack_overflow_heuristic],
[AC_RUN_IFELSE([AC_LANG_SOURCE(
[[
#include <unistd.h>
......
# calloc.m4 serial 16
# calloc.m4 serial 17
# Copyright (C) 2004-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
......@@ -40,6 +40,8 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
# Guess yes on native Windows.
mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
# If we don't know, assume the worst.
*) ac_cv_func_calloc_0_nonnull="guessing no" ;;
esac
......
# canonicalize.m4 serial 28
# canonicalize.m4 serial 29
dnl Copyright (C) 2003-2007, 2009-2017 Free Software Foundation, Inc.
......@@ -113,6 +113,8 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_realpath_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_realpath_works="guessing no" ;;
esac
......
# cbrtf.m4 serial 3
# cbrtf.m4 serial 4
dnl Copyright (C) 2012-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -91,8 +91,10 @@ int main ()
[gl_cv_func_cbrtf_works=yes],
[gl_cv_func_cbrtf_works=no],
[case "$host_os" in
irix*) gl_cv_func_cbrtf_works="guessing no";;
*) gl_cv_func_cbrtf_works="guessing yes";;
irix*) gl_cv_func_cbrtf_works="guessing no";;
# Guess yes on native Windows.
mingw*) gl_cv_func_cbrtf_works="guessing yes";;
*) gl_cv_func_cbrtf_works="guessing yes";;
esac
])
])
......
# cbrtl.m4 serial 5
# cbrtl.m4 serial 6
dnl Copyright (C) 2012-2017 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,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_cbrtl_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_cbrtl_ieee="guessing no" ;;
esac
......@@ -144,6 +146,8 @@ int main ()
[gl_cv_func_cbrtl_works=no],
[case "$host_os" in
openbsd*) gl_cv_func_cbrtl_works="guessing no";;
# Guess yes on native Windows.
mingw*) gl_cv_func_cbrtl_works="guessing yes";;
*) gl_cv_func_cbrtl_works="guessing yes";;
esac
])
......
# ceil.m4 serial 9
# ceil.m4 serial 10
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -48,6 +48,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceil_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_ceil_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceil_ieee="guessing no" ;;
esac
......
# ceilf.m4 serial 14
# ceilf.m4 serial 15
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -55,6 +55,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceilf_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_ceilf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceilf_ieee="guessing no" ;;
esac
......
# ceill.m4 serial 15
# ceill.m4 serial 16
dnl Copyright (C) 2007, 2009-2017 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,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_ceill_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_ceill_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_ceill_ieee="guessing no" ;;
esac
......@@ -83,10 +85,13 @@ int main (int argc, char *argv[])
long double d = 0.3L;]],
[[return (!(ceill (d) == 1)); ]])],
[gl_cv_func_ceill_buggy=no], [gl_cv_func_ceill_buggy=yes],
[case $host_os in
openbsd*) gl_cv_func_ceill_buggy="guessing yes";;
*) gl_cv_func_ceill_buggy="guessing no";;
esac])
[case "$host_os" in
openbsd*) gl_cv_func_ceill_buggy="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_ceill_buggy="guessing no" ;;
*) gl_cv_func_ceill_buggy="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_ceill_buggy" in
......
# serial 27
# serial 28
# Determine whether we need the chown wrapper.
dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2017 Free Software
......@@ -14,8 +14,6 @@ dnl with or without modifications, as long as this notice is preserved.
# From Jim Meyering.
m4_version_prereq([2.70], [] ,[
# This is taken from the following Autoconf patch:
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
AC_DEFUN([AC_FUNC_CHOWN],
......@@ -49,21 +47,23 @@ AC_DEFUN([AC_FUNC_CHOWN],
[ac_cv_func_chown_works=no],
[case "$host_os" in # ((
# Guess yes on glibc systems.
*-gnu*) ac_cv_func_chown_works=yes ;;
*-gnu*) ac_cv_func_chown_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) ac_cv_func_chown_works="guessing no" ;;
# If we don't know, assume the worst.
*) ac_cv_func_chown_works=no ;;
*) ac_cv_func_chown_works="guessing no" ;;
esac
])
rm -f conftest.chown
])
if test $ac_cv_func_chown_works = yes; then
AC_DEFINE([HAVE_CHOWN], [1],
[Define to 1 if your system has a working `chown' function.])
fi
case "$ac_cv_func_chown_works" in
*yes)
AC_DEFINE([HAVE_CHOWN], [1],
[Define to 1 if your system has a working `chown' function.])
;;
esac
])# AC_FUNC_CHOWN
])
AC_DEFUN_ONCE([gl_FUNC_CHOWN],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
......@@ -83,11 +83,13 @@ AC_DEFUN_ONCE([gl_FUNC_CHOWN],
fi
dnl Some old systems tried to use uid/gid -1 literally.
if test $ac_cv_func_chown_works = no; then
AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1],
[Define if chown is not POSIX compliant regarding IDs of -1.])
REPLACE_CHOWN=1
fi
case "$ac_cv_func_chown_works" in
*no)
AC_DEFINE([CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE], [1],
[Define if chown is not POSIX compliant regarding IDs of -1.])
REPLACE_CHOWN=1
;;
esac
dnl Solaris 9 ignores trailing slash.
dnl FreeBSD 7.2 mishandles trailing slash on symlinks.
......
# serial 17
# serial 18
dnl From Jim Meyering.
dnl
......@@ -42,6 +42,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[case "$host_os" in
# Guess yes on glibc systems with Linux kernel.
linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_struct_dirent_d_ino="guessing no" ;;
esac
......
# dup.m4 serial 5
# dup.m4 serial 6
dnl Copyright (C) 2011-2017 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_DUP],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
m4_ifdef([gl_MSVC_INVAL], [
AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
......@@ -33,7 +34,12 @@ AC_DEFUN([gl_FUNC_DUP],
],
[gl_cv_func_dup_works=yes],
[gl_cv_func_dup_works=no],
[gl_cv_func_dup_works='guessing yes'])
[case "$host_os" in
# Guess no on native Windows.
mingw*) gl_cv_func_dup_works="guessing no" ;;
*) gl_cv_func_dup_works="guessing yes" ;;
esac
])
])
case "$gl_cv_func_dup_works" in
*yes) ;;
......
# exp2.m4 serial 1
# exp2.m4 serial 2
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -136,8 +136,10 @@ int main ()
[gl_cv_func_exp2_works=yes],
[gl_cv_func_exp2_works=no],
[case "$host_os" in
openbsd*) gl_cv_func_exp2_works="guessing no";;
*) gl_cv_func_exp2_works="guessing yes";;
openbsd*) gl_cv_func_exp2_works="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_exp2_works="guessing yes" ;;
*) gl_cv_func_exp2_works="guessing yes" ;;
esac
])
])
......
# exp2l.m4 serial 3
# exp2l.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -66,6 +66,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_exp2l_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_exp2l_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_exp2l_ieee="guessing no" ;;
esac
......
# expl.m4 serial 9
# expl.m4 serial 10
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -71,9 +71,12 @@ AC_DEFUN([gl_FUNC_EXPL],
isnan(expl(-0.4)); ]])],
[gl_cv_func_expl_buggy=no], [gl_cv_func_expl_buggy=yes],
[case $host_os in
openbsd*) gl_cv_func_expl_buggy="guessing yes";;
*) gl_cv_func_expl_buggy="guessing no";;
esac])
openbsd*) gl_cv_func_expl_buggy="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_expl_buggy="guessing no" ;;
*) gl_cv_func_expl_buggy="guessing no" ;;
esac
])
LIBS="$save_LIBS"
])
case "$gl_cv_func_expl_buggy" in
......
# expm1.m4 serial 3
# expm1.m4 serial 4
dnl Copyright (C) 2010-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -87,6 +87,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_expm1_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_expm1_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_expm1_ieee="guessing no" ;;
esac
......
# expm1f.m4 serial 2
# expm1f.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -63,8 +63,10 @@ int main ()
[gl_cv_func_expm1f_works=yes],
[gl_cv_func_expm1f_works=no],
[case "$host_os" in
irix*) gl_cv_func_expm1f_works="guessing no";;
*) gl_cv_func_expm1f_works="guessing yes";;
irix*) gl_cv_func_expm1f_works="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_expm1f_works="guessing yes" ;;
*) gl_cv_func_expm1f_works="guessing yes" ;;
esac
])
])
......
# exponentl.m4 serial 3
# exponentl.m4 serial 4
dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION],
[
AC_REQUIRE([gl_BIGENDIAN])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([where to find the exponent in a 'long double'],
[gl_cv_cc_long_double_expbit0],
[
......@@ -79,9 +80,24 @@ int main ()
[gl_cv_cc_long_double_expbit0=`cat conftest.out`],
[gl_cv_cc_long_double_expbit0="unknown"],
[
dnl When cross-compiling, we don't know. It depends on the
dnl When cross-compiling, in general we don't know. It depends on the
dnl ABI and compiler version. There are too many cases.
gl_cv_cc_long_double_expbit0="unknown"
case "$host_os" in
mingw*) # On native Windows (little-endian), we know the result
# in two cases: mingw, MSVC.
AC_EGREP_CPP([Known], [
#ifdef __MINGW32__
Known
#endif
], [gl_cv_cc_long_double_expbit0="word 2 bit 0"])
AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
], [gl_cv_cc_long_double_expbit0="word 1 bit 20"])
;;
esac
])
rm -f conftest.out
])
......
# fabsl.m4 serial 2
# fabsl.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -66,8 +66,10 @@ int main ()
[gl_cv_func_fabsl_works=yes],
[gl_cv_func_fabsl_works=no],
[case "$host_os" in
irix*) gl_cv_func_fabsl_works="guessing no";;
*) gl_cv_func_fabsl_works="guessing yes";;
irix*) gl_cv_func_fabsl_works="guessing no" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_fabsl_works="guessing yes" ;;
*) gl_cv_func_fabsl_works="guessing yes" ;;
esac
])
])
......
# fchdir.m4 serial 21
# fchdir.m4 serial 22
dnl Copyright (C) 2006-2017 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,8 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_open_directory_works="guessing no" ;;
# If we don't know, assume the worst.
*) gl_cv_func_open_directory_works="guessing no" ;;
esac
......
# fcntl-o.m4 serial 4
# fcntl-o.m4 serial 5
dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -18,6 +18,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
......@@ -116,7 +117,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
[gl_cv_header_working_fcntl_h=cross-compiling])])
[case "$host_os" in
# Guess 'no' on native Windows.
mingw*) gl_cv_header_working_fcntl_h='no' ;;
*) gl_cv_header_working_fcntl_h=cross-compiling ;;
esac
])
])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(
......
# float_h.m4 serial 10
# float_h.m4 serial 11
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -76,7 +76,9 @@ int main ()
[gl_cv_func_itold_works="guessing no"],
[gl_cv_func_itold_works="guessing yes"])
;;
*) gl_cv_func_itold_works="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_itold_works="guessing yes" ;;
*) gl_cv_func_itold_works="guessing yes" ;;
esac
])
])
......
# floor.m4 serial 8
# floor.m4 serial 9
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -44,6 +44,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_floor_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_floor_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_floor_ieee="guessing no" ;;
esac
......
# floorf.m4 serial 13
# floorf.m4 serial 14
dnl Copyright (C) 2007, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -51,6 +51,8 @@ int main (int argc, char *argv[])
[case "$host_os" in
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_floorf_ieee="guessing yes" ;;
# Guess yes on native Windows.
mingw*) gl_cv_func_floorf_ieee="guessing yes" ;;
# If we don't know, assume the worst.
*) gl_cv_func_floorf_ieee="guessing no" ;;
esac
......
# fma.m4 serial 2
# fma.m4 serial 3
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -167,8 +167,18 @@ int main()
}]])],
[gl_cv_func_fma_works=yes],
[gl_cv_func_fma_works=no],
[dnl Guess no, even on glibc systems.
[dnl Guess yes on native Windows with MSVC.
dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fma_works="guessing no"
case "$host_os" in
mingw*)
AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
], [gl_cv_func_fma_works="guessing yes"])
;;
esac
])
])
LIBS="$save_LIBS"
......
# fmaf.m4 serial 3
# fmaf.m4 serial 4
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -171,8 +171,18 @@ int main()
}]])],
[gl_cv_func_fmaf_works=yes],
[gl_cv_func_fmaf_works=no],
[dnl Guess no, even on glibc systems.
[dnl Guess yes on native Windows with MSVC.
dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fmaf_works="guessing no"
case "$host_os" in
mingw*)
AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
], [gl_cv_func_fmaf_works="guessing yes"])
;;
esac
])
])
LIBS="$save_LIBS"
......
# fmal.m4 serial 5
# fmal.m4 serial 6
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -369,8 +369,18 @@ int main()
}]])],
[gl_cv_func_fmal_works=yes],
[gl_cv_func_fmal_works=no],
[dnl Guess no, even on glibc systems.
[dnl Guess yes on native Windows with MSVC.
dnl Otherwise guess no, even on glibc systems.
gl_cv_func_fmal_works="guessing no"
case "$host_os" in
mingw*)
AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
], [gl_cv_func_fmal_works="guessing yes"])
;;
esac
])
])
LIBS="$save_LIBS"
......
# fmod.m4 serial 4
# fmod.m4 serial 5
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......