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