version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
Line 1
|
Line 1
|
# intl.m4 serial 8 (gettext-0.17) | # intl.m4 serial 17b |
dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. | dnl Copyright (C) 1995-2011 Free Software Foundation, Inc. |
dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
Line 15 dnl They are *not* in the public domain.
|
Line 15 dnl They are *not* in the public domain.
|
|
|
dnl Authors: |
dnl Authors: |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. |
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006. | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. |
|
|
AC_PREREQ(2.52) | AC_PREREQ([2.53]) |
|
|
dnl Checks for all prerequisites of the intl subdirectory, |
dnl Checks for all prerequisites of the intl subdirectory, |
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, |
Line 40 AC_DEFUN([AM_INTL_SUBDIR],
|
Line 40 AC_DEFUN([AM_INTL_SUBDIR],
|
AC_REQUIRE([gt_PRINTF_POSIX]) |
AC_REQUIRE([gt_PRINTF_POSIX]) |
AC_REQUIRE([gl_GLIBC21])dnl |
AC_REQUIRE([gl_GLIBC21])dnl |
AC_REQUIRE([gl_XSIZE])dnl |
AC_REQUIRE([gl_XSIZE])dnl |
|
AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl |
AC_REQUIRE([gt_INTL_MACOSX])dnl |
AC_REQUIRE([gt_INTL_MACOSX])dnl |
|
|
|
dnl Support for automake's --enable-silent-rules. |
|
case "$enable_silent_rules" in |
|
yes) INTL_DEFAULT_VERBOSITY=0;; |
|
no) INTL_DEFAULT_VERBOSITY=1;; |
|
*) INTL_DEFAULT_VERBOSITY=1;; |
|
esac |
|
AC_SUBST([INTL_DEFAULT_VERBOSITY]) |
|
|
AC_CHECK_TYPE([ptrdiff_t], , |
AC_CHECK_TYPE([ptrdiff_t], , |
[AC_DEFINE([ptrdiff_t], [long], |
[AC_DEFINE([ptrdiff_t], [long], |
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) |
]) |
]) |
AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) |
AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) |
AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ |
| snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) |
|
|
dnl Use the _snprintf function only if it is declared (because on NetBSD it |
dnl Use the _snprintf function only if it is declared (because on NetBSD it |
dnl is defined as a weak alias of snprintf; we prefer to use the latter). |
dnl is defined as a weak alias of snprintf; we prefer to use the latter). |
Line 78 AC_DEFUN([AM_INTL_SUBDIR],
|
Line 88 AC_DEFUN([AM_INTL_SUBDIR],
|
HAVE_SNPRINTF=0 |
HAVE_SNPRINTF=0 |
fi |
fi |
AC_SUBST([HAVE_SNPRINTF]) |
AC_SUBST([HAVE_SNPRINTF]) |
|
if test "$ac_cv_func_newlocale" = yes; then |
|
HAVE_NEWLOCALE=1 |
|
else |
|
HAVE_NEWLOCALE=0 |
|
fi |
|
AC_SUBST([HAVE_NEWLOCALE]) |
if test "$ac_cv_func_wprintf" = yes; then |
if test "$ac_cv_func_wprintf" = yes; then |
HAVE_WPRINTF=1 |
HAVE_WPRINTF=1 |
else |
else |
Line 146 AC_DEFUN([AM_INTL_SUBDIR],
|
Line 162 AC_DEFUN([AM_INTL_SUBDIR],
|
#define __libc_lock_lock_recursive gl_recursive_lock_lock |
#define __libc_lock_lock_recursive gl_recursive_lock_lock |
#define __libc_lock_unlock_recursive gl_recursive_lock_unlock |
#define __libc_lock_unlock_recursive gl_recursive_lock_unlock |
#define glthread_in_use libintl_thread_in_use |
#define glthread_in_use libintl_thread_in_use |
#define glthread_lock_init libintl_lock_init | #define glthread_lock_init_func libintl_lock_init_func |
#define glthread_lock_lock libintl_lock_lock | #define glthread_lock_lock_func libintl_lock_lock_func |
#define glthread_lock_unlock libintl_lock_unlock | #define glthread_lock_unlock_func libintl_lock_unlock_func |
#define glthread_lock_destroy libintl_lock_destroy | #define glthread_lock_destroy_func libintl_lock_destroy_func |
#define glthread_rwlock_init libintl_rwlock_init | #define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded |
#define glthread_rwlock_rdlock libintl_rwlock_rdlock | #define glthread_rwlock_init_func libintl_rwlock_init_func |
#define glthread_rwlock_wrlock libintl_rwlock_wrlock | #define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded |
#define glthread_rwlock_unlock libintl_rwlock_unlock | #define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func |
#define glthread_rwlock_destroy libintl_rwlock_destroy | #define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded |
#define glthread_recursive_lock_init libintl_recursive_lock_init | #define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func |
#define glthread_recursive_lock_lock libintl_recursive_lock_lock | #define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded |
#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock | #define glthread_rwlock_unlock_func libintl_rwlock_unlock_func |
#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy | #define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded |
#define glthread_once libintl_once | #define glthread_rwlock_destroy_func libintl_rwlock_destroy_func |
#define glthread_once_call libintl_once_call | #define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded |
| #define glthread_recursive_lock_init_func libintl_recursive_lock_init_func |
| #define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded |
| #define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func |
| #define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded |
| #define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func |
| #define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded |
| #define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func |
| #define glthread_once_func libintl_once_func |
#define glthread_once_singlethreaded libintl_once_singlethreaded |
#define glthread_once_singlethreaded libintl_once_singlethreaded |
|
#define glthread_once_multithreaded libintl_once_multithreaded |
]) |
]) |
]) |
]) |
|
|
Line 195 AC_DEFUN([gt_INTL_SUBDIR_CORE],
|
Line 220 AC_DEFUN([gt_INTL_SUBDIR_CORE],
|
AC_REQUIRE([gt_INTTYPES_PRI])dnl |
AC_REQUIRE([gt_INTTYPES_PRI])dnl |
AC_REQUIRE([gl_LOCK])dnl |
AC_REQUIRE([gl_LOCK])dnl |
|
|
AC_TRY_LINK( | AC_LINK_IFELSE( |
[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | [AC_LANG_PROGRAM( |
[], | [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]], |
[AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, | [[]])], |
| [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], |
[Define to 1 if the compiler understands __builtin_expect.])]) |
[Define to 1 if the compiler understands __builtin_expect.])]) |
|
|
AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) |
AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) |
AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ |
AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ |
stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ | stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ |
argz_next __fsetlocking]) | argz_stringify argz_next __fsetlocking]) |
|
|
dnl Use the *_unlocked functions only if they are declared. |
dnl Use the *_unlocked functions only if they are declared. |
dnl (because some of them were defined without being declared in Solaris |
dnl (because some of them were defined without being declared in Solaris |
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built |
dnl on Solaris 2.5.1 to run on Solaris 2.6). |
dnl on Solaris 2.5.1 to run on Solaris 2.6). |
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. |
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. |
gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) | gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>]) |
gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) | gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>]) |
|
|
AM_ICONV |
AM_ICONV |
|
|
dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, |
|
dnl and a _NL_LOCALE_NAME macro always. |
|
AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, |
|
[AC_TRY_LINK([#include <langinfo.h> |
|
#include <locale.h>], |
|
[char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES)); |
|
return !cs; |
|
], |
|
gt_cv_nl_locale_name=yes, |
|
gt_cv_nl_locale_name=no) |
|
]) |
|
if test $gt_cv_nl_locale_name = yes; then |
|
AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, |
|
[Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) |
|
fi |
|
|
|
dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
dnl intl/plural.c is generated from intl/plural.y. It requires bison, |
dnl because plural.y uses bison specific features. It requires at least |
dnl because plural.y uses bison specific features. It requires at least |
dnl bison-1.26 because earlier versions generate a plural.c that doesn't |
dnl bison-1.26 because earlier versions generate a plural.c that doesn't |
Line 269 dnl gt_CHECK_DECL(FUNC, INCLUDES)
|
Line 279 dnl gt_CHECK_DECL(FUNC, INCLUDES)
|
dnl Check whether a function is declared. |
dnl Check whether a function is declared. |
AC_DEFUN([gt_CHECK_DECL], |
AC_DEFUN([gt_CHECK_DECL], |
[ |
[ |
AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, | AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], |
[AC_TRY_COMPILE([$2], [ | [AC_COMPILE_IFELSE( |
| [AC_LANG_PROGRAM( |
| [[$2]], |
| [[ |
#ifndef $1 |
#ifndef $1 |
char *p = (char *) $1; |
char *p = (char *) $1; |
#endif |
#endif |
], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | ]])], |
| [ac_cv_have_decl_$1=yes], |
| [ac_cv_have_decl_$1=no])]) |
if test $ac_cv_have_decl_$1 = yes; then |
if test $ac_cv_have_decl_$1 = yes; then |
gt_value=1 |
gt_value=1 |
else |
else |