]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update.
authorSimon Josefsson <simon@josefsson.org>
Thu, 16 Nov 2006 08:47:55 +0000 (08:47 +0000)
committerSimon Josefsson <simon@josefsson.org>
Thu, 16 Nov 2006 08:47:55 +0000 (08:47 +0000)
12 files changed:
gl/Makefile.am
gl/gettext.h
gl/m4/gnulib-comp.m4
gl/m4/lib-link.m4
gl/m4/longlong.m4
gl/stdint_.h
lgl/Makefile.am
lgl/gettext.h
lgl/m4/gnulib-comp.m4
lgl/m4/lib-link.m4
lgl/m4/longlong.m4
lgl/stdint_.h

index af6e9f48af0c531f5a072bb23ff6387ef04c0307..7644d697db1e950dd6e7ee499c194da3570238a3 100644 (file)
@@ -18,6 +18,7 @@ noinst_LTLIBRARIES = libgnu.la
 libgnu_la_SOURCES =
 libgnu_la_LIBADD = $(gl_LTLIBOBJS)
 libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
+EXTRA_libgnu_la_SOURCES =
 libgnu_la_LDFLAGS = $(AM_LDFLAGS)
 noinst_HEADERS =
 EXTRA_DIST =
@@ -54,6 +55,8 @@ MOSTLYCLEANDIRS += arpa
 
 EXTRA_DIST += gai_strerror.c getaddrinfo.c getaddrinfo.h
 
+EXTRA_libgnu_la_SOURCES += gai_strerror.c getaddrinfo.c
+
 ## end   gnulib module getaddrinfo
 
 ## begin gnulib module getdelim
@@ -61,6 +64,8 @@ EXTRA_DIST += gai_strerror.c getaddrinfo.c getaddrinfo.h
 
 EXTRA_DIST += getdelim.c getdelim.h
 
+EXTRA_libgnu_la_SOURCES += getdelim.c
+
 ## end   gnulib module getdelim
 
 ## begin gnulib module getline
@@ -68,6 +73,8 @@ EXTRA_DIST += getdelim.c getdelim.h
 
 EXTRA_DIST += getline.c getline.h
 
+EXTRA_libgnu_la_SOURCES += getline.c
+
 ## end   gnulib module getline
 
 ## begin gnulib module getpass
@@ -75,6 +82,8 @@ EXTRA_DIST += getline.c getline.h
 
 EXTRA_DIST += getpass.c getpass.h
 
+EXTRA_libgnu_la_SOURCES += getpass.c
+
 ## end   gnulib module getpass
 
 ## begin gnulib module gettext-h
@@ -88,6 +97,8 @@ libgnu_la_SOURCES += gettext.h
 
 EXTRA_DIST += inet_ntop.c inet_ntop.h
 
+EXTRA_libgnu_la_SOURCES += inet_ntop.c
+
 ## end   gnulib module inet_ntop
 
 ## begin gnulib module inet_pton
@@ -95,6 +106,8 @@ EXTRA_DIST += inet_ntop.c inet_ntop.h
 
 EXTRA_DIST += inet_pton.c inet_pton.h
 
+EXTRA_libgnu_la_SOURCES += inet_pton.c
+
 ## end   gnulib module inet_pton
 
 ## begin gnulib module intprops
@@ -109,6 +122,8 @@ EXTRA_DIST += intprops.h
 
 EXTRA_DIST += imaxtostr.c inttostr.c inttostr.h offtostr.c uinttostr.c umaxtostr.c
 
+EXTRA_libgnu_la_SOURCES += imaxtostr.c inttostr.c offtostr.c uinttostr.c umaxtostr.c
+
 ## end   gnulib module inttostr
 
 ## begin gnulib module netinet_in
@@ -134,6 +149,8 @@ MOSTLYCLEANDIRS += netinet
 
 EXTRA_DIST += readline.c readline.h
 
+EXTRA_libgnu_la_SOURCES += readline.c
+
 ## end   gnulib module readline
 
 ## begin gnulib module stdbool
@@ -199,6 +216,8 @@ EXTRA_DIST += stdint_.h
 
 EXTRA_DIST += strdup.c strdup.h
 
+EXTRA_libgnu_la_SOURCES += strdup.c
+
 ## end   gnulib module strdup
 
 ## begin gnulib module sys_socket
index f15eb6a25c9725f0425969ca30ada58994bfd4de..18c62a4067f5caa8153847a5cbf547f58f12efe1 100644 (file)
    On pre-ANSI systems without 'const', the config.h file is supposed to
    contain "#define const".  */
 # define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
-# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# define dcgettext(Domainname, Msgid, Category) \
+    ((void) (Category), dgettext (Domainname, Msgid))
 # define ngettext(Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((N) == 1 \
+     ? ((void) (Msgid2), (const char *) (Msgid1)) \
+     : ((void) (Msgid1), (const char *) (Msgid2)))
 # define dngettext(Domainname, Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
 # define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+# define bindtextdomain(Domainname, Dirname) \
+    ((void) (Domainname), (const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) \
+    ((void) (Domainname), (const char *) (Codeset))
 
 #endif
 
index 9e9126b59bd0221c0eb35a58180863415e040ab8..25ef0111a3d6cf337b8f913cb6fbdcc1255956ae 100644 (file)
@@ -35,6 +35,7 @@ AC_DEFUN([gl_INIT],
 [
   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
+  m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
   AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
   gl_cond_libtool=true
   gl_source_base='gl'
@@ -53,6 +54,7 @@ AC_DEFUN([gl_INIT],
   gl_STDINT_H
   gl_FUNC_STRDUP
   gl_HEADER_SYS_SOCKET
+  m4_popdef([AC_LIBSOURCES])
   m4_popdef([AC_REPLACE_FUNCS])
   m4_popdef([AC_LIBOBJ])
   AC_CONFIG_COMMANDS_PRE([
@@ -81,6 +83,11 @@ AC_DEFUN([gl_LIBOBJ],
 AC_DEFUN([gl_REPLACE_FUNCS],
   [AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])])
 
+# Like AC_LIBSOURCES, except that it does nothing.
+# We rely on EXTRA_lib..._SOURCES instead.
+AC_DEFUN([gl_LIBSOURCES],
+  [])
+
 # This macro records the list of files which have been installed by
 # gnulib-tool and may be removed by future gnulib-tool invocations.
 AC_DEFUN([gl_FILE_LIST], [
index f95b7ba88d5ed86a8884f930a0e339cf9f6bca64..b422218dc2a5ab89cdac4f52f1a82adf7f7b3a80 100644 (file)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 9 (gettext-0.16)
+# lib-link.m4 serial 10 (gettext-0.16.1)
 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,12 +6,14 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.50)
+AC_PREREQ(2.54)
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -24,13 +26,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
   ])
   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
   dnl results of this search when this library appears as a dependency.
   HAVE_LIB[]NAME=yes
@@ -46,6 +51,8 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -82,10 +89,12 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
     CPPFLAGS="$ac_save_CPPFLAGS"
     LIB[]NAME=
     LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
   fi
   AC_SUBST([HAVE_LIB]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
   undefine([Name])
   undefine([NAME])
 ])
@@ -124,20 +133,24 @@ AC_DEFUN([AC_LIB_RPATH],
 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 [
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
   AC_LIB_WITH_FINAL_PREFIX([
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
   ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
 [
     if test "X$withval" = "Xno"; then
       use_additional=no
@@ -158,6 +171,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
+  LIB[]NAME[]_PREFIX=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -351,6 +365,7 @@ 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"
                 additional_includedir="$basedir/include"
                 ;;
             esac
index 3716c09f6caf562c8b70eb0c8ff498f3e210c6b7..1f9e862ef118356817bef76ebe41466c0699000e 100644 (file)
@@ -1,4 +1,4 @@
-# longlong.m4 serial 8
+# longlong.m4 serial 10
 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,7 @@ dnl From Paul Eggert.
 # assume 2.61 everywhere.
 
 # Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
 # defined. In this case you can treat 'long long int' like 'long int'.
 
 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
@@ -28,7 +28,31 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
          [[long long int llmax = 9223372036854775807ll;
            return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
                    | (llmax / ll) | (llmax % ll));]])],
-       [ac_cv_type_long_long_int=yes],
+       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+       dnl If cross compiling, assume the bug isn't important, since
+       dnl nobody cross compiles for this platform as far as we know.
+        AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[@%:@include <limits.h>
+              @%:@ifndef LLONG_MAX
+              @%:@ define HALF \
+                       (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+              @%:@ define LLONG_MAX (HALF - 1 + HALF)
+              @%:@endif]],
+            [[long long int n = 1;
+              int i;
+              for (i = 0; ; i++)
+                {
+                  long long int m = n << i;
+                  if (m >> i != n)
+                    return 1;
+                  if (LLONG_MAX / 2 < m)
+                    break;
+                }
+              return 0;]])],
+         [ac_cv_type_long_long_int=yes],
+         [ac_cv_type_long_long_int=no],
+         [ac_cv_type_long_long_int=yes])],
        [ac_cv_type_long_long_int=no])])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], 1,
