git-merge-changelog: Simplify installation instructions.
[gnulib.git] / m4 / wmempcpy.m4
blob1346bfe7aa29927b821036ea05529e2fc20b0a65
1 # wmempcpy.m4
2 # serial 3
3 dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_WMEMPCPY],
10   AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
12   dnl Persuade glibc <wchar.h> to declare wmempcpy().
13   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
15   dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
16   AC_REQUIRE([AC_C_RESTRICT])
18   gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
19   if test $ac_cv_func_wmempcpy = no; then
20     HAVE_WMEMPCPY=0
21     case "$gl_cv_onwards_func_wmempcpy" in
22       future*) REPLACE_WMEMPCPY=1 ;;
23     esac
24   fi