Branch
Hash :
7b089321
Author :
Date :
2025-01-01T09:24:36
maint: run 'make update-copyright'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
# wctrans.m4
# serial 4
dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
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 This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_FUNC_WCTRANS],
[
AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
AC_REQUIRE([gl_WCTYPE_H])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
HAVE_WCTRANS=$HAVE_WCTRANS_T
if test $HAVE_WCTRANS = 1; then
AC_CACHE_CHECK([whether wctrans works],
[gl_cv_func_wctrans_works],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <wchar.h>
#include <wctype.h>
int main ()
{
/* This test fails on NetBSD 10.0. */
return (wctrans ("tolower") == (wctrans_t)0);
}
]])],
[gl_cv_func_wctrans_works=yes], [gl_cv_func_wctrans_works=no],
[case "$host_os" in
# Guess no on NetBSD.
netbsd*) gl_cv_func_wctrans_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_wctrans_works="guessing yes" ;;
esac
])
])
case "$gl_cv_func_wctrans_works" in
*yes) ;;
*) REPLACE_WCTRANS=1 ;;
esac
fi
])