xref: /netbsd/external/gpl2/xcvs/dist/m4/codeset.m4 (revision a7c91847)
1*a7c91847Schristos# codeset.m4 serial AM1 (gettext-0.10.40)
2*a7c91847Schristosdnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
3*a7c91847Schristosdnl This file is free software; the Free Software Foundation
4*a7c91847Schristosdnl gives unlimited permission to copy and/or distribute it,
5*a7c91847Schristosdnl with or without modifications, as long as this notice is preserved.
6*a7c91847Schristos
7*a7c91847Schristosdnl From Bruno Haible.
8*a7c91847Schristos
9*a7c91847SchristosAC_DEFUN([AM_LANGINFO_CODESET],
10*a7c91847Schristos[
11*a7c91847Schristos  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
12*a7c91847Schristos    [AC_TRY_LINK([#include <langinfo.h>],
13*a7c91847Schristos      [char* cs = nl_langinfo(CODESET);],
14*a7c91847Schristos      am_cv_langinfo_codeset=yes,
15*a7c91847Schristos      am_cv_langinfo_codeset=no)
16*a7c91847Schristos    ])
17*a7c91847Schristos  if test $am_cv_langinfo_codeset = yes; then
18*a7c91847Schristos    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
19*a7c91847Schristos      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
20*a7c91847Schristos  fi
21*a7c91847Schristos])
22