+2013-04-23 Daiki Ueno <ueno@gnu.org>
+
+ Obsolete gt_CHECK_DECL in favor of AC_CHECK_DECLS.
+ Now that macros installed by 'gettextize' require Autoconf 2.60,
+ gt_CHECK_DECL can be safely replaced with AC_CHECK_DECLS.
+ * intl.m4 (gt_CHECK_DECL): Remove.
+ (AM_INTL_SUBDIR): Use AC_CHECK_DECLS instead of gt_CHECK_DECL.
+ (gt_INTL_SUBDIR_CORE): Likewise.
+
2013-03-05 Daiki Ueno <ueno@gnu.org>
* fcntl-o.m4: Update copyright year.
-# intl.m4 serial 22 (gettext-0.18.2)
+# intl.m4 serial 23 (gettext-0.18.2)
dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute 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).
- gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
- gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+ AC_CHECK_DECLS([_snprintf _snwprintf], , , [#include <stdio.h>])
dnl Use the *_unlocked functions only if they are declared.
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 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.
- gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+ AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>])
case $gt_cv_func_printf_posix in
*yes) HAVE_POSIX_PRINTF=1 ;;
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 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.
- gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>])
- gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>])
+ AC_CHECK_DECLS([feof_unlocked fgets_unlocked], , , [#include <stdio.h>])
AM_ICONV
INTLBISON=:
fi
])
-
-
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
-[
- AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[$2]],
- [[
-#ifndef $1
- char *p = (char *) $1;
-#endif
- ]])],
- [ac_cv_have_decl_$1=yes],
- [ac_cv_have_decl_$1=no])])
- if test $ac_cv_have_decl_$1 = yes; then
- gt_value=1
- else
- gt_value=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_DECL_]m4_translit($1, [a-z], [A-Z]), [$gt_value],
- [Define to 1 if you have the declaration of '$1', and to 0 if you don't.])
-])