xref: /netbsd-src/external/gpl2/diffutils/dist/m4/codeset.m4 (revision 75f6d617e282811cb173c2ccfbf5df0dd71f7045)
1*75f6d617Schristos# codeset.m4 serial AM1 (gettext-0.10.40)
2*75f6d617Schristosdnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3*75f6d617Schristosdnl This file is free software, distributed under the terms of the GNU
4*75f6d617Schristosdnl General Public License.  As a special exception to the GNU General
5*75f6d617Schristosdnl Public License, this file may be distributed as part of a program
6*75f6d617Schristosdnl that contains a configuration script generated by Autoconf, under
7*75f6d617Schristosdnl the same distribution terms as the rest of that program.
8*75f6d617Schristos
9*75f6d617Schristosdnl From Bruno Haible.
10*75f6d617Schristos
11*75f6d617SchristosAC_DEFUN([AM_LANGINFO_CODESET],
12*75f6d617Schristos[
13*75f6d617Schristos  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
14*75f6d617Schristos    [AC_TRY_LINK([#include <langinfo.h>],
15*75f6d617Schristos      [char* cs = nl_langinfo(CODESET);],
16*75f6d617Schristos      am_cv_langinfo_codeset=yes,
17*75f6d617Schristos      am_cv_langinfo_codeset=no)
18*75f6d617Schristos    ])
19*75f6d617Schristos  if test $am_cv_langinfo_codeset = yes; then
20*75f6d617Schristos    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
21*75f6d617Schristos      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
22*75f6d617Schristos  fi
23*75f6d617Schristos])
24