index c29108f2cac3149de7dab160d92a3dc8ad1c07ea..a4f9a4cf7b0378bfc55b87becf14522c09471bd2 100644 (file)
 #undef uintmax_t
 #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 # define uintmax_t unsigned long long int
-#elif defined int64_t
+#elif defined uint64_t
 # define uintmax_t uint64_t
 #else
 # define uintmax_t unsigned long int
index 723b5d18265006619f4e2950f8ca145fb17794e2..9eadeec7055ea5b012d2b82cafc4754628c34c82 100644 (file)
@@ -18,6 +18,7 @@ noinst_LTLIBRARIES = liblgnu.la
 liblgnu_la_SOURCES =
 liblgnu_la_LIBADD = $(lgl_LTLIBOBJS)
 liblgnu_la_DEPENDENCIES = $(lgl_LTLIBOBJS)
+EXTRA_liblgnu_la_SOURCES =
 liblgnu_la_LDFLAGS = $(AM_LDFLAGS)
 noinst_HEADERS =
 EXTRA_DIST =
@@ -56,6 +57,8 @@ endif
 
 EXTRA_DIST += gc-gnulib.c gc-libgcrypt.c gc.h
 
+EXTRA_liblgnu_la_SOURCES += gc-gnulib.c gc-libgcrypt.c
+
 ## end   gnulib module gc
 
 ## begin gnulib module gc-arcfour
@@ -63,6 +66,8 @@ EXTRA_DIST += gc-gnulib.c gc-libgcrypt.c gc.h
 
 EXTRA_DIST += arcfour.c arcfour.h
 
+EXTRA_liblgnu_la_SOURCES += arcfour.c
+
 ## end   gnulib module gc-arcfour
 
 ## begin gnulib module gc-arctwo
@@ -70,6 +75,8 @@ EXTRA_DIST += arcfour.c arcfour.h
 
 EXTRA_DIST += arctwo.c arctwo.h
 
+EXTRA_liblgnu_la_SOURCES += arctwo.c
+
 ## end   gnulib module gc-arctwo
 
 ## begin gnulib module gc-des
@@ -77,6 +84,8 @@ EXTRA_DIST += arctwo.c arctwo.h
 
 EXTRA_DIST += des.c des.h
 
+EXTRA_liblgnu_la_SOURCES += des.c
+
 ## end   gnulib module gc-des
 
 ## begin gnulib module gc-hmac-md5
@@ -84,6 +93,8 @@ EXTRA_DIST += des.c des.h
 
 EXTRA_DIST += hmac-md5.c hmac.h md5.c md5.h memxor.c memxor.h
 
+EXTRA_liblgnu_la_SOURCES += hmac-md5.c md5.c memxor.c
+
 ## end   gnulib module gc-hmac-md5
 
 ## begin gnulib module gc-hmac-sha1
@@ -91,6 +102,8 @@ EXTRA_DIST += hmac-md5.c hmac.h md5.c md5.h memxor.c memxor.h
 
 EXTRA_DIST += hmac-sha1.c hmac.h memxor.c memxor.h sha1.c sha1.h
 
+EXTRA_liblgnu_la_SOURCES += hmac-sha1.c memxor.c sha1.c
+
 ## end   gnulib module gc-hmac-sha1
 
 ## begin gnulib module gc-md4
@@ -98,6 +111,8 @@ EXTRA_DIST += hmac-sha1.c hmac.h memxor.c memxor.h sha1.c sha1.h
 
 EXTRA_DIST += md4.c md4.h
 
+EXTRA_liblgnu_la_SOURCES += md4.c
+
 ## end   gnulib module gc-md4
 
 ## begin gnulib module gc-md5
@@ -106,6 +121,8 @@ liblgnu_la_SOURCES += md5.h
 
 EXTRA_DIST += md5.c
 
+EXTRA_liblgnu_la_SOURCES += md5.c
+
 ## end   gnulib module gc-md5
 
 ## begin gnulib module gc-pbkdf2-sha1
@@ -113,6 +130,8 @@ EXTRA_DIST += md5.c
 
 EXTRA_DIST += gc-pbkdf2-sha1.c
 
+EXTRA_liblgnu_la_SOURCES += gc-pbkdf2-sha1.c
+
 ## end   gnulib module gc-pbkdf2-sha1
 
 ## begin gnulib module gc-rijndael
