Markus Kuhn writes:

> Has someone written autoconf tests for the presence of
> nl_langinfo(CODESET)?

Yes, GNU fileutils and GNU gettext use the following test.

======================== m4/codeset.m4 ================================
#serial AM1

dnl From Bruno Haible.

AC_DEFUN([AM_LANGINFO_CODESET],
[
  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
    [AC_TRY_LINK([#include <langinfo.h>],
      [char* cs = nl_langinfo(CODESET);],
      am_cv_langinfo_codeset=yes,
      am_cv_langinfo_codeset=no)
    ])
  if test $am_cv_langinfo_codeset = yes; then
    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
  fi
])
=========================================================================

> Has someone written a tiny nl_langinfo(CODESET) emulator for use until
> FreeBSD get's their locale support sorted out properly?

Yes, it comes as 'libcharset' subdirectory of GNU libiconv. You can
find the newest release at
    ftp://ftp.ilog.fr/pub/Users/haible/gnu/libcharset-1.1.tar.gz

You can find instructions for integrating this into Emacs in the
libcharset-1.1/INTEGRATE file.

Bruno
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to