diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-01-07 12:02:28 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-01-07 12:02:28 +0100 |
commit | 73b18e6f6336324619877923ac79b31ca19b5194 (patch) | |
tree | b3863d045ddf668ce07a4ae0eee684a0e670b154 /lib/gl/m4 | |
parent | 27e846ea09a28e896004be9ce1d057b12f80150f (diff) | |
download | gnutls-73b18e6f6336324619877923ac79b31ca19b5194.tar.gz |
Update gnulib files.
Diffstat (limited to 'lib/gl/m4')
32 files changed, 317 insertions, 170 deletions
diff --git a/lib/gl/m4/codeset.m4 b/lib/gl/m4/codeset.m4 index 223955b454..de4181d7d2 100644 --- a/lib/gl/m4/codeset.m4 +++ b/lib/gl/m4/codeset.m4 @@ -1,5 +1,5 @@ -# codeset.m4 serial 2 (gettext-0.16) -dnl Copyright (C) 2000-2002, 2006 Free Software Foundation, Inc. +# codeset.m4 serial 3 (gettext-0.18) +dnl Copyright (C) 2000-2002, 2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -8,14 +8,14 @@ dnl From Bruno Haible. AC_DEFUN([AM_LANGINFO_CODESET], [ - AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_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); return !cs;], - am_cv_langinfo_codeset=yes, - am_cv_langinfo_codeset=no) + [am_cv_langinfo_codeset=yes], + [am_cv_langinfo_codeset=no]) ]) if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + AC_DEFINE([HAVE_LANGINFO_CODESET], 1, [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) fi ]) diff --git a/lib/gl/m4/errno_h.m4 b/lib/gl/m4/errno_h.m4 index b5af07800c..22c08f07fa 100644 --- a/lib/gl/m4/errno_h.m4 +++ b/lib/gl/m4/errno_h.m4 @@ -1,4 +1,4 @@ -# errno_h.m4 serial 1 +# errno_h.m4 serial 2 dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -111,3 +111,9 @@ yes AC_SUBST($1[_VALUE]) fi ]) + +dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. +dnl Remove this when we can assume autoconf >= 2.61. +m4_ifdef([AC_COMPUTE_INT], [], [ + AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) +]) diff --git a/lib/gl/m4/extensions.m4 b/lib/gl/m4/extensions.m4 index 917af94805..611fcfdbc4 100644 --- a/lib/gl/m4/extensions.m4 +++ b/lib/gl/m4/extensions.m4 @@ -1,4 +1,4 @@ -# serial 5 -*- Autoconf -*- +# serial 6 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc. @@ -24,6 +24,8 @@ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], @@ -36,6 +38,16 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl [Define to 1 if on MINIX.]) fi + dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, + dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already + dnl provided. + case "$host_os" in + hpux*) + AC_DEFINE([_XOPEN_SOURCE], [500], + [Define to 500 only on HP-UX.]) + ;; + esac + AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE diff --git a/lib/gl/m4/gettext.m4 b/lib/gl/m4/gettext.m4 index c9ae1f7de8..c48856397b 100644 --- a/lib/gl/m4/gettext.m4 +++ b/lib/gl/m4/gettext.m4 @@ -1,5 +1,5 @@ -# gettext.m4 serial 60 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# gettext.m4 serial 61 (gettext-0.18) +dnl Copyright (C) 1995-2008 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 with or without modifications, as long as this notice is preserved. @@ -127,7 +127,7 @@ AC_DEFUN([AM_GNU_GETTEXT], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then @@ -267,7 +267,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, + AC_DEFINE([ENABLE_NLS], 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else @@ -301,9 +301,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a fi dnl For backward compatibility. Some packages may be using this. - AC_DEFINE(HAVE_GETTEXT, 1, + AC_DEFINE([HAVE_GETTEXT], 1, [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, + AC_DEFINE([HAVE_DCGETTEXT], 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi @@ -319,9 +319,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a fi dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATOBJEXT) + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT]) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= @@ -329,36 +329,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share - AC_SUBST(DATADIRNAME) + AC_SUBST([DATADIRNAME]) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo - AC_SUBST(INSTOBJEXT) + AC_SUBST([INSTOBJEXT]) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat - AC_SUBST(GENCAT) + AC_SUBST([GENCAT]) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi - AC_SUBST(INTLOBJS) + AC_SUBST([INTLOBJS]) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" - AC_SUBST(INTLLIBS) + AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) - AC_SUBST(POSUB) + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) ]) diff --git a/lib/gl/m4/glibc2.m4 b/lib/gl/m4/glibc2.m4 index e8f5bfe6ed..fe58a0f326 100644 --- a/lib/gl/m4/glibc2.m4 +++ b/lib/gl/m4/glibc2.m4 @@ -1,5 +1,5 @@ -# glibc2.m4 serial 1 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. +# glibc2.m4 serial 2 +dnl Copyright (C) 2000-2002, 2004, 2008 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 with or without modifications, as long as this notice is preserved. @@ -9,8 +9,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gt_GLIBC2], [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer, - ac_cv_gnu_library_2, + AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], + [ac_cv_gnu_library_2], [AC_EGREP_CPP([Lucky GNU user], [ #include <features.h> @@ -20,11 +20,11 @@ AC_DEFUN([gt_GLIBC2], #endif #endif ], - ac_cv_gnu_library_2=yes, - ac_cv_gnu_library_2=no) + [ac_cv_gnu_library_2=yes], + [ac_cv_gnu_library_2=no]) ] ) - AC_SUBST(GLIBC2) + AC_SUBST([GLIBC2]) GLIBC2="$ac_cv_gnu_library_2" ] ) diff --git a/lib/gl/m4/glibc21.m4 b/lib/gl/m4/glibc21.m4 index d95fd98613..93fbf47459 100644 --- a/lib/gl/m4/glibc21.m4 +++ b/lib/gl/m4/glibc21.m4 @@ -1,5 +1,5 @@ -# glibc21.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. +# glibc21.m4 serial 4 +dnl Copyright (C) 2000-2002, 2004, 2008 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 with or without modifications, as long as this notice is preserved. @@ -9,8 +9,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_GLIBC21], [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, + AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], + [ac_cv_gnu_library_2_1], [AC_EGREP_CPP([Lucky GNU user], [ #include <features.h> @@ -20,11 +20,11 @@ AC_DEFUN([gl_GLIBC21], #endif #endif ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) + [ac_cv_gnu_library_2_1=yes], + [ac_cv_gnu_library_2_1=no]) ] ) - AC_SUBST(GLIBC21) + AC_SUBST([GLIBC21]) GLIBC21="$ac_cv_gnu_library_2_1" ] ) diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4 index 1e311606cd..e422fa283c 100644 --- a/lib/gl/m4/gnulib-cache.m4 +++ b/lib/gl/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4 index 6ace8bcc90..242e33652b 100644 --- a/lib/gl/m4/gnulib-comp.m4 +++ b/lib/gl/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2009 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General @@ -60,6 +60,7 @@ AC_DEFUN([lgl_INIT], gl_STRING_MODULE_INDICATOR([memmem]) gl_FUNC_MEMMOVE gl_MINMAX + gl_MULTIARCH gl_HEADER_NETDB gl_FUNC_READ_FILE gl_FUNC_REALLOC_POSIX @@ -311,6 +312,7 @@ AC_DEFUN([lgl_FILE_LIST], [ m4/memmem.m4 m4/memmove.m4 m4/minmax.m4 + m4/multiarch.m4 m4/netdb_h.m4 m4/nls.m4 m4/po.m4 diff --git a/lib/gl/m4/iconv.m4 b/lib/gl/m4/iconv.m4 index 66bc76f48c..848b2f85c3 100644 --- a/lib/gl/m4/iconv.m4 +++ b/lib/gl/m4/iconv.m4 @@ -1,5 +1,5 @@ -# iconv.m4 serial AM6 (gettext-0.17) -dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +# iconv.m4 serial AM6 (gettext-0.18) +dnl Copyright (C) 2000-2002, 2007-2008 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 with or without modifications, as long as this notice is preserved. @@ -34,7 +34,7 @@ AC_DEFUN([AM_ICONV_LINK], am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include <stdlib.h> @@ -42,7 +42,7 @@ AC_DEFUN([AM_ICONV_LINK], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], - am_cv_func_iconv=yes) + [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" @@ -51,13 +51,13 @@ AC_DEFUN([AM_ICONV_LINK], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], - am_cv_lib_iconv=yes - am_cv_func_iconv=yes) + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -134,7 +134,7 @@ int main () am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then - AC_DEFINE(HAVE_ICONV, 1, + AC_DEFINE([HAVE_ICONV], 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then @@ -147,8 +147,8 @@ int main () LIBICONV= LTLIBICONV= fi - AC_SUBST(LIBICONV) - AC_SUBST(LTLIBICONV) + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) ]) AC_DEFUN([AM_ICONV], @@ -156,7 +156,7 @@ AC_DEFUN([AM_ICONV], AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_CACHE_VAL([am_cv_proto_iconv], [ AC_TRY_COMPILE([ #include <stdlib.h> #include <iconv.h> @@ -169,12 +169,12 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si #else size_t iconv(); #endif -], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") +], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([$]{ac_t:- - }[$]am_cv_proto_iconv) - AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + AC_MSG_RESULT([${ac_t:- + }$am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) fi ]) diff --git a/lib/gl/m4/intdiv0.m4 b/lib/gl/m4/intdiv0.m4 index 8c8a67084f..29e6e0aa16 100644 --- a/lib/gl/m4/intdiv0.m4 +++ b/lib/gl/m4/intdiv0.m4 @@ -1,5 +1,5 @@ -# intdiv0.m4 serial 2 (gettext-0.17) -dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc. +# intdiv0.m4 serial 3 (gettext-0.18) +dnl Copyright (C) 2002, 2007-2008 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 with or without modifications, as long as this notice is preserved. @@ -61,7 +61,7 @@ int main () nan = y / y; exit (1); } -], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, +], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no], [ # Guess based on the CPU. changequote(,)dnl @@ -79,6 +79,6 @@ changequote([,])dnl *yes) value=1;; *) value=0;; esac - AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], [Define if integer division by zero raises signal SIGFPE.]) ]) diff --git a/lib/gl/m4/intlmacosx.m4 b/lib/gl/m4/intlmacosx.m4 index d3f0d904d2..b77527d17d 100644 --- a/lib/gl/m4/intlmacosx.m4 +++ b/lib/gl/m4/intlmacosx.m4 @@ -1,5 +1,5 @@ -# intlmacosx.m4 serial 1 (gettext-0.17) -dnl Copyright (C) 2004-2007 Free Software Foundation, Inc. +# intlmacosx.m4 serial 2 (gettext-0.18) +dnl Copyright (C) 2004-2008 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 with or without modifications, as long as this notice is preserved. @@ -19,7 +19,7 @@ AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - gt_cv_func_CFPreferencesCopyAppValue, + [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], @@ -32,7 +32,7 @@ AC_DEFUN([gt_INTL_MACOSX], [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, + AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], diff --git a/lib/gl/m4/intmax.m4 b/lib/gl/m4/intmax.m4 index ce7a8a49de..d713db2286 100644 --- a/lib/gl/m4/intmax.m4 +++ b/lib/gl/m4/intmax.m4 @@ -1,5 +1,5 @@ -# intmax.m4 serial 3 (gettext-0.16) -dnl Copyright (C) 2002-2005 Free Software Foundation, Inc. +# intmax.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 2002-2005, 2008 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 with or without modifications, as long as this notice is preserved. @@ -12,7 +12,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T], [ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, + AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], [AC_TRY_COMPILE([ #include <stddef.h> #include <stdlib.h> @@ -24,10 +24,10 @@ AC_DEFUN([gt_TYPE_INTMAX_T], #endif ], [intmax_t x = -1; return !x;], - gt_cv_c_intmax_t=yes, - gt_cv_c_intmax_t=no)]) + [gt_cv_c_intmax_t=yes], + [gt_cv_c_intmax_t=no])]) if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE(HAVE_INTMAX_T, 1, + AC_DEFINE([HAVE_INTMAX_T], 1, [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) fi ]) diff --git a/lib/gl/m4/inttypes-pri.m4 b/lib/gl/m4/inttypes-pri.m4 index 7c7f89401a..66650ebdc8 100644 --- a/lib/gl/m4/inttypes-pri.m4 +++ b/lib/gl/m4/inttypes-pri.m4 @@ -1,5 +1,5 @@ -# inttypes-pri.m4 serial 4 (gettext-0.16) -dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. +# inttypes-pri.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1997-2002, 2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -16,17 +16,17 @@ AC_DEFUN([gt_INTTYPES_PRI], AC_CHECK_HEADERS([inttypes.h]) if test $ac_cv_header_inttypes_h = yes; then AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - gt_cv_inttypes_pri_broken, + [gt_cv_inttypes_pri_broken], [ AC_TRY_COMPILE([#include <inttypes.h> #ifdef PRId32 char *p = PRId32; #endif -], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) +], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) ]) fi if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], 1, [Define if <inttypes.h> exists and defines unusable PRI* macros.]) PRI_MACROS_BROKEN=1 else diff --git a/lib/gl/m4/inttypes_h.m4 b/lib/gl/m4/inttypes_h.m4 index edc8ecb2db..cf482d2875 100644 --- a/lib/gl/m4/inttypes_h.m4 +++ b/lib/gl/m4/inttypes_h.m4 @@ -1,5 +1,5 @@ -# inttypes_h.m4 serial 7 -dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. +# inttypes_h.m4 serial 8 +dnl Copyright (C) 1997-2004, 2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -11,15 +11,15 @@ dnl From Paul Eggert. AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [ - AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, + AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], [AC_TRY_COMPILE( [#include <sys/types.h> #include <inttypes.h>], [uintmax_t i = (uintmax_t) -1; return !i;], - gl_cv_header_inttypes_h=yes, - gl_cv_header_inttypes_h=no)]) + [gl_cv_header_inttypes_h=yes], + [gl_cv_header_inttypes_h=no])]) if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, + AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], 1, [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. ]) fi diff --git a/lib/gl/m4/lcmessage.m4 b/lib/gl/m4/lcmessage.m4 index 19aa77e4f7..b7c4730272 100644 --- a/lib/gl/m4/lcmessage.m4 +++ b/lib/gl/m4/lcmessage.m4 @@ -1,5 +1,5 @@ -# lcmessage.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc. +# lcmessage.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1995-2002, 2004-2005, 2008 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 with or without modifications, as long as this notice is preserved. @@ -20,11 +20,11 @@ dnl Ulrich Drepper <drepper@cygnus.com>, 1995. AC_DEFUN([gt_LC_MESSAGES], [ - AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, + AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], - gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) + [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, + AC_DEFINE([HAVE_LC_MESSAGES], 1, [Define if your <locale.h> file defines LC_MESSAGES.]) fi ]) diff --git a/lib/gl/m4/lib-link.m4 b/lib/gl/m4/lib-link.m4 index 7e07a42468..e29eead276 100644 --- a/lib/gl/m4/lib-link.m4 +++ b/lib/gl/m4/lib-link.m4 @@ -1,4 +1,4 @@ -# lib-link.m4 serial 16 (gettext-0.18) +# lib-link.m4 serial 17 (gettext-0.18) dnl Copyright (C) 2001-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -446,12 +446,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - LIB[]NAME[]_PREFIX="$basedir" + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; */$acl_libdirstem2 | */$acl_libdirstem2/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - LIB[]NAME[]_PREFIX="$basedir" + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi additional_includedir="$basedir/include" ;; esac diff --git a/lib/gl/m4/multiarch.m4 b/lib/gl/m4/multiarch.m4 new file mode 100644 index 0000000000..7b73e15ee9 --- /dev/null +++ b/lib/gl/m4/multiarch.m4 @@ -0,0 +1,74 @@ +# multiarch.m4 serial 3 +dnl Copyright (C) 2008 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 with or without modifications, as long as this notice is preserved. + +# Determine whether the compiler is or may be producing universal binaries. +# +# On MacOS X 10.5 and later systems, the user can create libraries and +# executables that work on multiple system types--known as "fat" or +# "universal" binaries--by specifying multiple '-arch' options to the +# compiler but only a single '-arch' option to the preprocessor. Like +# this: +# +# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ +# CPP="gcc -E" CXXCPP="g++ -E" +# +# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the +# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly. + +AC_DEFUN([gl_MULTIARCH], +[ + dnl This AC_REQUIRE is not necessary in theory. It works around a bug in + dnl autoconf <= 2.63: AC_REQUIRE invocations inside AC_REQUIREd macros are + dnl being handled better than AC_REQUIRE invocations inside normally invoked + dnl macros. + AC_REQUIRE([gl_MULTIARCH_BODY]) +]) + +AC_DEFUN([gl_MULTIARCH_BODY], +[ + dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. + gl_cv_c_multiarch=no + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + ]])], + [ + dnl Check for potential -arch flags. It is not universal unless + dnl there are at least two -arch flags with different values. + arch= + prev= + for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do + if test -n "$prev"; then + case $word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$arch" || test "$arch" = "$word"; then + arch="$word" + else + gl_cv_c_multiarch=yes + fi + ;; + esac + prev= + else + if test "x$word" = "x-arch"; then + prev=arch + fi + fi + done + ]) + if test $gl_cv_c_multiarch = yes; then + AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1], + [Define if the compiler is building for multiple architectures of Apple platforms at once.]) + APPLE_UNIVERSAL_BUILD=1 + else + APPLE_UNIVERSAL_BUILD=0 + fi + AC_SUBST([APPLE_UNIVERSAL_BUILD]) +]) diff --git a/lib/gl/m4/nls.m4 b/lib/gl/m4/nls.m4 index 7967cc2f9a..5f155f01a2 100644 --- a/lib/gl/m4/nls.m4 +++ b/lib/gl/m4/nls.m4 @@ -1,5 +1,5 @@ -# nls.m4 serial 3 (gettext-0.15) -dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. +# nls.m4 serial 4 (gettext-0.18) +dnl Copyright (C) 1995-2003, 2005-2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -27,5 +27,5 @@ AC_DEFUN([AM_NLS], [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) + AC_SUBST([USE_NLS]) ]) diff --git a/lib/gl/m4/po.m4 b/lib/gl/m4/po.m4 index 0734762ab1..818143e713 100644 --- a/lib/gl/m4/po.m4 +++ b/lib/gl/m4/po.m4 @@ -1,5 +1,5 @@ -# po.m4 serial 15 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# po.m4 serial 16 (gettext-0.18) +dnl Copyright (C) 1995-2008 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 with or without modifications, as long as this notice is preserved. @@ -41,7 +41,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl diff --git a/lib/gl/m4/printf-posix.m4 b/lib/gl/m4/printf-posix.m4 index 14ba612839..8933ee399d 100644 --- a/lib/gl/m4/printf-posix.m4 +++ b/lib/gl/m4/printf-posix.m4 @@ -1,4 +1,4 @@ -# printf-posix.m4 serial 3 (gettext-0.17) +# printf-posix.m4 serial 4 (gettext-0.18) dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,13 +31,14 @@ int main () #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ notposix #endif - ], gt_cv_func_printf_posix="guessing no", - gt_cv_func_printf_posix="guessing yes") + ], + [gt_cv_func_printf_posix="guessing no"], + [gt_cv_func_printf_posix="guessing yes"]) ]) ]) case $gt_cv_func_printf_posix in *yes) - AC_DEFINE(HAVE_POSIX_PRINTF, 1, + AC_DEFINE([HAVE_POSIX_PRINTF], 1, [Define if your printf() function supports format strings with positions.]) ;; esac diff --git a/lib/gl/m4/printf.m4 b/lib/gl/m4/printf.m4 index df26c13ecc..474a635575 100644 --- a/lib/gl/m4/printf.m4 +++ b/lib/gl/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 24 +# printf.m4 serial 25 dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -811,13 +811,15 @@ dnl Result is gl_cv_func_printf_enomem. AC_DEFUN([gl_PRINTF_ENOMEM], [ AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([gl_MULTIARCH]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether printf survives out-of-memory conditions], [gl_cv_func_printf_enomem], [ gl_cv_func_printf_enomem="guessing no" if test "$cross_compiling" = no; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([ + if test $APPLE_UNIVERSAL_BUILD = 0; then + AC_LANG_CONFTEST([AC_LANG_SOURCE([ ]GL_NOCRASH[ changequote(,)dnl #include <stdio.h> @@ -866,21 +868,27 @@ int main() } changequote([,])dnl ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - (./conftest - result=$? - if test $result != 0 && test $result != 77; then result=1; fi - exit $result - ) >/dev/null 2>/dev/null - case $? in - 0) gl_cv_func_printf_enomem="yes" ;; - 77) gl_cv_func_printf_enomem="guessing no" ;; - *) gl_cv_func_printf_enomem="no" ;; - esac + if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then + (./conftest + result=$? + if test $result != 0 && test $result != 77; then result=1; fi + exit $result + ) >/dev/null 2>/dev/null + case $? in + 0) gl_cv_func_printf_enomem="yes" ;; + 77) gl_cv_func_printf_enomem="guessing no" ;; + *) gl_cv_func_printf_enomem="no" ;; + esac + else + gl_cv_func_printf_enomem="guessing no" + fi + rm -fr conftest* else + dnl A universal build on Apple MacOS X platforms. + dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. + dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" fi - rm -fr conftest* fi if test "$gl_cv_func_printf_enomem" = "guessing no"; then changequote(,)dnl diff --git a/lib/gl/m4/progtest.m4 b/lib/gl/m4/progtest.m4 index a56365cd37..9b55f75120 100644 --- a/lib/gl/m4/progtest.m4 +++ b/lib/gl/m4/progtest.m4 @@ -1,5 +1,5 @@ -# progtest.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. +# progtest.m4 serial 5 (gettext-0.18) +dnl Copyright (C) 1996-2003, 2005, 2008 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 with or without modifications, as long as this notice is preserved. @@ -55,7 +55,7 @@ rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, +AC_CACHE_VAL([ac_cv_path_$1], [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. @@ -84,9 +84,9 @@ ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) + AC_MSG_RESULT([$][$1]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi AC_SUBST($1)dnl ]) diff --git a/lib/gl/m4/size_max.m4 b/lib/gl/m4/size_max.m4 index 6cb4868927..e0e7b3ff95 100644 --- a/lib/gl/m4/size_max.m4 +++ b/lib/gl/m4/size_max.m4 @@ -1,5 +1,5 @@ -# size_max.m4 serial 6 -dnl Copyright (C) 2003, 2005-2006 Free Software Foundation, Inc. +# size_max.m4 serial 7 +dnl Copyright (C) 2003, 2005-2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -8,7 +8,7 @@ dnl From Bruno Haible. AC_DEFUN([gl_SIZE_MAX], [ - AC_CHECK_HEADERS(stdint.h) + AC_CHECK_HEADERS([stdint.h]) dnl First test whether the system already has SIZE_MAX. AC_MSG_CHECKING([for SIZE_MAX]) AC_CACHE_VAL([gl_cv_size_max], [ @@ -21,16 +21,16 @@ AC_DEFUN([gl_SIZE_MAX], #ifdef SIZE_MAX Found it #endif -], gl_cv_size_max=yes) +], [gl_cv_size_max=yes]) if test -z "$gl_cv_size_max"; then dnl Define it ourselves. Here we assume that the type 'size_t' is not wider dnl than the type 'unsigned long'. Try hard to find a definition that can dnl be used in a preprocessor #if, i.e. doesn't contain a cast. AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include <stddef.h> -#include <limits.h>], size_t_bits_minus_1=) +#include <limits.h>], [size_t_bits_minus_1=]) AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], - [#include <stddef.h>], fits_in_uint=) + [#include <stddef.h>], [fits_in_uint=]) if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then if test $fits_in_uint = 1; then dnl Even though SIZE_MAX fits in an unsigned int, it must be of type @@ -38,7 +38,7 @@ Found it AC_TRY_COMPILE([#include <stddef.h> extern size_t foo; extern unsigned long foo; - ], [], fits_in_uint=0) + ], [], [fits_in_uint=0]) fi dnl We cannot use 'expr' to simplify this expression, because 'expr' dnl works only with 'long' integers in the host environment, while we diff --git a/lib/gl/m4/stdint.m4 b/lib/gl/m4/stdint.m4 index b255692567..e507a02eb8 100644 --- a/lib/gl/m4/stdint.m4 +++ b/lib/gl/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 31 +# stdint.m4 serial 32 dnl Copyright (C) 2001-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -373,13 +373,22 @@ dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t dnl of interest to stdint.in.h. AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [ - gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_STDINT_BITSIZEOF([ptrdiff_t size_t], + [gl_STDINT_INCLUDES]) + fi + gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) gl_cv_type_ptrdiff_t_signed=yes gl_cv_type_size_t_signed=no - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], + if test $APPLE_UNIVERSAL_BUILD = 0; then + gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], + [gl_STDINT_INCLUDES]) + fi + gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES]) ]) diff --git a/lib/gl/m4/stdint_h.m4 b/lib/gl/m4/stdint_h.m4 index db9a8ac4c2..2c8e649799 100644 --- a/lib/gl/m4/stdint_h.m4 +++ b/lib/gl/m4/stdint_h.m4 @@ -1,5 +1,5 @@ -# stdint_h.m4 serial 6 -dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc. +# stdint_h.m4 serial 7 +dnl Copyright (C) 1997-2004, 2006, 2008 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 with or without modifications, as long as this notice is preserved. @@ -11,15 +11,15 @@ dnl From Paul Eggert. AC_DEFUN([gl_AC_HEADER_STDINT_H], [ - AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, + AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], [AC_TRY_COMPILE( [#include <sys/types.h> #include <stdint.h>], [uintmax_t i = (uintmax_t) -1; return !i;], - gl_cv_header_stdint_h=yes, - gl_cv_header_stdint_h=no)]) + [gl_cv_header_stdint_h=yes], + [gl_cv_header_stdint_h=no])]) if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, + AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], 1, [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares uintmax_t. ]) fi diff --git a/lib/gl/m4/threadlib.m4 b/lib/gl/m4/threadlib.m4 index 3a8655e931..51caf576b3 100644 --- a/lib/gl/m4/threadlib.m4 +++ b/lib/gl/m4/threadlib.m4 @@ -1,4 +1,4 @@ -# threadlib.m4 serial 1 (gettext-0.18) +# threadlib.m4 serial 2 (gettext-0.18) dnl Copyright (C) 2005-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -104,7 +104,8 @@ AC_DEFUN([gl_THREADLIB_BODY], if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no) + AC_CHECK_HEADER([pthread.h], + [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) if test "$gl_have_pthread_h" = yes; then # Other possible tests: # -lpthreads (FSU threads, PCthreads) @@ -122,7 +123,7 @@ AC_DEFUN([gl_THREADLIB_BODY], if test -n "$gl_have_pthread"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB(pthread, pthread_kill, + AC_CHECK_LIB([pthread], [pthread_kill], [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread # On Solaris and HP-UX, most pthread functions exist also in libc. # Therefore pthread_in_use() needs to actually try to create a @@ -136,13 +137,13 @@ AC_DEFUN([gl_THREADLIB_BODY], ]) else # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB(pthread, pthread_kill, + AC_CHECK_LIB([pthread], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) if test -z "$gl_have_pthread"; then # For FreeBSD 4. - AC_CHECK_LIB(c_r, pthread_kill, + AC_CHECK_LIB([c_r], [pthread_kill], [gl_have_pthread=yes LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) @@ -192,11 +193,11 @@ AC_DEFUN([gl_THREADLIB_BODY], fi if test "$gl_use_threads" = pth; then gl_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_LINKFLAGS(pth) + AC_LIB_LINKFLAGS([pth]) gl_have_pth= gl_save_LIBS="$LIBS" LIBS="$LIBS -lpth" - AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes) + AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes]) LIBS="$gl_save_LIBS" if test -n "$gl_have_pth"; then gl_threads_api=pth @@ -234,10 +235,10 @@ AC_DEFUN([gl_THREADLIB_BODY], fi AC_MSG_CHECKING([for multithread API to use]) AC_MSG_RESULT([$gl_threads_api]) - AC_SUBST(LIBTHREAD) - AC_SUBST(LTLIBTHREAD) - AC_SUBST(LIBMULTITHREAD) - AC_SUBST(LTLIBMULTITHREAD) + AC_SUBST([LIBTHREAD]) + AC_SUBST([LTLIBTHREAD]) + AC_SUBST([LIBMULTITHREAD]) + AC_SUBST([LTLIBMULTITHREAD]) ]) AC_DEFUN([gl_THREADLIB], diff --git a/lib/gl/m4/uintmax_t.m4 b/lib/gl/m4/uintmax_t.m4 index 641c4898d3..cde46d2e8f 100644 --- a/lib/gl/m4/uintmax_t.m4 +++ b/lib/gl/m4/uintmax_t.m4 @@ -1,5 +1,5 @@ -# uintmax_t.m4 serial 10 -dnl Copyright (C) 1997-2004, 2007 Free Software Foundation, Inc. +# uintmax_t.m4 serial 11 +dnl Copyright (C) 1997-2004, 2007-2008 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 with or without modifications, as long as this notice is preserved. @@ -20,11 +20,11 @@ AC_DEFUN([gl_AC_TYPE_UINTMAX_T], test $ac_cv_type_unsigned_long_long_int = yes \ && ac_type='unsigned long long' \ || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], [Define to unsigned long or unsigned long long if <stdint.h> and <inttypes.h> don't define.]) else - AC_DEFINE(HAVE_UINTMAX_T, 1, + AC_DEFINE([HAVE_UINTMAX_T], 1, [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) fi ]) diff --git a/lib/gl/m4/visibility.m4 b/lib/gl/m4/visibility.m4 index 2ff6330aa4..70bca56437 100644 --- a/lib/gl/m4/visibility.m4 +++ b/lib/gl/m4/visibility.m4 @@ -1,5 +1,5 @@ -# visibility.m4 serial 1 (gettext-0.15) -dnl Copyright (C) 2005 Free Software Foundation, Inc. +# visibility.m4 serial 2 (gettext-0.18) +dnl Copyright (C) 2005, 2008 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 with or without modifications, as long as this notice is preserved. @@ -27,7 +27,7 @@ AC_DEFUN([gl_VISIBILITY], HAVE_VISIBILITY=0 if test -n "$GCC"; then AC_MSG_CHECKING([for simple visibility declarations]) - AC_CACHE_VAL(gl_cv_cc_visibility, [ + AC_CACHE_VAL([gl_cv_cc_visibility], [ gl_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" AC_TRY_COMPILE( @@ -36,8 +36,8 @@ AC_DEFUN([gl_VISIBILITY], extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); extern __attribute__((__visibility__("default"))) int exportedfunc (void);], [], - gl_cv_cc_visibility=yes, - gl_cv_cc_visibility=no) + [gl_cv_cc_visibility=yes], + [gl_cv_cc_visibility=no]) CFLAGS="$gl_save_CFLAGS"]) AC_MSG_RESULT([$gl_cv_cc_visibility]) if test $gl_cv_cc_visibility = yes; then diff --git a/lib/gl/m4/wchar.m4 b/lib/gl/m4/wchar.m4 index 5c923fa0e0..ba8ee6ab7b 100644 --- a/lib/gl/m4/wchar.m4 +++ b/lib/gl/m4/wchar.m4 @@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar.m4 serial 6 +# wchar.m4 serial 22 AC_DEFUN([gl_WCHAR_H], [ @@ -61,9 +61,39 @@ AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], AC_DEFUN([gl_WCHAR_H_DEFAULTS], [ - GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) + GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) + GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) + GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) + GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) + GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) + GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) + GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) + GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) + GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) + GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) + GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) + HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) + HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) + HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) + HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) + HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) + HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) + HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) + HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) + HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) + REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) + REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) + REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) + REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) + REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) + REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) + REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) + REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS]) + REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) + REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) WCHAR_H=''; AC_SUBST([WCHAR_H]) ]) diff --git a/lib/gl/m4/wchar_t.m4 b/lib/gl/m4/wchar_t.m4 index cde2129a97..3c81564adc 100644 --- a/lib/gl/m4/wchar_t.m4 +++ b/lib/gl/m4/wchar_t.m4 @@ -1,5 +1,5 @@ -# wchar_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +# wchar_t.m4 serial 2 (gettext-0.18) +dnl Copyright (C) 2002-2003, 2008 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 with or without modifications, as long as this notice is preserved. @@ -10,11 +10,11 @@ dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WCHAR_T], [ - AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, + AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], [AC_TRY_COMPILE([#include <stddef.h> wchar_t foo = (wchar_t)'\0';], , - gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) + [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) + AC_DEFINE([HAVE_WCHAR_T], 1, [Define if you have the 'wchar_t' type.]) fi ]) diff --git a/lib/gl/m4/wint_t.m4 b/lib/gl/m4/wint_t.m4 index af5ed936cc..0026a13188 100644 --- a/lib/gl/m4/wint_t.m4 +++ b/lib/gl/m4/wint_t.m4 @@ -1,5 +1,5 @@ -# wint_t.m4 serial 2 (gettext-0.17) -dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. +# wint_t.m4 serial 3 (gettext-0.18) +dnl Copyright (C) 2003, 2007-2008 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 with or without modifications, as long as this notice is preserved. @@ -10,7 +10,7 @@ dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], [ - AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, + AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_TRY_COMPILE([ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. @@ -21,8 +21,8 @@ AC_DEFUN([gt_TYPE_WINT_T], #include <time.h> #include <wchar.h> wint_t foo = (wchar_t)'\0';], , - gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) + [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then - AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) + AC_DEFINE([HAVE_WINT_T], 1, [Define if you have the 'wint_t' type.]) fi ]) diff --git a/lib/gl/m4/xsize.m4 b/lib/gl/m4/xsize.m4 index 85bb721e43..631893cf59 100644 --- a/lib/gl/m4/xsize.m4 +++ b/lib/gl/m4/xsize.m4 @@ -1,5 +1,5 @@ -# xsize.m4 serial 3 -dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. +# xsize.m4 serial 4 +dnl Copyright (C) 2003-2004, 2008 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 with or without modifications, as long as this notice is preserved. @@ -9,5 +9,5 @@ AC_DEFUN([gl_XSIZE], dnl Prerequisites of lib/xsize.h. AC_REQUIRE([gl_SIZE_MAX]) AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS(stdint.h) + AC_CHECK_HEADERS([stdint.h]) ]) |