@@ -120,6 +139,8 @@ EXTRA_DIST += gc-pbkdf2-sha1.c
 
 EXTRA_DIST += rijndael-alg-fst.c rijndael-alg-fst.h rijndael-api-fst.c rijndael-api-fst.h
 
+EXTRA_liblgnu_la_SOURCES += rijndael-alg-fst.c rijndael-api-fst.c
+
 ## end   gnulib module gc-rijndael
 
 ## begin gnulib module gc-sha1
@@ -127,6 +148,8 @@ EXTRA_DIST += rijndael-alg-fst.c rijndael-alg-fst.h rijndael-api-fst.c rijndael-
 
 EXTRA_DIST += sha1.c sha1.h
 
+EXTRA_liblgnu_la_SOURCES += sha1.c
+
 ## end   gnulib module gc-sha1
 
 ## begin gnulib module gettext
@@ -154,6 +177,8 @@ liblgnu_la_SOURCES += gettext.h
 
 EXTRA_DIST += md2.c md2.h
 
+EXTRA_liblgnu_la_SOURCES += md2.c
+
 ## end   gnulib module md2
 
 ## begin gnulib module memmem
@@ -161,6 +186,8 @@ EXTRA_DIST += md2.c md2.h
 
 EXTRA_DIST += memmem.c memmem.h
 
+EXTRA_liblgnu_la_SOURCES += memmem.c
+
 ## end   gnulib module memmem
 
 ## begin gnulib module memmove
@@ -168,6 +195,8 @@ EXTRA_DIST += memmem.c memmem.h
 
 EXTRA_DIST += memmove.c
 
+EXTRA_liblgnu_la_SOURCES += memmove.c
+
 ## end   gnulib module memmove
 
 ## begin gnulib module minmax
@@ -181,6 +210,8 @@ liblgnu_la_SOURCES += minmax.h
 
 EXTRA_DIST += read-file.c read-file.h
 
+EXTRA_liblgnu_la_SOURCES += read-file.c
+
 ## end   gnulib module read-file
 
 ## begin gnulib module size_max
@@ -194,6 +225,8 @@ liblgnu_la_SOURCES += size_max.h
 
 EXTRA_DIST += snprintf.c snprintf.h
 
+EXTRA_liblgnu_la_SOURCES += snprintf.c
+
 ## end   gnulib module snprintf
 
 ## begin gnulib module stdint
@@ -241,6 +274,8 @@ EXTRA_DIST += stdint_.h
 
 EXTRA_DIST += strverscmp.c strverscmp.h
 
+EXTRA_liblgnu_la_SOURCES += strverscmp.c
+
 ## end   gnulib module strverscmp
 
 ## begin gnulib module sys_socket
@@ -302,6 +337,8 @@ MOSTLYCLEANFILES += unistd.h
 
 EXTRA_DIST += asnprintf.c printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
 
+EXTRA_liblgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
+
 ## end   gnulib module vasnprintf
 
 ## begin gnulib module xsize
index 6eb604069815eda483fdd108f01164aecb272f83..6680203ff548d10ce644bc304bd3871925a2df22 100644 (file)
    On pre-ANSI systems without 'const', the config.h file is supposed to
    contain "#define const".  */
 # define gettext(Msgid) ((const char *) (Msgid))
-# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
-# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# define dcgettext(Domainname, Msgid, Category) \
+    ((void) (Category), dgettext (Domainname, Msgid))
 # define ngettext(Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((N) == 1 \
+     ? ((void) (Msgid2), (const char *) (Msgid1)) \
+     : ((void) (Msgid1), (const char *) (Msgid2)))
 # define dngettext(Domainname, Msgid1, Msgid2, N) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
-    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+    ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
 # define textdomain(Domainname) ((const char *) (Domainname))
-# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
-# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+# define bindtextdomain(Domainname, Dirname) \
+    ((void) (Domainname), (const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) \
+    ((void) (Domainname), (const char *) (Codeset))
 
 #endif
 
index a617e4509278153a6f5c52ce8d656eb8e547fa04..5364caf97da6ff0025731d41bb86498dc6e00a5a 100644 (file)
@@ -35,6 +35,7 @@ AC_DEFUN([lgl_INIT],
 [
   m4_pushdef([AC_LIBOBJ], m4_defn([lgl_LIBOBJ]))
   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([lgl_REPLACE_FUNCS]))
+  m4_pushdef([AC_LIBSOURCES], m4_defn([lgl_LIBSOURCES]))
   AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
   gl_cond_libtool=true
   gl_source_base='lgl'
@@ -73,6 +74,7 @@ AC_DEFUN([lgl_INIT],
   gl_HEADER_UNISTD
   gl_FUNC_VASNPRINTF
   gl_XSIZE
+  m4_popdef([AC_LIBSOURCES])
   m4_popdef([AC_REPLACE_FUNCS])
   m4_popdef([AC_LIBOBJ])
   AC_CONFIG_COMMANDS_PRE([
@@ -101,6 +103,11 @@ AC_DEFUN([lgl_LIBOBJ],
 AC_DEFUN([lgl_REPLACE_FUNCS],
   [AC_CHECK_FUNCS([$1], , [lgl_LIBOBJ($ac_func)])])
 
+# Like AC_LIBSOURCES, except that it does nothing.
+# We rely on EXTRA_lib..._SOURCES instead.
+AC_DEFUN([lgl_LIBSOURCES],
+  [])
+
 # This macro records the list of files which have been installed by
 # gnulib-tool and may be removed by future gnulib-tool invocations.
 AC_DEFUN([lgl_FILE_LIST], [
index f95b7ba88d5ed86a8884f930a0e339cf9f6bca64..b422218dc2a5ab89cdac4f52f1a82adf7f7b3a80 100644 (file)
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 9 (gettext-0.16)
+# lib-link.m4 serial 10 (gettext-0.16.1)
 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,12 +6,14 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.50)
+AC_PREREQ(2.54)
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -24,13 +26,16 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
   ])
   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
   dnl results of this search when this library appears as a dependency.
   HAVE_LIB[]NAME=yes
@@ -46,6 +51,8 @@ dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
@@ -82,10 +89,12 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
     CPPFLAGS="$ac_save_CPPFLAGS"
     LIB[]NAME=
     LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
   fi
   AC_SUBST([HAVE_LIB]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
   undefine([Name])
   undefine([NAME])
 ])
@@ -124,20 +133,24 @@ AC_DEFUN([AC_LIB_RPATH],
 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 [
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
   AC_LIB_WITH_FINAL_PREFIX([
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
   ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
 [
     if test "X$withval" = "Xno"; then
       use_additional=no
@@ -158,6 +171,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
+  LIB[]NAME[]_PREFIX=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -351,6 +365,7 @@ 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"
                 additional_includedir="$basedir/include"
                 ;;
             esac
index 3716c09f6caf562c8b70eb0c8ff498f3e210c6b7..1f9e862ef118356817bef76ebe41466c0699000e 100644 (file)
@@ -1,4 +1,4 @@
-# longlong.m4 serial 8
+# longlong.m4 serial 10
 dnl Copyright (C) 1999-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,7 +11,7 @@ dnl From Paul Eggert.
 # assume 2.61 everywhere.
 
 # Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
 # defined. In this case you can treat 'long long int' like 'long int'.
 
 AC_DEFUN([AC_TYPE_LONG_LONG_INT],
@@ -28,7 +28,31 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
          [[long long int llmax = 9223372036854775807ll;
            return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
                    | (llmax / ll) | (llmax % ll));]])],
-       [ac_cv_type_long_long_int=yes],
+       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+       dnl If cross compiling, assume the bug isn't important, since
+       dnl nobody cross compiles for this platform as far as we know.
+        AC_RUN_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[@%:@include <limits.h>
+              @%:@ifndef LLONG_MAX
+              @%:@ define HALF \
+                       (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+              @%:@ define LLONG_MAX (HALF - 1 + HALF)
+              @%:@endif]],
+            [[long long int n = 1;
+              int i;
+              for (i = 0; ; i++)
+                {
+                  long long int m = n << i;
+                  if (m >> i != n)
+                    return 1;
+                  if (LLONG_MAX / 2 < m)
+                    break;
+                }
+              return 0;]])],
+         [ac_cv_type_long_long_int=yes],
+         [ac_cv_type_long_long_int=no],
+         [ac_cv_type_long_long_int=yes])],
        [ac_cv_type_long_long_int=no])])
   if test $ac_cv_type_long_long_int = yes; then
     AC_DEFINE([HAVE_LONG_LONG_INT], 1,
index e1ad7839fec106221391dd3efa7cdd790f44a2a3..67eeb604ec495d5817a457c111a4fba2cc9ba35d 100644 (file)
 #undef uintmax_t
 #if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
 # define uintmax_t unsigned long long int
-#elif defined int64_t
+#elif defined uint64_t
 # define uintmax_t uint64_t
 #else
 # define uintmax_t unsigned long int