1dnl Copyright (C) 2004 Gregory C. Sharp, modified from Xplanet 2dnl This file is free software, distributed under the terms of the GNU 3dnl General Public License. As a special exception to the GNU General 4dnl Public License, this file may be distributed as part of a program 5dnl that contains a configuration script generated by Autoconf, under 6dnl the same distribution terms as the rest of that program. 7 8dnl This macro defines "HAVE_LOCALE_CHARSET" if you have 9dnl the header file <localcharset.h> and locale_charset() and -lcharset. 10 11AC_DEFUN([SR_FIND_LOCALE_CHARSET], 12[ 13 sr_find_locale_charset=yes 14 if test $am_cv_langinfo_codeset = yes; then 15 sr_find_locale_charset=no 16 fi 17 if test $sr_find_locale_charset = yes; then 18 AC_CHECK_LIB(charset,locale_charset, 19 sr_find_locale_charset=yes, 20 sr_find_locale_charset=no) 21 fi 22 if test $sr_find_locale_charset = yes; then 23 AC_CHECK_DECL([locale_charset], 24 sr_find_locale_charset=yes, 25 sr_find_locale_charset=no, 26 [#include <localcharset.h>]) 27 fi 28 if test $sr_find_locale_charset = yes; then 29 AC_DEFINE(HAVE_LOCALE_CHARSET, 1, 30 [Define if you have locale_charset() in <localcharset.h>.]) 31 LIBCHARSET="-lcharset" 32 AC_SUBST(LIBCHARSET) 33 fi 34]) 35 36 37AC_DEFUN([SR_TEST_DECL], 38[ 39 AC_CHECK_DECL([aspell_mutable_container_add], 40 echo aspell_mutable_container_add found, 41 echo aspell_mutable_container_add not found, 42 [#include <aspellfoo.h>]) 43]) 44