summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-01 09:49:22 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-01 09:49:22 +0200
commit8be57c7903731a3180d79d62b6c41a97e6333ef5 (patch)
tree9deb60d1cfd4a1302a621e4d1923b1ff3220e6b5 /gl
parent0c83d7c014106e25dc85d0455ca19ab9fec27829 (diff)
downloadgnutls-8be57c7903731a3180d79d62b6c41a97e6333ef5.tar.gz
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r--gl/arpa_inet.in.h2
-rw-r--r--gl/gnulib.mk9
-rw-r--r--gl/m4/include_next.m428
-rw-r--r--gl/m4/lib-link.m427
-rw-r--r--gl/m4/lib-prefix.m488
-rw-r--r--gl/netinet_in.in.h4
-rw-r--r--gl/stdarg.in.h2
7 files changed, 117 insertions, 43 deletions
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index 81650dacfa..3e93cff25d 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -24,6 +24,8 @@
#if @HAVE_ARPA_INET_H@
+@PRAGMA_SYSTEM_HEADER@
+
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
diff --git a/gl/gnulib.mk b/gl/gnulib.mk
index eb5a894d5f..d8a8f00de9 100644
--- a/gl/gnulib.mk
+++ b/gl/gnulib.mk
@@ -32,7 +32,8 @@ arpa/inet.h:
@MKDIR_P@ arpa
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
-e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
-e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
@@ -172,7 +173,8 @@ netinet/in.h: netinet_in.in.h
@MKDIR_P@ netinet
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \
-e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \
< $(srcdir)/netinet_in.in.h; \
@@ -209,7 +211,8 @@ BUILT_SOURCES += $(STDARG_H)
stdarg.h: stdarg.in.h
rm -f $@-t $@
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
- sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
< $(srcdir)/stdarg.in.h; \
} > $@-t
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index a842e2a236..08c63dbc2c 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,4 +1,4 @@
-# include_next.m4 serial 6
+# include_next.m4 serial 7
dnl Copyright (C) 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,
@@ -6,6 +6,21 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Paul Eggert and Derek Price.
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+
AC_DEFUN([gl_INCLUDE_NEXT],
[
AC_LANG_PREPROC_REQUIRE()
@@ -36,18 +51,17 @@ EOF
CPPFLAGS="$save_CPPFLAGS"
rm -rf conftestd1 conftestd2
])
+ PRAGMA_SYSTEM_HEADER=
if test $gl_cv_have_include_next = yes; then
-
- dnl FIXME: Remove HAVE_INCLUDE_NEXT and update everything that uses it
- dnl to use @INCLUDE_NEXT@ instead.
- AC_DEFINE([HAVE_INCLUDE_NEXT], 1,
- [Define if your compiler supports the #include_next directive.])
-
INCLUDE_NEXT=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
else
INCLUDE_NEXT=include
fi
AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
])
# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 1602895105..7e07a42468 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 15 (gettext-0.18)
+# lib-link.m4 serial 16 (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,
@@ -194,6 +194,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
else
additional_includedir="$withval/include"
additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
])
@@ -352,7 +356,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -443,6 +449,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LIB[]NAME[]_PREFIX="$basedir"
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"
+ additional_includedir="$basedir/include"
+ ;;
esac
if test "X$additional_includedir" != "X"; then
dnl Potentially add $additional_includedir to $INCNAME.
@@ -501,9 +512,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -684,7 +697,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
if test -n "$next"; then
dir="$next"
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next=
@@ -693,7 +707,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-L) next=yes ;;
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
rpathdirs="$rpathdirs $dir"
fi
next= ;;
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index a8684e17e3..3bdc0fc574 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-prefix.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 2001-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.
@@ -153,33 +153,69 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
prefix="$acl_save_prefix"
])
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
[
- dnl There is no formal standard regarding lib and lib64. The current
- dnl practice is that on a system supporting 32-bit and 64-bit instruction
- dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
- dnl libraries go under $prefix/lib. We determine the compiler's default
- dnl mode by looking at the compiler's library search path. If at least
- dnl of its elements ends in /lib64 or points to a directory whose absolute
- dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
- dnl default, namely "lib".
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
acl_libdirstem=lib
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) acl_libdirstem=lib64 ;;
- esac ;;
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
esac
fi
- done
- IFS="$acl_save_IFS"
- fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
])
diff --git a/gl/netinet_in.in.h b/gl/netinet_in.in.h
index c45e53b64e..cf5aa81ebe 100644
--- a/gl/netinet_in.in.h
+++ b/gl/netinet_in.in.h
@@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
#if @HAVE_NETINET_IN_H@
+@PRAGMA_SYSTEM_HEADER@
+
/* On many platforms, <netinet/in.h> assumes prior inclusion of
<sys/types.h>. */
# include <sys/types.h>
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 6a054ddc26..3597baf5c2 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -17,6 +17,8 @@
#ifndef _GL_STDARG_H
+@PRAGMA_SYSTEM_HEADER@
+
/* The include_next requires a split double-inclusion guard. */
#@INCLUDE_NEXT@ @NEXT_STDARG_H@