Use an all-permissive copyright notice, recommended by RMS.
[gnulib.git] / m4 / mbrtowc.m4
1 # mbrtowc.m4 serial 7
2 dnl Copyright (C) 2001-2002, 2004 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 dnl From Paul Eggert
8
9 dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with
10 dnl AC_FUNC_MBRTOWC, when autoconf 2.57 can be assumed everywhere.
11
12 AC_DEFUN([gl_FUNC_MBRTOWC],
13 [
14   AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
15     gl_cv_func_mbrtowc,
16     [AC_TRY_LINK(
17        [#include <wchar.h>],
18        [mbstate_t state; return ! (sizeof state && mbrtowc);],
19        gl_cv_func_mbrtowc=yes,
20        gl_cv_func_mbrtowc=no)])
21   if test $gl_cv_func_mbrtowc = yes; then
22     AC_DEFINE(HAVE_MBRTOWC, 1,
23       [Define to 1 if mbrtowc and mbstate_t are properly declared.])
24   fi
25 ])