1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
AC_INIT(gettext.c) 
AC_CONFIG_HEADER(config.h) 
 
AC_MODULE_INIT() 
 
AC_HAVE_HEADERS(locale.h libintl.h iconv.h) 
 
######################################################################## 
#   gettext checking (localization) 
######################################################################## 
 
AC_CHECK_LIB(iconv, libiconv) 
AC_SEARCH_LIBS(iconv, iconv) 
AC_CHECK_LIB(intl, gettext) 
AC_SEARCH_LIBS(gettext, intl libintl) 
AC_CHECK_FUNCS(setlocale gettext iconv) 
 
AC_ARG_WITH(nlsdir,  
        [  --with-nlsdir=PATH      specify where the locale stuff should go ]) 
 
 
if test "x$NLSDIR" = "x"; then 
        if test "x$with_nlsdir" != "x"; then 
                NLSDIR=$with_nlsdir 
        else 
                NLSDIR='$(prefix)/share/locale' 
        fi 
fi 
AC_SUBST(NLSDIR) 
 
# bindtextdomain(3) in libintl-0.14.4 (from the GnuWin32 project) 
# doesn't cope with NULL as dirname even though the documentation 
# claims it does. The version in GNU libc 6 is ok. 
AC_MSG_CHECKING(if bindtextdomain accepts NULL as dirname) 
AC_CACHE_VAL(pike_cv_bindtextdomain_handles_null, [ 
  AC_TRY_RUN([ 
  #include <libintl.h> 
  int main (int argc, char **argv) 
  { 
    if (bindtextdomain ("foo", 0)) return 0; 
    else return 1; 
  } 
  ], pike_cv_bindtextdomain_handles_null=yes, 
     pike_cv_bindtextdomain_handles_null=no, 
     pike_cv_bindtextdomain_handles_null=unknown) 
]) 
AC_MSG_RESULT($pike_cv_bindtextdomain_handles_null) 
if test "$pike_cv_bindtextdomain_handles_null" = yes; then 
  AC_DEFINE(BINDTEXTDOMAIN_HANDLES_NULL) 
fi 
 
AC_OUTPUT(Makefile,echo FOO >stamp-h )