diff -Nru gnutls28-3.3.8/aclocal.m4 gnutls28-3.3.30/aclocal.m4 --- gnutls28-3.3.8/aclocal.m4 2014-09-18 07:12:16.000000000 -0400 +++ gnutls28-3.3.30/aclocal.m4 2018-07-16 01:40:29.000000000 -0400 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15.1 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.15.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,12 +51,12 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.15.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -118,7 +118,7 @@ # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -138,7 +138,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -183,15 +183,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -222,7 +221,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -413,7 +412,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -489,7 +488,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -579,8 +578,8 @@ # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -654,6 +653,9 @@ AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not @@ -683,7 +685,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -694,7 +696,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -704,7 +706,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -725,7 +727,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -775,7 +777,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -812,7 +814,7 @@ fi ]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -846,7 +848,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -875,7 +877,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -922,7 +924,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -941,7 +943,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1022,7 +1024,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1082,7 +1084,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1110,7 +1112,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1129,7 +1131,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1292,6 +1294,7 @@ m4_include([src/gl/m4/tm_gmtoff.m4]) m4_include([src/gl/m4/xalloc.m4]) m4_include([src/libopts/m4/libopts.m4]) +m4_include([src/libopts/m4/stdnoreturn.m4]) m4_include([gl/m4/00gnulib.m4]) m4_include([gl/m4/absolute-header.m4]) m4_include([gl/m4/alloca.m4]) diff -Nru gnutls28-3.3.8/build-aux/compile gnutls28-3.3.30/build-aux/compile --- gnutls28-3.3.8/build-aux/compile 2014-03-06 12:33:50.000000000 -0500 +++ gnutls28-3.3.30/build-aux/compile 2018-07-16 01:38:45.000000000 -0400 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru gnutls28-3.3.8/build-aux/config.guess gnutls28-3.3.30/build-aux/config.guess --- gnutls28-3.3.8/build-aux/config.guess 2014-03-06 12:33:50.000000000 -0500 +++ gnutls28-3.3.30/build-aux/config.guess 2018-07-16 01:38:45.000000000 -0400 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-06-10' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -24,12 +24,12 @@ # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -39,7 +39,7 @@ Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -107,9 +107,9 @@ dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -132,14 +132,14 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +149,20 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -168,21 +175,31 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -197,44 +214,67 @@ os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix + exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -251,63 +291,54 @@ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -319,7 +350,7 @@ echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -346,38 +377,38 @@ sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + eval "$set_cc_for_build" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -386,25 +417,25 @@ ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -415,44 +446,44 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -461,23 +492,23 @@ #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -503,17 +534,17 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -530,7 +561,7 @@ echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -542,14 +573,14 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -560,7 +591,7 @@ exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -574,26 +605,27 @@ exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -608,28 +640,28 @@ echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -662,13 +694,13 @@ exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -679,23 +711,23 @@ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -720,11 +752,11 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -733,7 +765,7 @@ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -741,9 +773,9 @@ exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -768,127 +800,109 @@ echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -901,58 +915,64 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -966,64 +986,74 @@ #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1037,34 +1067,34 @@ # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1074,12 +1104,12 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1089,9 +1119,9 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1099,7 +1129,7 @@ # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1111,9 +1141,9 @@ exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1133,9 +1163,9 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1144,28 +1174,28 @@ test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1176,7 +1206,7 @@ *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1196,23 +1226,23 @@ exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1231,67 +1261,93 @@ echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1300,18 +1356,18 @@ echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1332,14 +1388,14 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1348,182 +1404,48 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif +echo "$0: unable to guess system type" >&2 -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 </dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi + ;; +esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1542,16 +1464,16 @@ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru gnutls28-3.3.8/build-aux/config.sub gnutls28-3.3.30/build-aux/config.sub --- gnutls28-3.3.8/build-aux/config.sub 2014-03-06 12:33:50.000000000 -0500 +++ gnutls28-3.3.30/build-aux/config.sub 2018-07-16 01:38:45.000000000 -0400 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2013-08-10' +timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -25,7 +25,7 @@ # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -53,12 +53,11 @@ me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -68,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -95,7 +94,7 @@ *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -113,24 +112,24 @@ # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -179,44 +178,44 @@ ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 @@ -228,10 +227,7 @@ os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -255,16 +251,18 @@ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ + | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -282,8 +280,10 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -295,14 +295,15 @@ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -310,7 +311,8 @@ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ + | visium \ + | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -324,11 +326,14 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -357,7 +362,7 @@ ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -369,18 +374,20 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -400,8 +407,10 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -413,16 +422,19 @@ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -430,6 +442,8 @@ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -443,7 +457,7 @@ # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -477,7 +491,7 @@ basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -506,6 +520,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -519,7 +536,7 @@ os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -527,13 +544,13 @@ os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -622,10 +639,18 @@ basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -715,9 +740,6 @@ hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -730,26 +752,26 @@ basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -767,17 +789,17 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -809,10 +831,10 @@ os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -822,12 +844,16 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc @@ -869,7 +895,7 @@ basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -914,6 +940,12 @@ nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -946,7 +978,7 @@ os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -962,7 +994,7 @@ basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -977,16 +1009,16 @@ basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -996,23 +1028,23 @@ ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1066,17 +1098,10 @@ sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1095,7 +1120,7 @@ os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1217,6 +1242,9 @@ basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1225,20 +1253,12 @@ basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1267,10 +1287,6 @@ vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1280,9 +1296,6 @@ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1302,7 +1315,7 @@ # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1310,10 +1323,10 @@ # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1324,8 +1337,8 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1336,45 +1349,48 @@ -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1391,12 +1407,12 @@ -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1405,10 +1421,10 @@ os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1419,12 +1435,6 @@ -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1449,7 +1459,7 @@ -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1471,7 +1481,7 @@ -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1486,32 +1496,38 @@ -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; + -ios) + ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1592,9 +1608,6 @@ mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; @@ -1604,12 +1617,12 @@ sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1649,7 +1662,7 @@ m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1664,9 +1677,6 @@ i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1776,15 +1786,15 @@ vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff -Nru gnutls28-3.3.8/build-aux/depcomp gnutls28-3.3.30/build-aux/depcomp --- gnutls28-3.3.8/build-aux/depcomp 2014-03-06 12:33:55.000000000 -0500 +++ gnutls28-3.3.30/build-aux/depcomp 2018-07-16 01:38:49.000000000 -0400 @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 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 @@ -786,6 +786,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -Nru gnutls28-3.3.8/build-aux/install-sh gnutls28-3.3.30/build-aux/install-sh --- gnutls28-3.3.8/build-aux/install-sh 2014-03-06 12:33:50.000000000 -0500 +++ gnutls28-3.3.30/build-aux/install-sh 2018-07-16 01:38:45.000000000 -0400 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,81 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible to + # lower collision chance + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # As "mkdir -p" follows symlinks and we work in /tmp possibly; so + # create the $tmpdir first (and fail if unsuccessful) to make sure + # that nobody tries to guess the $tmpdir name. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +377,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +456,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +474,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru gnutls28-3.3.8/build-aux/ltmain.sh gnutls28-3.3.30/build-aux/ltmain.sh --- gnutls28-3.3.8/build-aux/ltmain.sh 2014-03-06 12:33:43.000000000 -0500 +++ gnutls28-3.3.30/build-aux/ltmain.sh 2018-07-16 01:38:33.000000000 -0400 @@ -1,9 +1,12 @@ +#! /bin/sh +## DO NOT EDIT - This file generated from ./build-aux/ltmain.in +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.2 +# libtool (GNU libtool) 2.4.6 +# Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -23,881 +26,2281 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --no-quiet, --no-silent -# print informational messages (default) -# --no-warn don't display warning messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print more informational messages than default -# --no-verbose don't print the extra informational messages -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.6 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.6" -TIMESTAMP="" -package_revision=1.3337 +VERSION="2.4.6 Debian-2.4.6-2.1" +package_revision=2.4.6 -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + +## ------ ## +## Usage. ## +## ------ ## + +# Run './libtool --help' for help with using this script from the +# command line. + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# After configure completes, it has a better idea of some of the +# shell tools we need than the defaults used by the functions shared +# with bootstrap, so set those here where they can still be over- +# ridden by the user, but otherwise take precedence. + +: ${AUTOCONF="autoconf"} +: ${AUTOMAKE="automake"} + + +## -------------------------- ## +## Source external libraries. ## +## -------------------------- ## + +# Much of our low-level functionality needs to be sourced from external +# libraries, which are installed to $pkgauxdir. + +# Set a version string for this script. +scriptversion=2015-10-12.13; # UTC + +# General shell script boiler plate, and helper functions. +# Written by Gary V. Vaughan, 2004 + +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# Evaluate this file near the top of your script to gain access to +# the functions and variables defined here: +# +# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh +# +# If you need to override any of the default environment variable +# settings, do that before evaluating this file. + + +## -------------------- ## +## Shell normalisation. ## +## -------------------- ## + +# Some shells need a little help to be as Bourne compatible as possible. +# Before doing anything else, make sure all that help has been provided! + +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +# NLS nuisances: We save the old values in case they are required later. +_G_user_locale= +_G_safe_locale= +for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + eval "if test set = \"\${$_G_var+set}\"; then + save_$_G_var=\$$_G_var + $_G_var=C + export $_G_var + _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" + _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL -$lt_unset CDPATH +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Make sure IFS has a sensible default +sp=' ' +nl=' +' +IFS="$sp $nl" + +# There are apparently some retarded systems that use ';' as a PATH separator! +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" +## ------------------------- ## +## Locate command utilities. ## +## ------------------------- ## + + +# func_executable_p FILE +# ---------------------- +# Check that FILE is an executable regular file. +func_executable_p () +{ + test -f "$1" && test -x "$1" +} + + +# func_path_progs PROGS_LIST CHECK_FUNC [PATH] +# -------------------------------------------- +# Search for either a program that responds to --version with output +# containing "GNU", or else returned by CHECK_FUNC otherwise, by +# trying all the directories in PATH with each of the elements of +# PROGS_LIST. +# +# CHECK_FUNC should accept the path to a candidate program, and +# set $func_check_prog_result if it truncates its output less than +# $_G_path_prog_max characters. +func_path_progs () +{ + _G_progs_list=$1 + _G_check_func=$2 + _G_PATH=${3-"$PATH"} + + _G_path_prog_max=0 + _G_path_prog_found=false + _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} + for _G_dir in $_G_PATH; do + IFS=$_G_save_IFS + test -z "$_G_dir" && _G_dir=. + for _G_prog_name in $_G_progs_list; do + for _exeext in '' .EXE; do + _G_path_prog=$_G_dir/$_G_prog_name$_exeext + func_executable_p "$_G_path_prog" || continue + case `"$_G_path_prog" --version 2>&1` in + *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; + *) $_G_check_func $_G_path_prog + func_path_progs_result=$func_check_prog_result + ;; + esac + $_G_path_prog_found && break 3 + done + done + done + IFS=$_G_save_IFS + test -z "$func_path_progs_result" && { + echo "no acceptable sed could be found in \$PATH" >&2 + exit 1 + } +} + + +# We want to be able to use the functions in this file before configure +# has figured out where the best binaries are kept, which means we have +# to search for them ourselves - except when the results are already set +# where we skip the searches. + +# Unless the user overrides by setting SED, search the path for either GNU +# sed, or the sed that truncates its output the least. +test -z "$SED" && { + _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for _G_i in 1 2 3 4 5 6 7; do + _G_sed_script=$_G_sed_script$nl$_G_sed_script + done + echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed + _G_sed_script= + + func_check_prog_sed () + { + _G_path_prog=$1 + + _G_count=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo '' >> conftest.nl + "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + rm -f conftest.sed + SED=$func_path_progs_result +} + + +# Unless the user overrides by setting GREP, search the path for either GNU +# grep, or the grep that truncates its output the least. +test -z "$GREP" && { + func_check_prog_grep () + { + _G_path_prog=$1 + + _G_count=0 + _G_path_prog_max=0 + printf 0123456789 >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo 'GREP' >> conftest.nl + "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + _G_count=`expr $_G_count + 1` + if test "$_G_count" -gt "$_G_path_prog_max"; then + # Best one so far, save it but keep looking for a better one + func_check_prog_result=$_G_path_prog + _G_path_prog_max=$_G_count + fi + # 10*(2^10) chars as input seems more than enough + test 10 -lt "$_G_count" && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out + } + + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + GREP=$func_path_progs_result +} + + +## ------------------------------- ## +## User overridable command paths. ## +## ------------------------------- ## + +# All uppercase variable names are used for environment variables. These +# variables can be overridden by the user before calling a script that +# uses them if a suitable command of that name is not already available +# in the command search PATH. : ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${ECHO="printf %s\n"} +: ${EGREP="$GREP -E"} +: ${FGREP="$GREP -F"} +: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -exit_status=$EXIT_SUCCESS +## -------------------- ## +## Useful sed snippets. ## +## -------------------- ## -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" +sed_dirname='s|/[^/]*$||' +sed_basename='s|^.*/||' -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation - - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' +# Same as above, but do not quote variable references. +sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' +# Sed substitution that converts a w32 file name or path +# that contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation +# Re-'\' parameter expansions in output of sed_double_quote_subst that +# were '\'-ed in input to the same. If an odd number of '\' preceded a +# '$' in input to sed_double_quote_subst, that '$' was protected from +# expansion. Since each input '\' is now two '\'s, look for any number +# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. +_G_bs='\\' +_G_bs2='\\\\' +_G_bs4='\\\\\\\\' +_G_dollar='\$' +sed_double_backslash="\ + s/$_G_bs4/&\\ +/g + s/^$_G_bs2$_G_dollar/$_G_bs&/ + s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g + s/\n//g" -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' +## ----------------- ## +## Global variables. ## +## ----------------- ## + +# Except for the global variables explicitly listed below, the following +# functions in the '^func_' namespace, and the '^require_' namespace +# variables initialised in the 'Resource management' section, sourcing +# this file will not pollute your global namespace with anything +# else. There's no portable way to scope variables in Bourne shell +# though, so actually running these functions will sometimes place +# results into a variable named after the function, and often use +# temporary variables in the '^_G_' namespace. If you are careful to +# avoid using those namespaces casually in your sourcing script, things +# should continue to work as you expect. And, of course, you can freely +# overwrite any of the functions or variables defined here before +# calling anything to customize them. -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done +# Allow overriding, eg assuming that you follow the convention of +# putting '$debug_cmd' at the start of all your functions, you can get +# bash to show function call trace with: +# +# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +debug_cmd=${debug_cmd-":"} +exit_cmd=: - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi +# By convention, finish your script with: +# +# exit $exit_status +# +# so that you can set exit_status to non-zero if you want to indicate +# something went wrong during execution without actually bailing out at +# the point of failure. +exit_status=$EXIT_SUCCESS - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath=$0 -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result +# The name of this program. +progname=`$ECHO "$progpath" |$SED "$sed_basename"` -# Make sure we have an absolute path for reexecution: +# Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) - progdir=$func_dirname_result + progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; *) - save_IFS="$IFS" + _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do - IFS="$save_IFS" + IFS=$_G_IFS test -x "$progdir/$progname" && break done - IFS="$save_IFS" + IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" + progpath=$progdir/$progname ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' +## ----------------- ## +## Standard options. ## +## ----------------- ## + +# The following options affect the operation of the functions defined +# below, and should be set appropriately depending on run-time para- +# meters passed on the command line. -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: opt_dry_run=false -opt_help=false opt_quiet=false opt_verbose=false -opt_warning=: -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +# Categories 'all' and 'none' are always available. Append any others +# you will pass as the first argument to func_warning from your own +# code. +warning_categories= + +# By default, display warnings according to 'opt_warning_types'. Set +# 'warning_func' to ':' to elide all warnings, or func_fatal_error to +# treat the next displayed warning as a fatal error. +warning_func=func_warn_and_continue + +# Set to 'all' to display all warnings, 'none' to suppress all +# warnings, or a space delimited list of some subset of +# 'warning_categories' to display only the listed warnings. +opt_warning_types=all + + +## -------------------- ## +## Resource management. ## +## -------------------- ## + +# This section contains definitions for functions that each ensure a +# particular resource (a file, or a non-empty configuration variable for +# example) is available, and if appropriate to extract default values +# from pertinent package files. Call them using their associated +# 'require_*' variable to ensure that they are executed, at most, once. +# +# It's entirely deliberate that calling these functions can set +# variables that don't obey the namespace limitations obeyed by the rest +# of this file, in order that that they be as useful as possible to +# callers. + + +# require_term_colors +# ------------------- +# Allow display of bold text on terminals that support it. +require_term_colors=func_require_term_colors +func_require_term_colors () +{ + $debug_cmd + + test -t 1 && { + # COLORTERM and USE_ANSI_COLORS environment variables take + # precedence, because most terminfo databases neglect to describe + # whether color sequences are supported. + test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} + + if test 1 = "$USE_ANSI_COLORS"; then + # Standard ANSI escape sequences + tc_reset='' + tc_bold=''; tc_standout='' + tc_red=''; tc_green='' + tc_blue=''; tc_cyan='' + else + # Otherwise trust the terminfo database after all. + test -n "`tput sgr0 2>/dev/null`" && { + tc_reset=`tput sgr0` + test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` + tc_standout=$tc_bold + test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` + test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` + test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` + test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` + test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` + } + fi + } + + require_term_colors=: } -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () + +## ----------------- ## +## Function library. ## +## ----------------- ## + +# This section contains a variety of useful functions to call in your +# scripts. Take note of the portable wrappers for features provided by +# some modern shells, which will fall back to slower equivalents on +# less featureful shells. + + +# func_append VAR VALUE +# --------------------- +# Append VALUE onto the existing contents of VAR. + + # We should try to minimise forks, especially on Windows where they are + # unreasonably slow, so skip the feature probes when bash or zsh are + # being used: + if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then + : ${_G_HAVE_ARITH_OP="yes"} + : ${_G_HAVE_XSI_OPS="yes"} + # The += operator was introduced in bash 3.1 + case $BASH_VERSION in + [12].* | 3.0 | 3.0*) ;; + *) + : ${_G_HAVE_PLUSEQ_OP="yes"} + ;; + esac + fi + + # _G_HAVE_PLUSEQ_OP + # Can be empty, in which case the shell is probed, "yes" if += is + # useable or anything else if it does not work. + test -z "$_G_HAVE_PLUSEQ_OP" \ + && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ + && _G_HAVE_PLUSEQ_OP=yes + +if test yes = "$_G_HAVE_PLUSEQ_OP" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_append () + { + $debug_cmd + + eval "$1+=\$2" + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_append () + { + $debug_cmd + + eval "$1=\$$1\$2" + } +fi + + +# func_append_quoted VAR VALUE +# ---------------------------- +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +if test yes = "$_G_HAVE_PLUSEQ_OP"; then + eval 'func_append_quoted () + { + $debug_cmd + + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" + }' +else + func_append_quoted () + { + $debug_cmd + + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" + } +fi + + +# func_append_uniq VAR VALUE +# -------------------------- +# Append unique VALUE onto the existing contents of VAR, assuming +# entries are delimited by the first character of VALUE. For example: +# +# func_append_uniq options " --another-option option-argument" +# +# will only append to $options if " --another-option option-argument " +# is not already present somewhere in $options already (note spaces at +# each end implied by leading space in second argument). +func_append_uniq () +{ + $debug_cmd + + eval _G_current_value='`$ECHO $'$1'`' + _G_delim=`expr "$2" : '\(.\)'` + + case $_G_delim$_G_current_value$_G_delim in + *"$2$_G_delim"*) ;; + *) func_append "$@" ;; + esac +} + + +# func_arith TERM... +# ------------------ +# Set func_arith_result to the result of evaluating TERMs. + test -z "$_G_HAVE_ARITH_OP" \ + && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ + && _G_HAVE_ARITH_OP=yes + +if test yes = "$_G_HAVE_ARITH_OP"; then + eval 'func_arith () + { + $debug_cmd + + func_arith_result=$(( $* )) + }' +else + func_arith () + { + $debug_cmd + + func_arith_result=`expr "$@"` + } +fi + + +# func_basename FILE +# ------------------ +# Set func_basename_result to FILE with everything up to and including +# the last / stripped. +if test yes = "$_G_HAVE_XSI_OPS"; then + # If this shell supports suffix pattern removal, then use it to avoid + # forking. Hide the definitions single quotes in case the shell chokes + # on unsupported syntax... + _b='func_basename_result=${1##*/}' + _d='case $1 in + */*) func_dirname_result=${1%/*}$2 ;; + * ) func_dirname_result=$3 ;; + esac' + +else + # ...otherwise fall back to using sed. + _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' + _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` + if test "X$func_dirname_result" = "X$1"; then + func_dirname_result=$3 + else + func_append func_dirname_result "$2" + fi' +fi + +eval 'func_basename () { - $opt_verbose && func_echo ${1+"$@"} + $debug_cmd - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : + '"$_b"' +}' + + +# func_dirname FILE APPEND NONDIR_REPLACEMENT +# ------------------------------------------- +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +eval 'func_dirname () +{ + $debug_cmd + + '"$_d"' +}' + + +# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT +# -------------------------------------------------------- +# Perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# For efficiency, we do not delegate to the functions above but instead +# duplicate the functionality here. +eval 'func_dirname_and_basename () +{ + $debug_cmd + + '"$_b"' + '"$_d"' +}' + + +# func_echo ARG... +# ---------------- +# Echo program name prefixed message. +func_echo () +{ + $debug_cmd + + _G_message=$* + + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname: $_G_line" + done + IFS=$func_echo_IFS } -# func_echo_all arg... + +# func_echo_all ARG... +# -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } -# func_error arg... + +# func_echo_infix_1 INFIX ARG... +# ------------------------------ +# Echo program name, followed by INFIX on the first line, with any +# additional lines not showing INFIX. +func_echo_infix_1 () +{ + $debug_cmd + + $require_term_colors + + _G_infix=$1; shift + _G_indent=$_G_infix + _G_prefix="$progname: $_G_infix: " + _G_message=$* + + # Strip color escape sequences before counting printable length + for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" + do + test -n "$_G_tc" && { + _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` + _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` + } + done + _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes + + func_echo_infix_1_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_infix_1_IFS + $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 + _G_prefix=$_G_indent + done + IFS=$func_echo_infix_1_IFS +} + + +# func_error ARG... +# ----------------- # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} + $debug_cmd -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + $require_term_colors - # bash bug again: - : + func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } -# func_fatal_error arg... + +# func_fatal_error ARG... +# ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { - func_error ${1+"$@"} - exit $EXIT_FAILURE -} + $debug_cmd -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" + func_error "$*" + exit $EXIT_FAILURE } -help="Try \`$progname --help' for more information." ## default -# func_grep expression filename +# func_grep EXPRESSION FILENAME +# ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { + $debug_cmd + $GREP "$1" "$2" >/dev/null 2>&1 } -# func_mkdir_p directory-path +# func_len STRING +# --------------- +# Set func_len_result to the length of STRING. STRING may not +# start with a hyphen. + test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_len () + { + $debug_cmd + + func_len_result=${#1} + }' +else + func_len () + { + $debug_cmd + + func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` + } +fi + + +# func_mkdir_p DIRECTORY-PATH +# --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { - my_directory_path="$1" - my_dir_list= + $debug_cmd + + _G_directory_path=$1 + _G_dir_list= - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; + # Protect directory names starting with '-' + case $_G_directory_path in + -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do + while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" + _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac + case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes + func_mkdir_p_IFS=$IFS; IFS=: + for _G_dir in $_G_dir_list; do + IFS=$func_mkdir_p_IFS + # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : + $MKDIR "$_G_dir" 2>/dev/null || : done - IFS="$save_mkdir_p_IFS" + IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" + test -d "$_G_directory_path" || \ + func_fatal_error "Failed to create '$1'" fi } -# func_mktempdir [string] +# func_mktempdir [BASENAME] +# ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. +# given, BASENAME is the basename for that directory. func_mktempdir () { - my_template="${TMPDIR-/tmp}/${1-$progname}" + $debug_cmd - if test "$opt_dry_run" = ":"; then + _G_template=${TMPDIR-/tmp}/${1-$progname} + + if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" + _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` - if test ! -d "$my_tmpdir"; then + if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" + _G_tmpdir=$_G_template-${RANDOM-0}$$ - save_mktempdir_umask=`umask` + func_mktempdir_umask=`umask` umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask + $MKDIR "$_G_tmpdir" + umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + test -d "$_G_tmpdir" || \ + func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi - $ECHO "$my_tmpdir" + $ECHO "$_G_tmpdir" } -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () +# func_normal_abspath PATH +# ------------------------ +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +func_normal_abspath () { - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + $debug_cmd + + # These SED scripts presuppose an absolute path with a trailing slash. + _G_pathcar='s|^/\([^/]*\).*$|\1|' + _G_pathcdr='s|^/[^/]*||' + _G_removedotparts=':dotsl + s|/\./|/|g + t dotsl + s|/\.$|/|' + _G_collapseslashes='s|/\{1,\}|/|g' + _G_finalslash='s|/*$|/|' + + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; *) - func_quote_for_eval_unquoted_result="$1" ;; + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; esac - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` + while :; do + # Processed it all yet? + if test / = "$func_normal_abspath_tpath"; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result"; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$_G_pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + + +# func_notquiet ARG... +# -------------------- +# Echo program name prefixed message only when not in quiet mode. +func_notquiet () +{ + $debug_cmd + + $opt_quiet || func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + + +# func_relative_path SRCDIR DSTDIR +# -------------------------------- +# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. +func_relative_path () +{ + $debug_cmd + + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=$func_dirname_result + if test -z "$func_relative_path_tlibdir"; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test -n "$func_stripname_result"; then + func_append func_relative_path_result "/$func_stripname_result" + fi + + # Normalisation. If bindir is libdir, return '.' else relative path. + if test -n "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + fi + + test -n "$func_relative_path_result" || func_relative_path_result=. + + : +} + + +# func_quote_portable EVAL ARG +# ---------------------------- +# Internal function to portably implement func_quote_arg. Note that we still +# keep attention to performance here so we as much as possible try to avoid +# calling sed binary (so far O(N) complexity as long as func_append is O(1)). +func_quote_portable () +{ + $debug_cmd + + func_quote_portable_result=$2 + + # one-time-loop (easy break) + while true + do + if $1; then + func_quote_portable_result=`$ECHO "$2" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` + break + fi + + # Quote for eval. + case $func_quote_portable_result in + *[\\\`\"\$]*) + case $func_quote_portable_result in + *[\[\*\?]*) + func_quote_portable_result=`$ECHO "$func_quote_portable_result" | $SED "$sed_quote_subst"` + break + ;; + esac + + func_quote_portable_old_IFS=$IFS + for _G_char in '\' '`' '"' '$' + do + # STATE($1) PREV($2) SEPARATOR($3) + set start "" "" + func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy + IFS=$_G_char + for _G_part in $func_quote_portable_result + do + case $1 in + quote) + func_append func_quote_portable_result "$3$2" + set quote "$_G_part" "\\$_G_char" + ;; + start) + set first "" "" + func_quote_portable_result= + ;; + first) + set quote "$_G_part" "" + ;; + esac + done + done + IFS=$func_quote_portable_old_IFS + ;; + *) ;; + esac + break + done + + func_quote_portable_unquoted_result=$func_quote_portable_result + case $func_quote_portable_result in + # double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + func_quote_portable_result=\"$func_quote_portable_result\" ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; +# func_quotefast_eval ARG +# ----------------------- +# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', +# but optimized for speed. Result is stored in $func_quotefast_eval. +if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then + func_quotefast_eval () + { + printf -v func_quotefast_eval_result %q "$1" + } +else + func_quotefast_eval () + { + func_quote_portable false "$1" + func_quotefast_eval_result=$func_quote_portable_result + } +fi + + +# func_quote_arg MODEs ARG +# ------------------------ +# Quote one ARG to be evaled later. MODEs argument may contain zero ore more +# specifiers listed below separated by ',' character. This function returns two +# values: +# i) func_quote_arg_result +# double-quoted (when needed), suitable for a subsequent eval +# ii) func_quote_arg_unquoted_result +# has all characters that are still active within double +# quotes backslashified. Available only if 'unquoted' is specified. +# +# Available modes: +# ---------------- +# 'eval' (default) +# - escape shell special characters +# 'expand' +# - the same as 'eval'; but do not quote variable references +# 'pretty' +# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might +# later used in func_quote to get output like: 'echo "a b"' instead of +# 'echo a\ b'. This is slower than default on some shells. +# 'unquoted' +# - produce also $func_quote_arg_unquoted_result which does not contain +# wrapping double-quotes. +# +# Examples for 'func_quote_arg pretty,unquoted string': +# +# string | *_result | *_unquoted_result +# ------------+-----------------------+------------------- +# " | \" | \" +# a b | "a b" | a b +# "a b" | "\"a b\"" | \"a b\" +# * | "*" | * +# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" +# +# Examples for 'func_quote_arg pretty,unquoted,expand string': +# +# string | *_result | *_unquoted_result +# --------------+---------------------+-------------------- +# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" +func_quote_arg () +{ + _G_quote_expand=false + case ,$1, in + *,expand,*) + _G_quote_expand=: + ;; esac - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" + case ,$1, in + *,pretty,*|*,expand,*|*,unquoted,*) + func_quote_portable $_G_quote_expand "$2" + func_quote_arg_result=$func_quote_portable_result + func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result + ;; + *) + # Faster quote-for-eval for some shells. + func_quotefast_eval "$2" + func_quote_arg_result=$func_quotefast_eval_result ;; esac +} + - func_quote_for_expand_result="$my_arg" +# func_quote MODEs ARGs... +# ------------------------ +# Quote all ARGs to be evaled later and join them into single command. See +# func_quote_arg's description for more info. +func_quote () +{ + $debug_cmd + _G_func_quote_mode=$1 ; shift + func_quote_result= + while test 0 -lt $#; do + func_quote_arg "$_G_func_quote_mode" "$1" + if test -n "$func_quote_result"; then + func_append func_quote_result " $func_quote_arg_result" + else + func_append func_quote_result "$func_quote_arg_result" + fi + shift + done } -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_stripname PREFIX SUFFIX NAME +# --------------------------------- +# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_stripname () + { + $debug_cmd + + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary variable first. + func_stripname_result=$3 + func_stripname_result=${func_stripname_result#"$1"} + func_stripname_result=${func_stripname_result%"$2"} + }' +else + func_stripname () + { + $debug_cmd + + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; + esac + } +fi + + +# func_show_eval CMD [FAIL_EXP] +# ----------------------------- +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } + _G_cmd=$1 + _G_fail_exp=${2-':'} + + func_quote_arg pretty,expand "$_G_cmd" + eval "func_notquiet $func_quote_arg_result" - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_cmd" + _G_status=$? + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# func_show_eval_locale CMD [FAIL_EXP] +# ------------------------------------ +# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { - my_cmd="$1" - my_fail_exp="${2-:}" + $debug_cmd + + _G_cmd=$1 + _G_fail_exp=${2-':'} - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" + $opt_quiet || { + func_quote_arg expand,pretty "$_G_cmd" + eval "func_echo $func_quote_arg_result" } - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" + $opt_dry_run || { + eval "$_G_user_locale + $_G_cmd" + _G_status=$? + eval "$_G_safe_locale" + if test 0 -ne "$_G_status"; then + eval "(exit $_G_status); $_G_fail_exp" fi - fi + } } + # func_tr_sh +# ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac + $debug_cmd + + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac } -# func_version -# Echo version message to standard output and exit. -func_version () +# func_verbose ARG... +# ------------------- +# Echo program name prefixed message in verbose mode only. +func_verbose () { - $opt_debug + $debug_cmd - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? + $opt_verbose && func_echo "$*" + + : } -# func_usage -# Echo short help message to standard output and exit. -func_usage () + +# func_warn_and_continue ARG... +# ----------------------------- +# Echo program name prefixed warning message to standard error. +func_warn_and_continue () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? + $require_term_colors + + func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () + +# func_warning CATEGORY ARG... +# ---------------------------- +# Echo program name prefixed warning message to standard error. Warning +# messages can be filtered according to CATEGORY, where this function +# elides messages where CATEGORY is not listed in the global variable +# 'opt_warning_types'. +func_warning () { - $opt_debug + $debug_cmd - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret + # CATEGORY must be in the warning_categories list! + case " $warning_categories " in + *" $1 "*) ;; + *) func_internal_error "invalid warning category '$1'" ;; + esac + + _G_category=$1 + shift + + case " $opt_warning_types " in + *" $_G_category "*) $warning_func ${1+"$@"} ;; + esac +} + + +# func_sort_ver VER1 VER2 +# ----------------------- +# 'sort -V' is not generally available. +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +func_sort_ver () +{ + $debug_cmd + + printf '%s\n%s\n' "$1" "$2" \ + | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n +} + +# func_lt_ver PREV CURR +# --------------------- +# Return true if PREV and CURR are in the correct order according to +# func_sort_ver, otherwise false. Use it like this: +# +# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." +func_lt_ver () +{ + $debug_cmd + + test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` +} + + +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: +#! /bin/sh + +# Set a version string for this script. +scriptversion=2015-10-12.13; # UTC + +# A portable, pluggable option parser for Bourne shell. +# Written by Gary V. Vaughan, 2010 + +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Please report bugs or propose patches to gary@gnu.org. + + +## ------ ## +## Usage. ## +## ------ ## + +# This file is a library for parsing options in your shell scripts along +# with assorted other useful supporting features that you can make use +# of too. +# +# For the simplest scripts you might need only: +# +# #!/bin/sh +# . relative/path/to/funclib.sh +# . relative/path/to/options-parser +# scriptversion=1.0 +# func_options ${1+"$@"} +# eval set dummy "$func_options_result"; shift +# ...rest of your script... +# +# In order for the '--version' option to work, you will need to have a +# suitably formatted comment like the one at the top of this file +# starting with '# Written by ' and ending with '# warranty; '. +# +# For '-h' and '--help' to work, you will also need a one line +# description of your script's purpose in a comment directly above the +# '# Written by ' line, like the one at the top of this file. +# +# The default options also support '--debug', which will turn on shell +# execution tracing (see the comment above debug_cmd below for another +# use), and '--verbose' and the func_verbose function to allow your script +# to display verbose messages only when your user has specified +# '--verbose'. +# +# After sourcing this file, you can plug processing for additional +# options by amending the variables from the 'Configuration' section +# below, and following the instructions in the 'Option parsing' +# section further down. + +## -------------- ## +## Configuration. ## +## -------------- ## + +# You should override these variables in your script after sourcing this +# file so that they reflect the customisations you have added to the +# option parser. + +# The usage line for option parsing errors and the start of '-h' and +# '--help' output messages. You can embed shell variables for delayed +# expansion at the time the message is displayed, but you will need to +# quote other shell meta-characters carefully to prevent them being +# expanded when the contents are evaled. +usage='$progpath [OPTION]...' + +# Short help message in response to '-h' and '--help'. Add to this or +# override it after sourcing this library to reflect the full set of +# options your script accepts. +usage_message="\ + --debug enable verbose shell tracing + -W, --warnings=CATEGORY + report the warnings falling in CATEGORY [all] + -v, --verbose verbosely report processing + --version print version information and exit + -h, --help print short or long help message and exit +" + +# Additional text appended to 'usage_message' in response to '--help'. +long_help_message=" +Warning categories include: + 'all' show all warnings + 'none' turn off all the warnings + 'error' warnings are treated as fatal errors" + +# Help message printed before fatal option parsing errors. +fatal_help="Try '\$progname --help' for more information." + + + +## ------------------------- ## +## Hook function management. ## +## ------------------------- ## + +# This section contains functions for adding, removing, and running hooks +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. + +# func_hookable FUNC_NAME +# ----------------------- +# Declare that FUNC_NAME will run hooks added with +# 'func_add_hook FUNC_NAME ...'. +func_hookable () +{ + $debug_cmd + + func_append hookable_fns " $1" +} + + +# func_add_hook FUNC_NAME HOOK_FUNC +# --------------------------------- +# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must +# first have been declared "hookable" by a call to 'func_hookable'. +func_add_hook () +{ + $debug_cmd + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not accept hook functions." ;; + esac + + eval func_append ${1}_hooks '" $2"' +} + + +# func_remove_hook FUNC_NAME HOOK_FUNC +# ------------------------------------ +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. +func_remove_hook () +{ + $debug_cmd + + eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' +} + + +# func_run_hooks FUNC_NAME [ARG]... +# --------------------------------- +# Run all hook functions registered to FUNC_NAME. +# It is assumed that the list of hook functions contains nothing more +# than a whitespace-delimited list of legal shell function names, and +# no effort is wasted trying to catch shell meta-characters or preserve +# whitespace. +func_run_hooks () +{ + $debug_cmd + + _G_rc_run_hooks=false + + case " $hookable_fns " in + *" $1 "*) ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; + esac + + eval _G_hook_fns=\$$1_hooks; shift + + for _G_hook in $_G_hook_fns; do + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi + done + + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result +} + + + +## --------------- ## +## Option parsing. ## +## --------------- ## + +# In order to add your own option parsing hooks, you must accept the +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: +# +# my_options_prep () +# { +# $debug_cmd +# +# # Extend the existing usage message. +# usage_message=$usage_message' +# -s, --silent don'\''t print informational messages +# ' +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote eval ${1+"$@"} +# # my_options_prep_result=$func_quote_result +# false +# } +# func_add_hook func_options_prep my_options_prep +# +# +# my_silent_option () +# { +# $debug_cmd +# +# args_changed=false +# +# # Note that for efficiency, we parse as many options as we can +# # recognise in a loop before passing the remainder back to the +# # caller on the first unrecognised argument we encounter. +# while test $# -gt 0; do +# opt=$1; shift +# case $opt in +# --silent|-s) opt_silent=: +# args_changed=: +# ;; +# # Separate non-argument short options: +# -s*) func_split_short_opt "$_G_opt" +# set dummy "$func_split_short_opt_name" \ +# "-$func_split_short_opt_arg" ${1+"$@"} +# shift +# args_changed=: +# ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# esac +# done +# +# if $args_changed; then +# func_quote eval ${1+"$@"} +# my_silent_option_result=$func_quote_result +# fi +# +# $args_changed +# } +# func_add_hook func_parse_options my_silent_option +# +# +# my_option_validation () +# { +# $debug_cmd +# +# $opt_silent && $opt_verbose && func_fatal_help "\ +# '--silent' and '--verbose' options are mutually exclusive." +# +# false +# } +# func_add_hook func_validate_options my_option_validation +# +# You'll also need to manually amend $usage_message to reflect the extra +# options you parse. It's preferable to append if you can, so that +# multiple option parsing hooks can be added safely. + + +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + +# func_options [ARG]... +# --------------------- +# All the functions called inside func_options are hookable. See the +# individual implementations for details. +func_hookable func_options +func_options () +{ + $debug_cmd + + _G_rc_options=false + + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done + + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote eval ${1+"$@"} + func_options_result=$func_quote_result + fi + + $_G_rc_options +} + + +# func_options_prep [ARG]... +# -------------------------- +# All initialisations required before starting the option parse loop. +# Note that when calling hook functions, we pass through the list of +# positional parameters. If a hook function modifies that list, and +# needs to propagate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). +func_hookable func_options_prep +func_options_prep () +{ + $debug_cmd + + # Option defaults: + opt_verbose=false + opt_warning_types= + + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result fi + + $_G_rc_options_prep } -# func_missing_arg argname + +# func_parse_options [ARG]... +# --------------------------- +# The main option parsing loop. +func_hookable func_parse_options +func_parse_options () +{ + $debug_cmd + + func_parse_options_result= + + _G_rc_parse_options=false + # this just eases exit handling + while test $# -gt 0; do + # Defer to hook functions for initial option parsing, so they + # get priority in the event of reusing an option name. + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi + + # Break out of the loop if we already parsed every option. + test $# -gt 0 || break + + _G_match_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --debug|-x) debug_cmd='set -x' + func_echo "enabling shell trace mode" + $debug_cmd + ;; + + --no-warnings|--no-warning|--no-warn) + set dummy --warnings none ${1+"$@"} + shift + ;; + + --warnings|--warning|-W) + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi + case " $warning_categories $1" in + *" $1 "*) + # trailing space prevents matching last $1 above + func_append_uniq opt_warning_types " $1" + ;; + *all) + opt_warning_types=$warning_categories + ;; + *none) + opt_warning_types=none + warning_func=: + ;; + *error) + opt_warning_types=$warning_categories + warning_func=func_fatal_error + ;; + *) + func_fatal_error \ + "unsupported warning category: '$1'" + ;; + esac + shift + ;; + + --verbose|-v) opt_verbose=: ;; + --version) func_version ;; + -\?|-h) func_usage ;; + --help) func_help ;; + + # Separate optargs to long options (plugins may need this): + --*=*) func_split_equals "$_G_opt" + set dummy "$func_split_equals_lhs" \ + "$func_split_equals_rhs" ${1+"$@"} + shift + ;; + + # Separate optargs to short options: + -W*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-v*|-x*) + func_split_short_opt "$_G_opt" + set dummy "$func_split_short_opt_name" \ + "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) _G_rc_parse_options=: ; break ;; + -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; + esac + + $_G_match_parse_options && _G_rc_parse_options=: + done + + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + func_parse_options_result=$func_quote_result + fi + + $_G_rc_parse_options +} + + +# func_validate_options [ARG]... +# ------------------------------ +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +func_hookable func_validate_options +func_validate_options () +{ + $debug_cmd + + _G_rc_validate_options=false + + # Display all warnings if -W was not given. + test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" + + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi + + # Bail if the options were screwed! + $exit_cmd $EXIT_FAILURE + + $_G_rc_validate_options +} + + + +## ----------------- ## +## Helper functions. ## +## ----------------- ## + +# This section contains the helper functions used by the rest of the +# hookable option parser framework in ascii-betical order. + + +# func_fatal_help ARG... +# ---------------------- +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + $debug_cmd + + eval \$ECHO \""Usage: $usage"\" + eval \$ECHO \""$fatal_help"\" + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + + +# func_help +# --------- +# Echo long help message to standard output and exit. +func_help () +{ + $debug_cmd + + func_usage_message + $ECHO "$long_help_message" + exit 0 +} + + +# func_missing_arg ARGNAME +# ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { - $opt_debug + $debug_cmd - func_error "missing argument for $1." + func_error "Missing argument for '$1'." exit_cmd=exit } -# func_split_short_opt shortopt +# func_split_equals STRING +# ------------------------ +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. +test -z "$_G_HAVE_XSI_OPS" \ + && (eval 'x=a/b/c; + test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ + && _G_HAVE_XSI_OPS=yes + +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=${1%%=*} + func_split_equals_rhs=${1#*=} + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_equals () + { + $debug_cmd + + func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` + func_split_equals_rhs= + test "x$func_split_equals_lhs" = "x$1" \ + || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` + } +fi #func_split_equals + + +# func_split_short_opt SHORTOPT +# ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () +if test yes = "$_G_HAVE_XSI_OPS" +then + # This is an XSI compatible shell, allowing a faster implementation... + eval 'func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"} + }' +else + # ...otherwise fall back to using expr, which is often a shell builtin. + func_split_short_opt () + { + $debug_cmd + + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` + func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` + } +fi #func_split_short_opt + + +# func_usage +# ---------- +# Echo short help message to standard output and exit. +func_usage () { - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + $debug_cmd - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation + func_usage_message + $ECHO "Run '$progname --help |${PAGER-more}' for full usage" + exit 0 +} -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () +# func_usage_message +# ------------------ +# Echo short help message to standard output. +func_usage_message () { - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' + $debug_cmd - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation + eval \$ECHO \""Usage: $usage"\" + echo + $SED -n 's|^# || + /^Written by/{ + x;p;x + } + h + /^Written by/q' < "$progpath" + echo + eval \$ECHO \""$usage_message"\" +} -exit_cmd=: +# func_version +# ------------ +# Echo version message to standard output and exit. +func_version () +{ + $debug_cmd + printf '%s\n' "$progname $scriptversion" + $SED -n ' + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more + } + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p + } + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" + exit $? +} -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" +# Local variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-time-zone: "UTC" +# End: -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 +# Set a version string. +scriptversion='(GNU libtool) 2.4.6' -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () +# func_echo ARG... +# ---------------- +# Libtool also displays the current mode in messages, so override +# funclib.sh func_echo with this custom definition. +func_echo () { - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation + $debug_cmd -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation + _G_message=$* + func_echo_IFS=$IFS + IFS=$nl + for _G_line in $_G_message; do + IFS=$func_echo_IFS + $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" + done + IFS=$func_echo_IFS +} -# func_arith arithmetic-term... -func_arith () + +# func_warning ARG... +# ------------------- +# Libtool warnings are not categorized, so override funclib.sh +# func_warning with this simpler definition. +func_warning () { - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation + $debug_cmd + $warning_func ${1+"$@"} +} -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation +## ---------------- ## +## Options parsing. ## +## ---------------- ## + +# Hook in the functions to make sure our own options are parsed during +# the option parsing loop. + +usage='$progpath [OPTION]... [MODE-ARG]...' + +# Short help message in response to '-h'. +usage_message="Options: + --config show all configuration variables + --debug enable verbose shell tracing + -n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --mode=MODE use operation mode MODE + --no-warnings equivalent to '-Wnone' + --preserve-dup-deps don't remove duplicate dependency libraries + --quiet, --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + -v, --verbose print more informational messages than default + --version print version information + -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] + -h, --help, --help-all print short, long, or detailed help message +" -# func_lo2o object -func_lo2o () +# Additional text appended to 'usage_message' in response to '--help'. +func_help () { - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation + $debug_cmd + func_usage_message + $ECHO "$long_help_message + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. When passed as first option, +'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. +Try '$progname --help --mode=MODE' for a more detailed description of MODE. + +When reporting a bug, please describe a test case to reproduce it and +include the following information: + + host-triplet: $host + shell: $SHELL + compiler: $LTCC + compiler flags: $LTCFLAGS + linker: $LD (gnu? $with_gnu_ld) + version: $progname $scriptversion Debian-2.4.6-2.1 + automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` + autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` + +Report bugs to . +GNU libtool home page: . +General help using GNU software: ." + exit 0 +} -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation +# func_lo2o OBJECT-NAME +# --------------------- +# Transform OBJECT-NAME from a '.lo' suffix to the platform specific +# object suffix. -# func_fatal_configuration arg... +lo2o=s/\\.lo\$/.$objext/ +o2lo=s/\\.$objext\$/.lo/ + +if test yes = "$_G_HAVE_XSI_OPS"; then + eval 'func_lo2o () + { + case $1 in + *.lo) func_lo2o_result=${1%.lo}.$objext ;; + * ) func_lo2o_result=$1 ;; + esac + }' + + # func_xform LIBOBJ-OR-SOURCE + # --------------------------- + # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) + # suffix to a '.lo' libtool-object suffix. + eval 'func_xform () + { + func_xform_result=${1%.*}.lo + }' +else + # ...otherwise fall back to using sed. + func_lo2o () + { + func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` + } + + func_xform () + { + func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` + } +fi + + +# func_fatal_configuration ARG... +# ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." + func__fatal_error ${1+"$@"} \ + "See the $PACKAGE documentation for more information." \ + "Fatal configuration error." } # func_config +# ----------- # Display the configuration for all the tags in this script. func_config () { @@ -915,17 +2318,19 @@ exit $? } + # func_features +# ------------- # Display the features supported by this script. func_features () { echo "host: $host" - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" @@ -934,314 +2339,369 @@ exit $? } -# func_enable_tag tagname + +# func_enable_tag TAGNAME +# ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { - # Global variable: - tagname="$1" + # Global variable: + tagname=$1 - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf=/$re_begincf/,/$re_endcf/p + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac } + # func_check_version_match +# ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - else - cat >&2 <<_LT_EOF + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF - fi - else - cat >&2 <<_LT_EOF + fi + else + cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF - fi + fi - exit $EXIT_MISMATCH - fi + exit $EXIT_MISMATCH + fi } -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - +# libtool_options_prep [ARG]... +# ----------------------------- +# Preparation for options parsed by libtool. +libtool_options_prep () +{ + $debug_mode + # Option defaults: + opt_config=false + opt_dlopen= + opt_dry_run=false + opt_help=false + opt_mode= + opt_preserve_dup_deps=false + opt_quiet=false -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false + nonopt= + preserve_args= + _G_rc_lt_options_prep=: -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - opt_silent=false -func_append preserve_args " $opt" - ;; - --no-warning|--no-warn) - opt_warning=false -func_append preserve_args " $opt" - ;; - --no-verbose) - opt_verbose=false -func_append preserve_args " $opt" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; + # Shorthand for --mode=foo, only valid as the first argument + case $1 in + clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; + compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; + execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; + finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; + install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; + link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; + uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; + *) + _G_rc_lt_options_prep=false + ;; esac - done - # Validate options: + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote eval ${1+"$@"} + libtool_options_prep_result=$func_quote_result + fi - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi + $_G_rc_lt_options_prep +} +func_add_hook func_options_prep libtool_options_prep - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac +# libtool_parse_options [ARG]... +# --------------------------------- +# Provide handling for libtool specific options. +libtool_parse_options () +{ + $debug_cmd - $opt_help || { - # Sanity checks first: - func_check_version_match + _G_rc_lt_parse_options=false - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" + # Perform our own loop to consume as many options as possible in + # each iteration. + while test $# -gt 0; do + _G_match_lt_parse_options=: + _G_opt=$1 + shift + case $_G_opt in + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + + --config) func_config ;; + + --dlopen|-dlopen) + opt_dlopen="${opt_dlopen+$opt_dlopen +}$1" + shift + ;; + + --preserve-dup-deps) + opt_preserve_dup_deps=: ;; + + --features) func_features ;; + + --finish) set dummy --mode finish ${1+"$@"}; shift ;; + + --help) opt_help=: ;; + + --help-all) opt_help=': help-all' ;; + + --mode) test $# = 0 && func_missing_arg $_G_opt && break + opt_mode=$1 + case $1 in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $_G_opt" + exit_cmd=exit + break + ;; + esac + shift + ;; + + --no-silent|--no-quiet) + opt_quiet=false + func_append preserve_args " $_G_opt" + ;; + + --no-warnings|--no-warning|--no-warn) + opt_warning=false + func_append preserve_args " $_G_opt" + ;; + + --no-verbose) + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --silent|--quiet) + opt_quiet=: + opt_verbose=false + func_append preserve_args " $_G_opt" + ;; + + --tag) test $# = 0 && func_missing_arg $_G_opt && break + opt_tag=$1 + func_append preserve_args " $_G_opt $1" + func_enable_tag "$1" + shift + ;; + + --verbose|-v) opt_quiet=false + opt_verbose=: + func_append preserve_args " $_G_opt" + ;; + + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; + esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: + done + + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote eval ${1+"$@"} + libtool_parse_options_result=$func_quote_result fi - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + $_G_rc_lt_parse_options +} +func_add_hook func_parse_options libtool_parse_options + + - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE +# libtool_validate_options [ARG]... +# --------------------------------- +# Perform any sanity checks on option settings and/or unconsumed +# arguments. +libtool_validate_options () +{ + # save first non-option argument + if test 0 -lt $#; then + nonopt=$1 + shift fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } + # preserve --debug + test : = "$debug_cmd" || func_append preserve_args " --debug" + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE + $opt_help || { + # Sanity checks first: + func_check_version_match + + test yes != "$build_libtool_libs" \ + && test yes != "$build_old_libs" \ + && func_fatal_configuration "not configured to build any kind of library" + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test execute != "$opt_mode"; then + func_error "unrecognized option '-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help=$help + help="Try '$progname --help --mode=$opt_mode' for more information." + } + + # Pass back the unparsed argument list + func_quote eval ${1+"$@"} + libtool_validate_options_result=$func_quote_result } +func_add_hook func_validate_options libtool_validate_options +# Process options as early as possible so that --help and --version +# can return quickly. +func_options ${1+"$@"} +eval set dummy "$func_options_result"; shift + ## ----------- ## ## Main. ## ## ----------- ## +magic='%%%MAGIC variable%%%' +magic_exe='%%%MAGIC EXE variable%%%' + +# Global variables. +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# func_generated_by_libtool +# True iff stdin has been generated by Libtool. This function is only +# a basic sanity check; it will hardly flush out determined imposters. +func_generated_by_libtool_p () +{ + $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + # func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 + $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. +# True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. +# fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no @@ -1249,13 +2709,13 @@ for lalib_p_l in 1 2 3 4 do read lalib_p_line - case "$lalib_p_line" in + case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi - test "$lalib_p" = yes + test yes = "$lalib_p" } # func_ltwrapper_script_p file @@ -1264,7 +2724,8 @@ # determined imposters. func_ltwrapper_script_p () { - func_lalib_p "$1" + test -f "$1" && + $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file @@ -1289,7 +2750,7 @@ { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" + func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file @@ -1308,11 +2769,13 @@ # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { - $opt_debug + $debug_cmd + save_ifs=$IFS; IFS='~' for cmd in $1; do - IFS=$save_ifs + IFS=$sp$nl eval cmd=\"$cmd\" + IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs @@ -1324,10 +2787,11 @@ # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. +# 'FILE.' does not work on cygwin managed mounts. func_source () { - $opt_debug + $debug_cmd + case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; @@ -1354,10 +2818,10 @@ # store the result into func_replace_sysroot_result. func_replace_sysroot () { - case "$lt_sysroot:$1" in + case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" + func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. @@ -1374,7 +2838,8 @@ # arg is usually of the form 'gcc ...' func_infer_tag () { - $opt_debug + $debug_cmd + if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do @@ -1393,7 +2858,7 @@ for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. @@ -1418,7 +2883,7 @@ # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" + func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi @@ -1434,15 +2899,15 @@ # but don't create it if we're doing a dry run. func_write_libtool_object () { - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' + write_libobj=$1 + if test yes = "$build_libtool_libs"; then + write_lobj=\'$2\' else write_lobj=none fi - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' + if test yes = "$build_old_libs"; then + write_oldobj=\'$3\' else write_oldobj=none fi @@ -1450,7 +2915,7 @@ $opt_dry_run || { cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` + $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi @@ -1514,18 +2980,19 @@ # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { - $opt_debug + $debug_cmd + # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" + func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi @@ -1554,7 +3021,8 @@ # environment variable; do not put it in $PATH. func_cygpath () { - $opt_debug + $debug_cmd + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then @@ -1563,7 +3031,7 @@ fi else func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath @@ -1574,10 +3042,11 @@ # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { - $opt_debug + $debug_cmd + # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 @@ -1588,13 +3057,14 @@ # func_to_host_file_result to ARG1). func_convert_file_check () { - $opt_debug - if test -z "$2" && test -n "$1" ; then + $debug_cmd + + if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" - func_error " \`$1'" + func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: - func_to_host_file_result="$1" + func_to_host_file_result=$1 fi } # end func_convert_file_check @@ -1606,10 +3076,11 @@ # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { - $opt_debug + $debug_cmd + if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" - func_error " \`$3'" + func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. @@ -1618,7 +3089,7 @@ func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else - func_to_host_path_result="$3" + func_to_host_path_result=$3 fi fi } @@ -1630,9 +3101,10 @@ # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { - $opt_debug + $debug_cmd + case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" + $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in @@ -1646,7 +3118,7 @@ ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## -# invoked via `$to_host_file_cmd ARG' +# invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. @@ -1657,7 +3129,8 @@ # in func_to_host_file_result. func_to_host_file () { - $opt_debug + $debug_cmd + $to_host_file_cmd "$1" } # end func_to_host_file @@ -1669,7 +3142,8 @@ # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { - $opt_debug + $debug_cmd + case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 @@ -1687,7 +3161,7 @@ # Copy ARG to func_to_host_file_result. func_convert_file_noop () { - func_to_host_file_result="$1" + func_to_host_file_result=$1 } # end func_convert_file_noop @@ -1698,11 +3172,12 @@ # func_to_host_file_result. func_convert_file_msys_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" + func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1714,8 +3189,9 @@ # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. @@ -1731,11 +3207,12 @@ # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1747,12 +3224,13 @@ # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1765,13 +3243,14 @@ # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { - $opt_debug - func_to_host_file_result="$1" + $debug_cmd + + func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" + func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } @@ -1781,7 +3260,7 @@ ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# -# invoked via `$to_host_path_cmd ARG' +# invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. @@ -1805,10 +3284,11 @@ to_host_path_cmd= func_init_to_host_path_cmd () { - $opt_debug + $debug_cmd + if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" + to_host_path_cmd=func_convert_path_$func_stripname_result fi } @@ -1818,7 +3298,8 @@ # in func_to_host_path_result. func_to_host_path () { - $opt_debug + $debug_cmd + func_init_to_host_path_cmd $to_host_path_cmd "$1" } @@ -1829,7 +3310,7 @@ # Copy ARG to func_to_host_path_result. func_convert_path_noop () { - func_to_host_path_result="$1" + func_to_host_path_result=$1 } # end func_convert_path_noop @@ -1840,8 +3321,9 @@ # func_to_host_path_result. func_convert_path_msys_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; @@ -1849,7 +3331,7 @@ func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1863,8 +3345,9 @@ # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" @@ -1883,14 +3366,15 @@ # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" @@ -1904,15 +3388,16 @@ # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1927,8 +3412,9 @@ # func_to_host_file_result. func_convert_path_nix_to_cygwin () { - $opt_debug - func_to_host_path_result="$1" + $debug_cmd + + func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them @@ -1937,7 +3423,7 @@ func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" + func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" @@ -1946,13 +3432,31 @@ # end func_convert_path_nix_to_cygwin +# func_dll_def_p FILE +# True iff FILE is a Windows DLL '.def' file. +# Keep in sync with _LT_DLL_DEF_P in libtool.m4 +func_dll_def_p () +{ + $debug_cmd + + func_dll_def_p_tmp=`$SED -n \ + -e 's/^[ ]*//' \ + -e '/^\(;.*\)*$/d' \ + -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ + -e q \ + "$1"` + test DEF = "$func_dll_def_p_tmp" +} + + # func_mode_compile arg... func_mode_compile () { - $opt_debug + $debug_cmd + # Get the compilation command and the source file. base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" + srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal @@ -1965,12 +3469,12 @@ case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile - lastarg="$arg" + lastarg=$arg arg_mode=normal ;; target ) - libobj="$arg" + libobj=$arg arg_mode=normal continue ;; @@ -1980,7 +3484,7 @@ case $arg in -o) test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" + func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; @@ -2009,12 +3513,12 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for arg in $args; do - IFS="$save_ifs" + IFS=$save_ifs func_append_quoted lastarg "$arg" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result @@ -2027,8 +3531,8 @@ # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # - lastarg="$srcfile" - srcfile="$arg" + lastarg=$srcfile + srcfile=$arg ;; esac # case $arg ;; @@ -2043,13 +3547,13 @@ func_fatal_error "you must specify an argument for -Xcompile" ;; target) - func_fatal_error "you must specify a target with \`-o'" + func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" - libobj="$func_basename_result" + libobj=$func_basename_result } ;; esac @@ -2069,7 +3573,7 @@ case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) - func_fatal_error "cannot determine name of library object from \`$libobj'" + func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac @@ -2078,8 +3582,8 @@ for arg in $later; do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes = "$build_libtool_libs" \ + || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; @@ -2102,20 +3606,20 @@ esac done - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ + func_quote_arg pretty "$libobj" + test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." + && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname + objname=$func_basename_result + xdir=$func_dirname_result + lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" @@ -2127,16 +3631,16 @@ pic_mode=default ;; esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" + if test no = "$compiler_c_o"; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext + lockfile=$output_obj.lock else output_obj= need_locks=no @@ -2145,12 +3649,12 @@ # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then + if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done - elif test "$need_locks" = warn; then + elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: @@ -2158,7 +3662,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2176,15 +3680,15 @@ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result + func_quote_arg pretty "$srcfile" + qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile - if test "$pic_mode" != no; then + if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code @@ -2201,7 +3705,7 @@ func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2212,7 +3716,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2228,20 +3732,20 @@ fi # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then + if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then + if test yes = "$build_old_libs"; then + if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi - if test "$compiler_c_o" = yes; then + if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi @@ -2250,7 +3754,7 @@ func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - if test "$need_locks" = warn && + if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: @@ -2261,7 +3765,7 @@ This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you +your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." @@ -2281,7 +3785,7 @@ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked - if test "$need_locks" != no; then + if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi @@ -2291,7 +3795,7 @@ } $opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} + test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () @@ -2311,7 +3815,7 @@ Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated @@ -2330,16 +3834,16 @@ -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking + -shared do not build a '.o' file suitable for static linking + -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler -COMPILE-COMMAND is a command to be used in creating a \`standard' object file +COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." +SOURCEFILE, then substituting the C source code suffix '.c' with the +library object suffix, '.lo'." ;; execute) @@ -2352,7 +3856,7 @@ -dlopen FILE add the directory containing FILE to the library path -This mode sets the library path environment variable according to \`-dlopen' +This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated @@ -2371,7 +3875,7 @@ Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." +the '--dry-run' option if you just want to see what would be executed." ;; install) @@ -2381,7 +3885,7 @@ Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. +either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: @@ -2407,7 +3911,7 @@ -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE @@ -2421,7 +3925,8 @@ -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects + -objectlist FILE use a list of object files found in FILE to specify objects + -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information @@ -2441,20 +3946,20 @@ -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) -All other options (arguments beginning with \`-') are ignored. +All other options (arguments beginning with '-') are ignored. -Every other argument is treated as a filename. Files ending in \`.la' are +Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is +If the OUTPUT-FILE ends in '.la', then a libtool library is created, +only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. +If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created +using 'ar' and 'ranlib', or on Windows using 'lib'. -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; @@ -2465,7 +3970,7 @@ Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. @@ -2473,17 +3978,17 @@ ;; *) - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo - $ECHO "Try \`$progname --help' for more information about other modes." + $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then - if test "$opt_help" = :; then + if test : = "$opt_help"; then func_mode_help else { @@ -2491,7 +3996,7 @@ for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' + } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do @@ -2499,7 +4004,7 @@ func_mode_help done } | - sed '1d + $SED '1d /^When reporting/,/^Report/{ H d @@ -2516,16 +4021,17 @@ # func_mode_execute arg... func_mode_execute () { - $opt_debug + $debug_cmd + # The first argument is the command name. - cmd="$nonopt" + cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ - || func_fatal_help "\`$file' is not a file" + || func_fatal_help "'$file' is not a file" dir= case $file in @@ -2535,7 +4041,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" + || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= @@ -2546,18 +4052,18 @@ if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" + func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; @@ -2565,18 +4071,18 @@ *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result ;; *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" + test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then @@ -2588,7 +4094,7 @@ # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. - libtool_execute_magic="$magic" + libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= @@ -2601,12 +4107,12 @@ if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. - file="$progdir/$program" + file=$progdir/$program fi ;; esac @@ -2614,7 +4120,15 @@ func_append_quoted args "$file" done - if test "X$opt_dry_run" = Xfalse; then + if $opt_dry_run; then + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" @@ -2631,25 +4145,18 @@ done # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS + exec_cmd=\$cmd$args fi } -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} +test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { - $opt_debug + $debug_cmd + libs= libdirs= admincmds= @@ -2663,11 +4170,11 @@ if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else - func_warning "\`$opt' is not a valid libtool archive" + func_warning "'$opt' is not a valid libtool archive" fi else - func_fatal_error "invalid argument \`$opt'" + func_fatal_error "invalid argument '$opt'" fi done @@ -2682,12 +4189,12 @@ # Remove sysroot references if $opt_dry_run; then for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done @@ -2712,7 +4219,7 @@ fi # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS + $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" @@ -2723,27 +4230,27 @@ echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" + $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo @@ -2762,21 +4269,23 @@ exit $EXIT_SUCCESS } -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} +test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { - $opt_debug + $debug_cmd + # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then + case $nonopt in *shtool*) :;; *) false;; esac + then # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " + func_quote_arg pretty "$nonopt" + install_prog="$func_quote_arg_result " arg=$1 shift else @@ -2786,8 +4295,8 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -2800,7 +4309,7 @@ opts= prev= install_type= - isdir=no + isdir=false stripme= no_mode=: for arg @@ -2813,7 +4322,7 @@ fi case $arg in - -d) isdir=yes ;; + -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg @@ -2831,7 +4340,7 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then + if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi @@ -2844,24 +4353,24 @@ esac # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" + func_quote_arg pretty "$arg" + func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then - func_quote_for_eval "$arg2" + func_quote_arg pretty "$arg2" fi - func_append install_shared_prog " $func_quote_for_eval_result" + func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" + func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" + func_quote_arg pretty "$install_override_mode" + func_append install_shared_prog " -m $func_quote_arg_result" fi fi @@ -2878,19 +4387,19 @@ dest=$func_stripname_result # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" + test -d "$dest" && isdir=: + if $isdir; then + destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" + destdir=$func_dirname_result + destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" + func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -2899,7 +4408,7 @@ case $file in *.lo) ;; *) - func_fatal_help "\`$destdir' must be an absolute directory name" + func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done @@ -2908,7 +4417,7 @@ # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic staticlibs= future_libdirs= @@ -2928,7 +4437,7 @@ # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" + || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= @@ -2950,7 +4459,7 @@ fi func_dirname "$file" "/" "" - dir="$func_dirname_result" + dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then @@ -2964,7 +4473,7 @@ # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. @@ -2973,29 +4482,36 @@ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi - func_warning "relinking \`$file'" + func_warning "relinking '$file'" func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then - realname="$1" + realname=$1 shift - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T + srcname=$realname + test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' - tstripme="$stripme" + tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) - tstripme="" + tstripme= + ;; + esac + ;; + os2*) + case $realname in + *_dll.a) + tstripme= ;; esac ;; @@ -3006,7 +4522,7 @@ if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on + # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname @@ -3017,14 +4533,14 @@ fi # Do each command in the postinstall commands. - lib="$destdir/$realname" + lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i + name=$func_basename_result + instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. @@ -3036,11 +4552,11 @@ # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. @@ -3050,11 +4566,11 @@ staticdest=$func_lo2o_result ;; *.$objext) - staticdest="$destfile" + staticdest=$destfile destfile= ;; *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" + func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac @@ -3063,7 +4579,7 @@ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. - if test "$build_old_libs" = yes; then + if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result @@ -3075,23 +4591,23 @@ *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then - destfile="$destdir/$destname" + destfile=$destdir/$destname else func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" + destfile=$func_basename_result + destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install - stripped_ext="" + stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result - stripped_ext=".exe" + stripped_ext=.exe fi ;; esac @@ -3119,19 +4635,19 @@ # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" + func_fatal_error "invalid libtool wrapper script '$wrapper'" - finalize=yes + finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no + func_warning "'$lib' has not been installed in '$libdir'" + finalize=false fi done @@ -3139,29 +4655,29 @@ func_source "$wrapper" outputname= - if test "$fast_install" = no && test -n "$relink_command"; then + if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { - if test "$finalize" = yes; then + if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" + file=$func_basename_result + outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" + $opt_quiet || { + func_quote_arg expand,pretty "$relink_command" + eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else - func_error "error: relink \`$file' with the above command before installing it" + func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi - file="$outputname" + file=$outputname else - func_warning "cannot relink \`$file'" + func_warning "cannot relink '$file'" fi } else @@ -3198,10 +4714,10 @@ for file in $staticlibs; do func_basename "$file" - name="$func_basename_result" + name=$func_basename_result # Set up the ranlib parameters. - oldlib="$destdir/$name" + oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result @@ -3216,18 +4732,18 @@ done test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" + func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } -test "$opt_mode" = install && func_mode_install ${1+"$@"} +test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -3235,16 +4751,17 @@ # a dlpreopen symbol table. func_generate_dlsyms () { - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + $debug_cmd + + my_outputname=$1 + my_originator=$2 + my_pic_p=${3-false} + my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" + my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi @@ -3255,7 +4772,7 @@ "") ;; *.c) # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" + nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" @@ -3263,34 +4780,36 @@ func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ +/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* External symbol declarations for the compiler. */\ " - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" + if test yes = "$dlself"; then + func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" @@ -3298,7 +4817,7 @@ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done @@ -3318,10 +4837,10 @@ # Prepare the list of exported symbols if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" + export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' @@ -3331,7 +4850,7 @@ } else $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in @@ -3345,22 +4864,22 @@ fi for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" + func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" - name="$func_basename_result" + name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" + dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then + if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" + dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" @@ -3368,7 +4887,7 @@ fi fi $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then + if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" @@ -3424,6 +4943,11 @@ echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi + func_show_eval '$RM "${nlist}I"' + if test -n "$global_symbol_to_import"; then + eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' + fi + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ @@ -3432,11 +4956,30 @@ void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; +lt_${my_prefix}_LTX_preloaded_symbols[];\ +" + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ +static void lt_syminit(void) +{ + LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; + for (; symbol->name; ++symbol) + {" + $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" + echo >> "$output_objdir/$my_dlsyms" "\ + } +}" + fi + echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," +{ {\"$my_originator\", (void *) 0}," + + if test -s "$nlist"I; then + echo >> "$output_objdir/$my_dlsyms" "\ + {\"@INIT@\", (void *) <_syminit}," + fi case $need_lib_prefix in no) @@ -3478,9 +5021,7 @@ *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi + $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; @@ -3497,10 +5038,10 @@ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" + symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then @@ -3518,7 +5059,7 @@ esac ;; *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" + func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else @@ -3532,6 +5073,32 @@ fi } +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $debug_cmd + + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + # func_win32_libid arg # return the library type of file 'arg' # @@ -3541,8 +5108,9 @@ # Despite the name, also deal with 64 bit binaries. func_win32_libid () { - $opt_debug - win32_libid_type="unknown" + $debug_cmd + + win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import @@ -3552,16 +5120,29 @@ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' + case $nm_interface in + "MS dumpbin") + if func_cygming_ms_implib_p "$1" || + func_cygming_gnu_implib_p "$1" + then + win32_nmres=import + else + win32_nmres= + fi + ;; + *) + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' 1,100{ / I /{ - s,.*,import, + s|.*|import| p q } }'` + ;; + esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; @@ -3593,7 +5174,8 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { - $opt_debug + $debug_cmd + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } @@ -3610,7 +5192,8 @@ # specified import library. func_cygming_dll_for_implib_fallback_core () { - $opt_debug + $debug_cmd + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ @@ -3646,8 +5229,8 @@ /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is + # archive that possess that section. Heuristic: eliminate + # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually @@ -3658,30 +5241,6 @@ $SED -e '/^\./d;/^.\./d;q' } -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified @@ -3695,16 +5254,17 @@ # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then + $debug_cmd + + if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then + elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown - sharedlib_from_linklib_result="" + sharedlib_from_linklib_result= fi } @@ -3712,10 +5272,11 @@ # func_extract_an_archive dir oldlib func_extract_an_archive () { - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then + $debug_cmd + + f_ex_an_ar_dir=$1; shift + f_ex_an_ar_oldlib=$1 + if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" @@ -3724,7 +5285,7 @@ fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then + if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then @@ -3738,22 +5299,23 @@ # func_extract_archives gentop oldlib ... func_extract_archives () { - $opt_debug - my_gentop="$1"; shift + $debug_cmd + + my_gentop=$1; shift my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" + my_oldobjs= + my_xlib= + my_xabs= + my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" - my_xlib="$func_basename_result" + my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in @@ -3765,7 +5327,7 @@ esac done extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" + my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" @@ -3778,22 +5340,23 @@ cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` + func_basename "$darwin_archive" + darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" + for darwin_arch in $darwin_arches; do + func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" + $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" + cd "unfat-$$/$darwin_base_archive-$darwin_arch" + func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do @@ -3815,7 +5378,7 @@ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done - func_extract_archives_result="$my_oldobjs" + func_extract_archives_result=$my_oldobjs } @@ -3830,7 +5393,7 @@ # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is +# will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () @@ -3841,7 +5404,7 @@ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. @@ -3883,7 +5446,8 @@ if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + func_quote_arg pretty "$ECHO" + qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -3893,14 +5457,14 @@ \$1 _LTECHO_EOF' } - ECHO=\"$qECHO\" + ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on +# /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match +# (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and @@ -3933,7 +5497,7 @@ # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } @@ -3944,7 +5508,7 @@ lt_dump_args_N=1; for lt_arg do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } @@ -3958,7 +5522,7 @@ *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} @@ -3968,7 +5532,7 @@ *) $ECHO "\ if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} @@ -4043,13 +5607,13 @@ test -n \"\$absdir\" && thisdir=\"\$absdir\" " - if test "$fast_install" = yes; then + if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" @@ -4066,7 +5630,7 @@ if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else - $ECHO \"\$relink_command_output\" >&2 + \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi @@ -4101,7 +5665,7 @@ fi # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" @@ -4121,7 +5685,7 @@ fi else # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 @@ -4140,7 +5704,7 @@ cat < #include +#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) + /* declarations of non-ANSI functions */ -#if defined(__MINGW32__) +#if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif -/* #elif defined (other platforms) ... */ +/* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) +#if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) +#elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv -#elif defined(__CYGWIN__) +#elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ +/* #elif defined other platforms ... */ #endif -#if defined(PATH_MAX) +#if defined PATH_MAX # define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) +#elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 @@ -4234,8 +5796,8 @@ # define PATH_SEPARATOR ':' #endif -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) +#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ + defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 @@ -4268,10 +5830,10 @@ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ + if (stale) { free (stale); stale = 0; } \ } while (0) -#if defined(LT_DEBUGWRAPPER) +#if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; @@ -4300,11 +5862,16 @@ EOF cat < 0) && IS_PATH_SEPARATOR (new_value[len-1])) + size_t len = strlen (new_value); + while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { - new_value[len-1] = '\0'; + new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); @@ -5082,27 +6649,47 @@ # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { - $opt_debug + $debug_cmd + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } +# func_suncc_cstd_abi +# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! +# Several compiler flags select an ABI that is incompatible with the +# Cstd library. Avoid specifying it if any are in CXXFLAGS. +func_suncc_cstd_abi () +{ + $debug_cmd + + case " $compile_command " in + *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) + suncc_use_cstd_abi=no + ;; + *) + suncc_use_cstd_abi=yes + ;; + esac +} + # func_mode_link arg... func_mode_link () { - $opt_debug + $debug_cmd + case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra + # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not + # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. @@ -5146,10 +6733,11 @@ module=no no_install=no objs= + os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no - preload=no + preload=false prev= prevarg= release= @@ -5161,7 +6749,7 @@ vinfo= vinfo_number=no weak_libs= - single_module="${wl}-single_module" + single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. @@ -5169,15 +6757,15 @@ do case $arg in -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" + test yes != "$build_libtool_libs" \ + && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then @@ -5210,11 +6798,11 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do - arg="$1" + arg=$1 shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" + func_quote_arg pretty,unquoted "$arg" + qarg=$func_quote_arg_unquoted_result + func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -5227,21 +6815,21 @@ case $prev in bindir) - bindir="$arg" + bindir=$arg prev= continue ;; dlfiles|dlprefiles) - if test "$preload" = no; then + $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" - preload=yes - fi + preload=: + } case $arg in *.la | *.lo) ;; # We handle these cases below. force) - if test "$dlself" = no; then + if test no = "$dlself"; then dlself=needless export_dynamic=yes fi @@ -5249,9 +6837,9 @@ continue ;; self) - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless @@ -5261,7 +6849,7 @@ continue ;; *) - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" @@ -5272,14 +6860,14 @@ esac ;; expsyms) - export_symbols="$arg" + export_symbols=$arg test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" + || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) - export_symbols_regex="$arg" + export_symbols_regex=$arg prev= continue ;; @@ -5297,7 +6885,13 @@ continue ;; inst_prefix) - inst_prefix_dir="$arg" + inst_prefix_dir=$arg + prev= + continue + ;; + mllvm) + # Clang does not use LLVM to link, so we can simply discard any + # '-mllvm $arg' options when doing the link step. prev= continue ;; @@ -5321,21 +6915,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5346,7 +6940,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5354,23 +6948,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" + arg=$pic_object fi # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5378,7 +6972,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5386,24 +6980,29 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi done else - func_fatal_error "link input file \`$arg' does not exist" + func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; + os2dllname) + os2dllname=$arg + prev= + continue + ;; precious_regex) - precious_files_regex="$arg" + precious_files_regex=$arg prev= continue ;; release) - release="-$arg" + release=-$arg prev= continue ;; @@ -5415,7 +7014,7 @@ func_fatal_error "only absolute run-paths are allowed" ;; esac - if test "$prev" = rpath; then + if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; @@ -5430,7 +7029,7 @@ continue ;; shrext) - shrext_cmds="$arg" + shrext_cmds=$arg prev= continue ;; @@ -5470,7 +7069,7 @@ esac fi # test -n "$prev" - prevarg="$arg" + prevarg=$arg case $arg in -all-static) @@ -5484,7 +7083,7 @@ -allow-undefined) # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" + func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) @@ -5516,7 +7115,7 @@ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi - if test "X$arg" = "X-export-symbols"; then + if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex @@ -5550,9 +7149,9 @@ func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" + func_fatal_error "require no space between '-L' and '$1'" else - func_fatal_error "need path for \`-L' option" + func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" @@ -5563,8 +7162,8 @@ *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" + func_fatal_error "cannot determine absolute directory name of '$dir'" + dir=$absdir ;; esac case "$deplibs " in @@ -5599,7 +7198,7 @@ ;; -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) @@ -5607,11 +7206,11 @@ ;; *-*-os2*) # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework @@ -5620,16 +7219,16 @@ ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue + test X-lc = "X$arg" && continue ;; esac - elif test "X$arg" = "X-lc_r"; then + elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -5639,6 +7238,11 @@ continue ;; + -mllvm) + prev=mllvm + continue + ;; + -module) module=yes continue @@ -5668,7 +7272,7 @@ ;; -multi_module) - single_module="${wl}-multi_module" + single_module=$wl-multi_module continue ;; @@ -5682,8 +7286,8 @@ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" + func_warning "'-no-install' is ignored for $host" + func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; @@ -5701,6 +7305,11 @@ continue ;; + -os2dllname) + prev=os2dllname + continue + ;; + -o) prev=output ;; -precious-files-regex) @@ -5788,14 +7397,14 @@ func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" + IFS=$save_ifs + func_quote_arg pretty "$flag" + func_append arg " $func_quote_arg_result" + func_append compiler_flags " $func_quote_arg_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5804,15 +7413,15 @@ func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= - save_ifs="$IFS"; IFS=',' + save_ifs=$IFS; IFS=, for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" + IFS=$save_ifs + func_quote_arg pretty "$flag" + func_append arg " $wl$func_quote_arg_result" + func_append compiler_flags " $wl$func_quote_arg_result" + func_append linker_flags " $func_quote_arg_result" done - IFS="$save_ifs" + IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; @@ -5834,8 +7443,8 @@ # -msg_* for osf cc -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: @@ -5847,25 +7456,49 @@ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + # -specs=* GCC specs files + # -stdlib=* select c++ std lib with clang + # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ + -specs=*|-fsanitize=*) + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; + -Z*) + if test os2 = "`expr $host : '.*\(os2\)'`"; then + # OS/2 uses -Zxxx to specify OS/2-specific options + compiler_flags="$compiler_flags $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case $arg in + -Zlinker | -Zstack) + prev=xcompiler + ;; + esac + continue + else + # Otherwise treat like 'Some other compiler flag' below + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result + fi + ;; + # Some other compiler flag. -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; *.$objext) @@ -5886,21 +7519,21 @@ if test -z "$pic_object" || test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" + test none = "$pic_object" && + test none = "$non_pic_object"; then + func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result - if test "$pic_object" != none; then + test none = "$pic_object" || { # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" + pic_object=$xdir$pic_object - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + if test dlfiles = "$prev"; then + if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue @@ -5911,7 +7544,7 @@ fi # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then + if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= @@ -5919,23 +7552,23 @@ # A PIC object. func_append libobjs " $pic_object" - arg="$pic_object" - fi + arg=$pic_object + } # Non-PIC object. - if test "$non_pic_object" != none; then + if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" + non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" + if test -z "$pic_object" || test none = "$pic_object"; then + arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" + non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else @@ -5943,7 +7576,7 @@ if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" - xdir="$func_dirname_result" + xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result @@ -5951,7 +7584,7 @@ func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else - func_fatal_error "\`$arg' is not a valid libtool object" + func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; @@ -5967,11 +7600,11 @@ # A libtool-controlled library. func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then + if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= - elif test "$prev" = dlprefiles; then + elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= @@ -5985,8 +7618,8 @@ *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" + func_quote_arg pretty "$arg" + arg=$func_quote_arg_result ;; esac # arg @@ -5998,9 +7631,9 @@ done # argument parsing loop test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" + func_fatal_help "the '$prevarg' option requires an argument" - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6009,20 +7642,23 @@ oldlibs= # calculate the name of the file, without its directory func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" + outputname=$func_basename_result + libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + # Definition is injected by LT_CONFIG during libtool generation. + func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" + func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" + output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. @@ -6045,7 +7681,7 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6053,7 +7689,7 @@ func_append libs " $deplib" done - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps @@ -6085,7 +7721,7 @@ case $file in *.la) ;; *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done @@ -6093,7 +7729,7 @@ prog) compile_deplibs= finalize_deplibs= - alldeplibs=no + alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" @@ -6105,32 +7741,32 @@ for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then + if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs fi - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass"; then + libs=$deplibs deplibs= fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; + dlopen) libs=$dlfiles ;; + dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then + if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs @@ -6151,26 +7787,26 @@ esac done done - libs="$dlprefiles" + libs=$dlprefiles fi - if test "$pass" = dlopen; then + if test dlopen = "$pass"; then # Collect dlpreopened libraries - save_deplibs="$deplibs" + save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= - found=no + found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6180,13 +7816,13 @@ continue ;; -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" + if test lib != "$linkmode" && test prog != "$linkmode"; then + func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" @@ -6194,31 +7830,22 @@ for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" + lib=$searchdir/lib$name$search_ext if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes + if test .la = "$search_ext"; then + found=: else - found=no + found=false fi break 2 fi done done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library + if $found; then + # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then @@ -6226,19 +7853,19 @@ old_library= func_source "$lib" for l in $old_library $library_names; do - ll="$l" + ll=$l done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no + if test "X$ll" = "X$old_library"; then # only static version available + found=false func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi @@ -6247,15 +7874,25 @@ *) ;; esac fi + else + # deplib doesn't seem to be a libtool library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi ;; # -l *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then + if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; @@ -6268,18 +7905,18 @@ case $linkmode in lib) deplibs="$deplib $deplibs" - test "$pass" = conv && continue + test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi - if test "$pass" = scan; then + if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6290,13 +7927,13 @@ func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) - func_warning "\`-L' is ignored for archives/objects" + func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) - if test "$pass" = link; then + if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result @@ -6314,7 +7951,7 @@ lib=$func_resolve_sysroot_result ;; *.$libext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi @@ -6325,21 +7962,26 @@ case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test "$valid_a_lib" != yes; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -6347,18 +7989,13 @@ echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) - if test "$pass" != link; then + if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" @@ -6369,10 +8006,10 @@ esac # linkmode ;; # *.$libext *.lo | *.$objext) - if test "$pass" = conv; then + if test conv = "$pass"; then deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + elif test prog = "$linkmode"; then + if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" @@ -6385,22 +8022,20 @@ continue ;; %DEPLIBS%) - alldeplibs=yes + alldeplibs=: continue ;; esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi + $found || test -f "$lib" \ + || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" + || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." - ladir="$func_dirname_result" + ladir=$func_dirname_result dlname= dlopen= @@ -6430,19 +8065,19 @@ done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then + if test lib,link = "$linkmode,$pass" || + test prog,scan = "$linkmode,$pass" || + { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi - if test "$pass" = conv; then + if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" @@ -6450,15 +8085,15 @@ tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" + elif test prog != "$linkmode" && test lib != "$linkmode"; then + func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv @@ -6467,26 +8102,26 @@ # Get the name of the library we link against. linklib= if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then + { test yes = "$prefer_static_libs" || + test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do - linklib="$l" + linklib=$l done fi if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" + func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi + if test dlopen = "$pass"; then + test -z "$libdir" \ + && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then + test yes != "$dlopen_support" || + test no = "$build_libtool_libs" + then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -6500,40 +8135,40 @@ # We need an absolute path. case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" + abs_ladir=$ladir fi ;; esac func_basename "$lib" - laname="$func_basename_result" + laname=$func_basename_result # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then + if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" + func_warning "library '$lib' was moved." + dir=$ladir + absdir=$abs_ladir + libdir=$abs_ladir else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" + dir=$lt_sysroot$libdir + absdir=$lt_sysroot$libdir fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" + dir=$ladir + absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" + dir=$ladir/$objdir + absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi @@ -6542,11 +8177,11 @@ name=$func_stripname_result # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + if test dlpreopen = "$pass"; then + if test -z "$libdir" && test prog = "$linkmode"; then + func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi - case "$host" in + case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both @@ -6590,9 +8225,9 @@ if test -z "$libdir"; then # Link the convenience library - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then + elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else @@ -6602,14 +8237,14 @@ fi - if test "$linkmode" = prog && test "$pass" != link; then + if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes + linkalldeplibs=false + if test no != "$link_all_deplibs" || test -z "$library_names" || + test no = "$build_libtool_libs"; then + linkalldeplibs=: fi tmp_libs= @@ -6621,14 +8256,14 @@ ;; esac # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then + if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac @@ -6638,15 +8273,15 @@ continue fi # $linkmode = prog... - if test "$linkmode,$pass" = "prog,link"; then + if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || + { { test no = "$prefer_static_libs" || + test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in + case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac @@ -6675,9 +8310,9 @@ esac fi # $linkmode,$pass = prog,link... - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && + if $alldeplibs && + { test pass_all = "$deplibs_check_method" || + { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue @@ -6686,19 +8321,19 @@ link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then + if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then + { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in - *cygwin* | *mingw* | *cegcc*) + *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) - if test "$installed" = no; then + if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi @@ -6708,24 +8343,24 @@ # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" + dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" + dlopenmodule=$dlpremoduletest break fi done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then + if test lib = "$linkmode" && + test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. @@ -6753,43 +8388,43 @@ # figure out the soname set dummy $library_names shift - realname="$1" + realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then - soname="$dlname" + soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in - *cygwin* | mingw* | *cegcc*) + *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; esac eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" + soroot=$soname func_basename "$soroot" - soname="$func_basename_result" + soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else - func_verbose "extracting exported symbol list from \`$soname'" + func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" + func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library @@ -6797,58 +8432,58 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$opt_mode" != relink; then + if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" + if test no = "$hardcode_direct"; then + add=$dir/$linklib case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; + *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; + *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not + # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then + $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then + if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else - add="$dir/$old_library" + add=$dir/$old_library fi elif test -n "$old_library"; then - add="$dir/$old_library" + add=$dir/$old_library fi fi esac - elif test "$hardcode_minus_L" = no; then + elif test no = "$hardcode_minus_L"; then case $host in - *-*-sunos*) add_shlibpath="$dir" ;; + *-*-sunos*) add_shlibpath=$dir ;; esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" + add_dir=-L$dir + add=-l$name + elif test no = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi ;; relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$absdir" + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$dir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6857,10 +8492,10 @@ ;; esac fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then + add_shlibpath=$dir + add=-l$name else lib_linked=no fi @@ -6868,7 +8503,7 @@ *) lib_linked=no ;; esac - if test "$lib_linked" != yes; then + if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi @@ -6878,15 +8513,15 @@ *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then + if test yes != "$hardcode_direct" && + test yes != "$hardcode_minus_L" && + test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; @@ -6895,33 +8530,33 @@ fi fi - if test "$linkmode" = prog || test "$opt_mode" = relink; then + if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then + if test yes = "$hardcode_direct" && + test no = "$hardcode_direct_absolute"; then + add=$libdir/$linklib + elif test yes = "$hardcode_minus_L"; then + add_dir=-L$libdir + add=-l$name + elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then + add=-l$name + elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" + test -f "$inst_prefix_dir$libdir/$linklib"; then + add=$inst_prefix_dir$libdir/$linklib else - add="$libdir/$linklib" + add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -6930,10 +8565,10 @@ ;; esac fi - add="-l$name" + add=-l$name fi - if test "$linkmode" = prog; then + if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else @@ -6941,43 +8576,43 @@ test -n "$add" && deplibs="$add $deplibs" fi fi - elif test "$linkmode" = prog; then + elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" + if test unsupported != "$hardcode_direct"; then + test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi - elif test "$build_libtool_libs" = yes; then + elif test yes = "$build_libtool_libs"; then # Not a shared library - if test "$deplibs_check_method" != pass_all; then + if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." + $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then + if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then + if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else @@ -6990,11 +8625,11 @@ fi fi # link shared/static library? - if test "$linkmode" = lib; then + if test lib = "$linkmode"; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then + { test yes != "$hardcode_into_libs" || + test yes = "$build_old_libs" || + test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do @@ -7008,12 +8643,12 @@ *) func_append temp_deplibs " $libdir";; esac done - dependency_libs="$temp_deplibs" + dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do @@ -7023,7 +8658,7 @@ func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac - if $opt_preserve_dup_deps ; then + if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; @@ -7032,12 +8667,12 @@ func_append tmp_libs " $func_resolve_sysroot_result" done - if test "$link_all_deplibs" != no; then + if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in - -L*) path="$deplib" ;; + -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result @@ -7045,12 +8680,12 @@ dir=$func_dirname_result # We need an absolute path. case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" + func_warning "cannot determine absolute directory name of '$dir'" + absdir=$dir fi ;; esac @@ -7058,35 +8693,35 @@ case $host in *-*-darwin*) depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do + eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names"; then + for tmp in $deplibrary_names; do depdepl=$tmp done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -f "$absdir/$objdir/$depdepl"; then + depdepl=$absdir/$objdir/$depdepl + darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" + func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) - path="-L$absdir/$objdir" + path=-L$absdir/$objdir ;; esac else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" + func_warning "'$deplib' seems to be moved" - path="-L$absdir" + path=-L$absdir fi ;; esac @@ -7098,23 +8733,23 @@ fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then + if test link = "$pass"; then + if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then + dependency_libs=$newdependency_libs + if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then + if test dlopen != "$pass"; then + test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do @@ -7124,12 +8759,12 @@ esac done newlib_search_path= - fi + } - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else + if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" + else + vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order @@ -7187,62 +8822,93 @@ eval $var=\"$tmp_libs\" done # for var fi + + # Add Sun CC postdeps if required: + test CXX = "$tagname" && { + case $host_os in + linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) # Sun C++ 5.9 + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + + solaris*) + func_cc_basename "$CC" + case $func_cc_basename_result in + CC* | sunCC*) + func_suncc_cstd_abi + + if test no != "$suncc_use_cstd_abi"; then + func_append postdeps ' -library=Cstd -library=Crun' + fi + ;; + esac + ;; + esac + } + # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= - for i in $dependency_libs ; do + for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) - i="" + i= ;; esac - if test -n "$i" ; then + if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" + if test prog = "$linkmode"; then + dlfiles=$newdlfiles fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" + if test prog = "$linkmode" || test lib = "$linkmode"; then + dlprefiles=$newdlprefiles fi case $linkmode in oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; + func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" + func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" + func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" + func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ - func_warning "\`-release' is ignored for archives" + func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" + func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no - oldlibs="$output" + oldlibs=$output func_append objs "$old_deplibs" ;; lib) - # Make sure we only generate libraries of the form `libNAME.la'. + # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" @@ -7251,10 +8917,10 @@ eval libname=\"$libname_spec\" ;; *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" + test no = "$module" \ + && func_fatal_help "libtool library '$output' must begin with 'lib'" - if test "$need_lib_prefix" != no; then + if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result @@ -7268,8 +8934,8 @@ esac if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + if test pass_all != "$deplibs_check_method"; then + func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" @@ -7278,21 +8944,21 @@ fi fi - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" + test no = "$dlself" \ + || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" + test 1 -lt "$#" \ + && func_warning "ignoring multiple '-rpath's for a libtool library" - install_libdir="$1" + install_libdir=$1 oldlibs= if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so + # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" @@ -7301,20 +8967,20 @@ fi test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" + func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. - save_ifs="$IFS"; IFS=':' + save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift - IFS="$save_ifs" + IFS=$save_ifs test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" + func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts @@ -7322,45 +8988,45 @@ case $vinfo_number in yes) - number_major="$1" - number_minor="$2" - number_revision="$3" + number_major=$1 + number_minor=$2 + number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix - # which has an extra 1 added just for fun + # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|linux|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_revision" + age=$number_minor + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" + freebsd-aout|qnx|sunos) + current=$number_major + revision=$number_minor + age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result - age="$number_minor" - revision="$number_minor" + age=$number_minor + revision=$number_minor lt_irix_increment=no ;; *) - func_fatal_configuration "$modename: unknown library version type \`$version_type'" + func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) - current="$1" - revision="$2" - age="$3" + current=$1 + revision=$2 + age=$3 ;; esac @@ -7368,30 +9034,30 @@ case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "CURRENT '$current' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "REVISION '$revision' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' must be a nonnegative integer" + func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" + func_error "AGE '$age' is greater than the current interface number '$current'" + func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. @@ -7406,26 +9072,36 @@ # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + # On Darwin other compilers + case $CC in + nagfor*) + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + ;; + *) + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + esac ;; freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; + major=.$current + versuffix=.$current.$revision ;; freebsd-elf) - major=".$current" - versuffix=".$current" + func_arith $current - $age + major=.$func_arith_result + versuffix=$major.$age.$revision ;; irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then + if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 @@ -7436,69 +9112,74 @@ nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac - verstring="$verstring_prefix$major.$revision" + verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" + verstring=$verstring_prefix$major.$iface:$verstring done - # Before this point, $major must not contain `.'. + # Before this point, $major must not contain '.'. major=.$major - versuffix="$major.$revision" + versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result - versuffix="$major.$age.$revision" + versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" + versuffix=.$current.$age.$revision + verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age - while test "$loop" -ne 0; do + while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result - verstring="$verstring:${iface}.0" + verstring=$verstring:$iface.0 done # Make executables depend on our current version. - func_append verstring ":${current}.0" + func_append verstring ":$current.0" ;; qnx) - major=".$current" - versuffix=".$current" + major=.$current + versuffix=.$current + ;; + + sco) + major=.$current + versuffix=.$current ;; sunos) - major=".$current" - versuffix=".$current.$revision" + major=.$current + versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. + # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result - versuffix="-$major" + versuffix=-$major ;; *) - func_fatal_configuration "unknown library version type \`$version_type'" + func_fatal_configuration "unknown library version type '$version_type'" ;; esac @@ -7512,42 +9193,45 @@ verstring= ;; *) - verstring="0.0" + verstring=0.0 ;; esac - if test "$need_version" = no; then + if test no = "$need_version"; then versuffix= else - versuffix=".0.0" + versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then + if test yes,no = "$avoid_version,$need_version"; then major= versuffix= - verstring="" + verstring= fi # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes + if test yes = "$allow_undefined"; then + if test unsupported = "$allow_undefined_flag"; then + if test yes = "$build_old_libs"; then + func_warning "undefined symbols not allowed in $host shared libraries; building static only" + build_libtool_libs=no + else + func_fatal_error "can't build $host shared library unless -no-undefined is specified" + fi fi else # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" + allow_undefined_flag=$no_undefined_flag fi fi - func_generate_dlsyms "$libname" "$libname" "yes" + func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= + test " " = "$libobjs" && libobjs= - if test "$opt_mode" != relink; then + if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -7556,8 +9240,8 @@ case $p in *.$objext | *.gcno) ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) + if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue @@ -7573,11 +9257,11 @@ fi # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. @@ -7598,13 +9282,13 @@ *) func_append finalize_rpath " $libdir" ;; esac done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" + old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in @@ -7614,7 +9298,7 @@ done # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" + old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in @@ -7623,7 +9307,7 @@ esac done - if test "$build_libtool_libs" = yes; then + if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) @@ -7647,7 +9331,7 @@ ;; *) # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then + if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; @@ -7663,9 +9347,9 @@ # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? - release="" - versuffix="" - major="" + release= + versuffix= + major= newdeplibs= droppeddeps=no case $deplibs_check_method in @@ -7694,20 +9378,20 @@ -l*) func_stripname -l '' "$i" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7737,20 +9421,20 @@ $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" - i="" + i= ;; esac fi - if test -n "$i" ; then + if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 - if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then + if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes @@ -7787,24 +9471,24 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi - test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` + test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - if test "$want_nocaseglob" = yes; then + if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob @@ -7822,25 +9506,25 @@ # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? - potlib="$potent_lib" + potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; + *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7848,7 +9532,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7871,30 +9555,30 @@ -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= ;; esac fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test + potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" - a_deplib="" + a_deplib= break 2 fi done done fi - if test -n "$a_deplib" ; then + if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." @@ -7902,7 +9586,7 @@ echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then + if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" @@ -7918,18 +9602,18 @@ done # Gone through all deplibs. ;; none | unknown | *) - newdeplibs="" + newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do + if test yes = "$allow_libtool_libs_with_static_runtimes"; then + for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo - if test "X$deplibs_check_method" = "Xnone"; then + if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." @@ -7953,8 +9637,8 @@ ;; esac - if test "$droppeddeps" = yes; then - if test "$module" = yes; then + if test yes = "$droppeddeps"; then + if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" @@ -7963,12 +9647,12 @@ if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." + echo "*** 'nm' from GNU binutils and a full rebuild may help." fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -7979,14 +9663,14 @@ echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." - if test "$allow_undefined" = no; then + if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" + if test no = "$build_old_libs"; then + oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else @@ -8032,7 +9716,7 @@ *) func_append new_libs " $deplib" ;; esac done - deplibs="$new_libs" + deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= @@ -8040,25 +9724,25 @@ dlname= # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - # Remove ${wl} instances when linking with ld. + if test yes = "$build_libtool_libs"; then + # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac - if test "$hardcode_into_libs" = yes; then + if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + rpath=$finalize_rpath + test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8083,7 +9767,7 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then @@ -8097,8 +9781,8 @@ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + shlibpath=$finalize_shlibpath + test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -8108,19 +9792,19 @@ eval library_names=\"$library_names_spec\" set dummy $library_names shift - realname="$1" + realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else - soname="$realname" + soname=$realname fi if test -z "$dlname"; then dlname=$soname fi - lib="$output_objdir/$realname" + lib=$output_objdir/$realname linknames= for link do @@ -8134,7 +9818,7 @@ delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" + export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi @@ -8143,31 +9827,31 @@ cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. - orig_export_symbols="$export_symbols" + orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes - fi + } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do - IFS="$save_ifs" + IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in @@ -8181,7 +9865,7 @@ try_normal_branch=no ;; esac - if test "$try_normal_branch" = yes \ + if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then @@ -8192,7 +9876,7 @@ output_la=$func_basename_result save_libobjs=$libobjs save_output=$output - output=${output_objdir}/${output_la}.nm + output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" @@ -8215,8 +9899,8 @@ break fi done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + IFS=$save_ifs + if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi @@ -8224,16 +9908,16 @@ fi if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8252,11 +9936,11 @@ ;; esac done - deplibs="$tmp_deplibs" + deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && + test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. @@ -8267,7 +9951,7 @@ eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8276,18 +9960,18 @@ fi fi - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds @@ -8305,7 +9989,7 @@ fi fi - if test "X$skipped_export" != "X:" && + if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then @@ -8338,8 +10022,8 @@ last_robj= k=1 - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript + if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then + output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs @@ -8351,14 +10035,14 @@ func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk + elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then + output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= - if test "$compiler_needs_object" = yes; then + if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi @@ -8373,7 +10057,7 @@ else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result @@ -8385,13 +10069,13 @@ func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result - if test "X$objlist" = X || + if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. - if test "$k" -eq 1 ; then + if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" @@ -8401,10 +10085,10 @@ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi - last_robj=$output_objdir/$output_la-${k}.$objext + last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext + output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result @@ -8416,9 +10100,9 @@ # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" @@ -8426,9 +10110,9 @@ output= fi - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" + ${skipped_export-false} && { + func_verbose "generating symbol list for '$libname.la'" + export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. @@ -8437,24 +10121,24 @@ if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi - fi + } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + IFS=$save_ifs + $opt_quiet || { + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8463,7 +10147,7 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' @@ -8471,18 +10155,18 @@ fi fi - if ${skipped_export-false}; then + ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + tmp_export_symbols=$export_symbols + test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine + # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. @@ -8491,7 +10175,7 @@ export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi - fi + } libobjs=$output # Restore the value of output. @@ -8505,7 +10189,7 @@ # value of $libobjs for piecewise linking. # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then + if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else @@ -8527,7 +10211,7 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -8535,19 +10219,20 @@ test "X$libobjs" = "X " && libobjs= fi - save_ifs="$IFS"; IFS='~' + save_ifs=$IFS; IFS='~' for cmd in $cmds; do - IFS="$save_ifs" + IFS=$sp$nl eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" + IFS=$save_ifs + $opt_quiet || { + func_quote_arg expand,pretty "$cmd" + eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -8556,10 +10241,10 @@ exit $lt_exit } done - IFS="$save_ifs" + IFS=$save_ifs # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then + if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -8579,39 +10264,39 @@ done # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then + if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. - dlname="$soname" + dlname=$soname fi fi ;; obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" + if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then + func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; + func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" + func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" + func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" + func_warning "'-version-info' is ignored for objects" test -n "$release" && \ - func_warning "\`-release' is ignored for objects" + func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" + func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" @@ -8619,7 +10304,7 @@ ;; *) libobj= - obj="$output" + obj=$output ;; esac @@ -8632,17 +10317,19 @@ # the extraction. reload_conv_objs= gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - + # if reload_cmds runs $LD directly, get rid of -Wl from + # whole_archive_flag_spec and hope we can get by with turning comma + # into space. + case $reload_cmds in + *\$LD[\ \$]*) wl= ;; + esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else - gentop="$output_objdir/${obj}x" + gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience @@ -8651,12 +10338,12 @@ fi # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs - output="$obj" + output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. @@ -8668,7 +10355,7 @@ exit $EXIT_SUCCESS fi - if test "$build_libtool_libs" != yes; then + test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi @@ -8678,12 +10365,12 @@ # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS - fi + } - if test -n "$pic_flag" || test "$pic_mode" != default; then + if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" - output="$libobj" + output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi @@ -8700,16 +10387,14 @@ output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" + func_warning "'-version-info' is ignored for programs" test -n "$release" && \ - func_warning "\`-release' is ignored for programs" + func_warning "'-release' is ignored for programs" - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + $preload \ + && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ + && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) @@ -8723,11 +10408,11 @@ *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then + if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" + func_append compile_command " $wl-bind_at_load" + func_append finalize_command " $wl-bind_at_load" ;; esac fi @@ -8763,7 +10448,7 @@ *) func_append new_libs " $deplib" ;; esac done - compile_deplibs="$new_libs" + compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" @@ -8787,7 +10472,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8810,7 +10495,7 @@ fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; @@ -8827,10 +10512,10 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - compile_rpath="$rpath" + compile_rpath=$rpath rpath= hardcode_libdirs= @@ -8838,7 +10523,7 @@ if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" + hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in @@ -8863,45 +10548,43 @@ # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" + libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi - finalize_rpath="$rpath" + finalize_rpath=$rpath - if test -n "$libobjs" && test "$build_old_libs" = yes; then + if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi - wrappers_required=yes + wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no + wrappers_required=false ;; *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi + test yes = "$build_libtool_libs" || wrappers_required=false ;; *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no + if test no = "$need_relink" || test yes != "$build_libtool_libs"; then + wrappers_required=false fi ;; esac - if test "$wrappers_required" = no; then + $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" + link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 @@ -8914,12 +10597,12 @@ fi # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + if test -f "$output_objdir/${outputname}S.$objext"; then + func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status - fi + } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" @@ -8949,9 +10632,9 @@ fi fi - if test "$no_install" = yes; then + if test yes = "$no_install"; then # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" + link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. @@ -8968,27 +10651,28 @@ exit $EXIT_SUCCESS fi - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi + case $hardcode_action,$fast_install in + relink,*) + # Fast installation is not supported + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "'$output' will be relinked during installation" + ;; + *,yes) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + ;; + *,no) + link_command=$compile_var$compile_command$compile_rpath + relink_command=$finalize_var$finalize_command$finalize_rpath + ;; + *,needless) + link_command=$finalize_var$compile_command$finalize_rpath + relink_command= + ;; + esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` @@ -9016,12 +10700,12 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty "$var_value" + relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + func_quote_arg pretty,unquoted "(cd `pwd`; $relink_command)" + relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. @@ -9045,8 +10729,8 @@ func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" + cwrappersource=$output_path/$objdir/lt-$output_name.c + cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 @@ -9067,7 +10751,7 @@ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then + if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result @@ -9090,25 +10774,27 @@ # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" + case $build_libtool_libs in + convenience) + oldobjs="$libobjs_save $symfileobj" + addlibs=$convenience build_libtool_libs=no - else + ;; + module) + oldobjs=$libobjs_save + addlibs=$old_convenience + build_libtool_libs=no + ;; + *) oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi + $preload && test -f "$symfileobj" \ + && func_append oldobjs " $symfileobj" + addlibs=$old_convenience + ;; + esac if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs @@ -9116,13 +10802,13 @@ fi # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles @@ -9143,7 +10829,7 @@ : else echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" + gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs @@ -9152,7 +10838,7 @@ for obj in $save_oldobjs do func_basename "$obj" - objbase="$func_basename_result" + objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) @@ -9221,18 +10907,18 @@ else # the above command should be used before it gets too long oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then + if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist - if test "X$oldobjs" = "X" ; then + if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" @@ -9249,7 +10935,7 @@ case $output in *.la) old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" + test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior @@ -9259,36 +10945,37 @@ elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + func_quote_arg pretty,unquoted "$var_value" + relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + func_quote_arg pretty,unquoted "$relink_command" + relink_command=$func_quote_arg_unquoted_result + if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do - if test "$installed" = yes; then + if test yes = "$installed"; then if test -z "$install_libdir"; then break fi - output="$output_objdir/$outputname"i + output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" - name="$func_basename_result" + name=$func_basename_result func_resolve_sysroot "$deplib" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" + func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) @@ -9304,23 +10991,23 @@ *) func_append newdependency_libs " $deplib" ;; esac done - dependency_libs="$newdependency_libs" + dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in @@ -9330,34 +11017,34 @@ # didn't already link the preopened objects directly into # the library: func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + name=$func_basename_result + eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" + func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done - dlfiles="$newdlfiles" + dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done - dlprefiles="$newdlprefiles" + dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin @@ -9373,10 +11060,9 @@ case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then + if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname + tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname @@ -9385,7 +11071,7 @@ esac $ECHO > $output "\ # $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. @@ -9399,7 +11085,7 @@ # The name of the static archive. old_library='$old_library' -# Linker flags that can not go in dependency_libs. +# Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. @@ -9425,7 +11111,7 @@ # Directory that this library needs to be installed in: libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then + if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi @@ -9440,27 +11126,29 @@ exit $EXIT_SUCCESS } -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} +if test link = "$opt_mode" || test relink = "$opt_mode"; then + func_mode_link ${1+"$@"} +fi # func_mode_uninstall arg... func_mode_uninstall () { - $opt_debug - RM="$nonopt" + $debug_cmd + + RM=$nonopt files= - rmforce= + rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. - libtool_install_magic="$magic" + libtool_install_magic=$magic for arg do case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; + -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac @@ -9473,18 +11161,18 @@ for file in $files; do func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" + dir=$func_dirname_result + if test . = "$dir"; then + odir=$objdir else - odir="$dir/$objdir" + odir=$dir/$objdir fi func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" + name=$func_basename_result + test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then + if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; @@ -9499,11 +11187,11 @@ elif test -d "$file"; then exit_status=1 continue - elif test "$rmforce" = yes; then + elif $rmforce; then continue fi - rmfiles="$file" + rmfiles=$file case $name in *.la) @@ -9517,7 +11205,7 @@ done test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$opt_mode" in + case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; @@ -9528,12 +11216,12 @@ uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; @@ -9549,21 +11237,19 @@ func_source $dir/$name # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then + if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then + if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$opt_mode" = clean ; then + if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) @@ -9590,12 +11276,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/$name $odir/${name}S.$objext" + if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" + if test "X$noexename" != "X$name"; then + func_append rmfiles " $odir/lt-$noexename.c" fi fi fi @@ -9604,7 +11290,7 @@ func_show_eval "$RM $rmfiles" 'exit_status=1' done - # Try to remove the ${objdir}s in the directories where we deleted files + # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" @@ -9614,16 +11300,17 @@ exit $exit_status } -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} +if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then + func_mode_uninstall ${1+"$@"} +fi test -z "$opt_mode" && { - help="$generic_help" + help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" + func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" @@ -9634,7 +11321,7 @@ # The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting +# where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support @@ -9657,5 +11344,3 @@ # mode:shell-script # sh-indentation:2 # End: -# vi:sw=2 - diff -Nru gnutls28-3.3.8/build-aux/mdate-sh gnutls28-3.3.30/build-aux/mdate-sh --- gnutls28-3.3.8/build-aux/mdate-sh 2014-03-06 12:33:51.000000000 -0500 +++ gnutls28-3.3.30/build-aux/mdate-sh 2018-07-16 01:38:45.000000000 -0400 @@ -1,9 +1,9 @@ #!/bin/sh # Get modification time of a file or directory and pretty-print it. -scriptversion=2010-08-21.06; # UTC +scriptversion=2015-04-09.19; # UTC -# Copyright (C) 1995-2013 Free Software Foundation, Inc. +# Copyright (C) 1995-2014 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify @@ -74,6 +74,10 @@ LC_TIME=C export LC_TIME +# Use UTC to get reproducible result +TZ=UTC +export TZ + # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. diff -Nru gnutls28-3.3.8/build-aux/missing gnutls28-3.3.30/build-aux/missing --- gnutls28-3.3.8/build-aux/missing 2014-03-06 12:33:50.000000000 -0500 +++ gnutls28-3.3.30/build-aux/missing 2018-07-16 01:38:45.000000000 -0400 @@ -3,7 +3,7 @@ scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru gnutls28-3.3.8/cfg.mk gnutls28-3.3.30/cfg.mk --- gnutls28-3.3.8/cfg.mk 2014-08-29 12:26:39.000000000 -0400 +++ gnutls28-3.3.30/cfg.mk 2017-09-08 15:20:31.000000000 -0400 @@ -159,6 +159,9 @@ sed 's/\@VERSION\@/$(VERSION)/g' -i $(htmldir)/manual/html_node/*.html $(htmldir)/manual/gnutls.html -cd doc && make gnutls.epub && cp gnutls.epub ../$(htmldir)/manual/ cd doc/latex && make gnutls.pdf && cp gnutls.pdf ../../$(htmldir)/manual/ + make -C doc gnutls-guile.html gnutls-guile.pdf + cd doc && makeinfo --html --split=node -o ../$(htmldir)/manual/gnutls-guile/ --css-include=./texinfo.css gnutls-guile.texi + cd doc && cp gnutls-guile.pdf gnutls-guile.html ../$(htmldir)/manual/ #cd doc/doxygen && doxygen && cd ../.. && cp -v doc/doxygen/html/* $(htmldir)/devel/doxygen/ && cd doc/doxygen/latex && make refman.pdf && cd ../../../ && cp doc/doxygen/latex/refman.pdf $(htmldir)/devel/doxygen/$(PACKAGE).pdf -cp -v doc/reference/html/*.html doc/reference/html/*.png doc/reference/html/*.devhelp doc/reference/html/*.css $(htmldir)/reference/ #cp -v doc/cyclo/cyclo-$(PACKAGE).html $(htmldir)/cyclo/ @@ -223,7 +226,7 @@ echo X86_64_FILES_ELF=$(X86_64_FILES_ELF) >> $@.tmp echo X86_64_FILES_COFF=$(X86_64_FILES_COFF) >> $@.tmp echo X86_64_FILES_MACOSX=$(X86_64_FILES_MACOSX) >> $@.tmp - echo X86_PADLOCK_FILES_ELF=$(X86_PADLOCK_FILES_ELF) > $@.tmp + echo X86_PADLOCK_FILES_ELF=$(X86_PADLOCK_FILES_ELF) >> $@.tmp echo X86_PADLOCK_FILES_COFF=$(X86_PADLOCK_FILES_COFF) >> $@.tmp echo X86_PADLOCK_FILES_MACOSX=$(X86_PADLOCK_FILES_MACOSX) >> $@.tmp echo X86_64_PADLOCK_FILES_ELF=$(X86_64_PADLOCK_FILES_ELF) >> $@.tmp diff -Nru gnutls28-3.3.8/ChangeLog gnutls28-3.3.30/ChangeLog --- gnutls28-3.3.8/ChangeLog 2014-09-18 07:52:55.000000000 -0400 +++ gnutls28-3.3.30/ChangeLog 2018-07-16 02:03:08.000000000 -0400 @@ -1,3 +1,4471 @@ +2018-07-16 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: testcompat: refuse run with openssl + 1.1.0 They are not compatible. Signed-off-by: Nikos Mavrogiannopoulos + +2017-09-27 Andreas Metzler + + * doc/reference/Makefile.am, gtk-doc.make, m4/gtk-doc.m4: Modernize + gtk-doc support Update gtk-doc.make, m4/gtk-doc.m4 and doc/reference/Makefile.am + from gtk-doc git head (that is 1.26 + + c08cc78562c59082fc83b55b58747177510b7a70). Disable gtkdoc-check. Signed-off-by: Andreas Metzler + +2018-07-16 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2018-07-16 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version Signed-off-by: Nikos Mavrogiannopoulos + +2018-07-13 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2018-07-07 Nikos Mavrogiannopoulos + + * NEWS: doc update: this version doesn't support EtM [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2018-07-07 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2018-06-22 Nikos Mavrogiannopoulos + + * : commit 29ffa2a1fa4cc396c5d1563a3e5cdca0174de28b Author: Anderson + Toshiyuki Sasaki Date: Wed Jun 20 13:00:00 + 2018 +0200 + +2018-06-20 Anderson Toshiyuki Sasaki + + * lib/gnutls_cipher.c: cbc_mac_verify: require minimum padding under + SSL3.0 + +2018-06-20 Anderson Toshiyuki Sasaki + + * lib/gnutls_cipher.c: dummy_wait: always hash the same amount of + blocks that would have been on minimum pad This improves protection against lucky13-type of attacks when + encrypt-then-mac is not in use. Resolves #456 + +2018-06-20 Anderson Toshiyuki Sasaki + + * lib/algorithms/mac.c, lib/gnutls_cipher.c: dummy_wait: correctly + account the length field in SHA384 HMAC The existing lucky13 attack count-measures did not work correctly + for SHA384 HMAC. The overall impact of that should not be significant as SHA384 is + prioritized lower than SHA256 or SHA1 and thus it is not typically + negotiated, unless a client prioritizes a SHA384 MAC, or a server + only supports SHA384, and in both cases the vulnerability is only + present if Encrypt-then-MAC (RFC7366) is unsupported by the peer. Relates #455 + +2018-04-25 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2018-04-24 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, tests/pkcs11/pkcs11-import-with-pin.c: retrieve_pin: + refuse to retrieve PIN from URI more than one time That is, prevent re-using a static PIN if it has already been known + to be wrong. Introduced tests of that behavior. Resolves #425 Signed-off-by: Nikos Mavrogiannopoulos + +2018-04-23 Nikos Mavrogiannopoulos + + * : commit 43a8dd12a842d3ee0ee6c13d346f128c77dad9e4 Author: Anderson + Toshiyuki Sasaki Date: Mon Apr 23 11:39:04 + 2018 +0200 + +2018-04-23 Anderson Toshiyuki Sasaki + + * src/cli-args.def, src/cli.c: gnutls-cli: backported --sni-hostname + option Backported --sni-hostname option to allow overriding the value set + on the TLS server name indication extension. Signed-off-by: Anderson Toshiyuki Sasaki + +2018-04-19 Anderson Toshiyuki Sasaki + + * src/serv.c: gnutls-serv: send alert for unrecognized name Backported fix to send alert for unrecognized name when an incorrect + SNI is received Signed-off-by: Anderson Toshiyuki Sasaki + +2018-04-19 Anderson Toshiyuki Sasaki + + * src/serv-args.def, src/serv.c: gnutls-serv: backported + sni-hostname options Backported --sni-hostname and --sni-hostname-fatal options from + master branch. Signed-off-by: Anderson Toshiyuki Sasaki + +2018-03-07 Nikos Mavrogiannopoulos + + * lib/accelerated/cryptodev.h: cryptodev: added missing macro [ci + skip] Signed-off-by: Nikos Mavrogiannopoulos + +2018-03-08 Nikos Mavrogiannopoulos + + * lib/accelerated/cryptodev.c: cryptodev: fix prototype of + cryptodev_mac_fast [ci skip] Resolves #406 Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-16 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version to 3.3.29 Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-12 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-09 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-07 Nikos Mavrogiannopoulos + + * lib/accelerated/cryptodev-gcm.c, lib/accelerated/cryptodev.c, + lib/accelerated/x86/aes-cbc-x86-aesni.c, + lib/accelerated/x86/aes-cbc-x86-ssse3.c, + lib/accelerated/x86/aes-gcm-padlock.c, + lib/accelerated/x86/aes-gcm-x86-aesni.c, + lib/accelerated/x86/aes-gcm-x86-pclmul.c, + lib/accelerated/x86/aes-gcm-x86-ssse3.c, + lib/accelerated/x86/aes-padlock.c, lib/accelerated/x86/aes-x86.h, + lib/accelerated/x86/x86-common.h: accelerated: make explicit key + size check to all accelerated ciphers That is, do not rely on checks done on asm level, as they vary and + may change over updates. Also handle consistently invalid key sizes + by returning an error, and eliminate calls to abort(). Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-06 Vitezslav Cizek + + * lib/accelerated/x86/aes-cbc-x86-ssse3.c: accelerated: check + keysize in SSSE3 cipher setkey aes_ssse3_cipher_setkey() accepted any key size, which could lead to + invalid memory access. Such as with the oss-fuzz corpora file + + fuzz/gnutls_pkcs8_key_parser_fuzzer.in/da59d34eacdf50a0019a457fb7c4916be48c99a5Signed-off-by: Vitezslav Cizek + +2018-02-07 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: nettle: use the nettle_get_secp API when + available Resolves #380 Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-06 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/aes-gcm-x86-ssse3.c: accelerated: fix use of + SSSE3 vpaes_encrypt Previously we assumed that the nettle GCM internal functions will + use the provided ECB function for single block encryption. Newer + versions no longer operate that way. Ensure that we are compatible + with them. Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-05 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2018-02-05 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/aes-gcm-x86-aesni.c: accelerated: fix use of + aesni_ecb_encrypt() Previously we assumed that the nettle GCM internal functions will + use the provided ECB function for single block encryption. Newer + versions no longer operate that way. Ensure that we are compatible + with them. Signed-off-by: Nikos Mavrogiannopoulos + +2017-07-01 Nikos Mavrogiannopoulos + + * lib/Makefile.am, lib/priority_options.gperf: + priority_options.gperf: modified for gperf 3.1 Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-17 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2015-03-09 Nikos Mavrogiannopoulos + + * tests/test-chains.h: tests: removed test with invalid DER encoding + in chainverify These certificates are now rejected earlier. Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-21 Nikos Mavrogiannopoulos + + * lib/x509/crl.c, lib/x509/crq.c, lib/x509/privkey.c: x509: use + libtasn1's strict DER decoding rules in privkey, certificate + requests and CRLs That is, to prevent bugs due to the complexity of the BER decoder. Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-16 Nikos Mavrogiannopoulos + + * lib/x509/common.c, lib/x509/common.h, lib/x509/dn.c, + lib/x509/extensions.c, lib/x509/mpi.c, lib/x509/ocsp.c, + lib/x509/x509.c, lib/x509/x509_ext.c, m4/hooks.m4: x509: use + libtasn1's strict DER decoding rules in certificates and OCSP That is, to prevent bugs due to the complexity of the BER decoder. Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-23 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-17 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: corrected issue preventing the deletion of + objects in batch mode Previously initialization of PIN callbacks would only happen during + listing of objects, which happened only in non-batch mode. Signed-off-by: Nikos Mavrogiannopoulos + +2018-01-09 Nikos Mavrogiannopoulos + + * lib/minitasn1/decoding.c, lib/minitasn1/element.c, + lib/minitasn1/errors.c, lib/minitasn1/libtasn1.h, + lib/minitasn1/parser_aux.c: libtasn1: updated to latest libtasn1 + master branch Signed-off-by: Nikos Mavrogiannopoulos + +2017-12-10 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2016-04-12 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: load_dir_certs: use readdir() in all + platforms According to glibc documentation readdir_r() is deprecated and the + use of readdir() is recommended. As such we switch to it on all + platforms. Signed-off-by: Nikos Mavrogiannopoulos + +2017-12-10 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: tests: added reproducer for safe + renegotiation failure with openssl Relates #259 Signed-off-by: Nikos Mavrogiannopoulos + +2017-12-10 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-12-10 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_handshake.h, + lib/gnutls_v2_compat.c: handshake: check SCSVs prior to resuming a + session This ensures that extensions which are also available as SCSVs are + parsed prior to resuming a session. This resolves an issue with + openssl sending SCSV instead of an extension for the safe + renegotiation. Resolves #259 Signed-off-by: Nikos Mavrogiannopoulos + +2017-11-16 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2017-09-20 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-09-15 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: parse_handshake_header: allow 1-byte sized + fragments Signed-off-by: Nikos Mavrogiannopoulos + +2017-08-25 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: explicitly mark generated keys as sensitive Signed-off-by: Nikos Mavrogiannopoulos + +2017-08-14 Nikos Mavrogiannopoulos + + * lib/ext/status_request.c: _gnutls_recv_server_certificate_status: + use the same type in subtracted values This ensures that there are no issues with subtracting those values. + Note that the second is read from an uint24_t and thus it is always + positive regardless its type. Relates #245 Signed-off-by: Nikos Mavrogiannopoulos + +2017-08-14 Nikos Mavrogiannopoulos + + * lib/auth/srp.c: _gnutls_proc_srp_client_kx: use same type in + subtracted values This ensures that there are no issues with subtracting those values. + Note that the second is read from an uint16_t and thus it is always + positive regardless its type. Relates #244 Signed-off-by: Nikos Mavrogiannopoulos + +2017-07-15 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: parse_pem_cert_mem: fixed issue resulting to + accessing past the input data Signed-off-by: Nikos Mavrogiannopoulos + +2017-07-04 Nikos Mavrogiannopoulos + + * NEWS: mention GNUTLS-SA-2017-4 [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2017-07-04 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: released 3.3.28 Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-23 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11: tests: added test for DSA private key + generation Signed-off-by: Nikos Mavrogiannopoulos + +2016-02-25 Jan Vcelak + + * lib/pkcs11_int.c, lib/pkcs11_int.h: pkcs11: add interface for + C_GenerateKey Signed-off-by: Jan Vcelak + +2016-02-25 Jan Vcelak + + * lib/pkcs11_privkey.c: pkcs11: implement correct DSA key pair + generating Signed-off-by: Jan Vcelak + +2017-06-19 Dan Nicholson + + * NEWS: doc update + +2016-07-15 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.c: urandom: use st_ino and st_rdev to + determine device uniqueness + +2017-06-19 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs11/pkcs11-mock-ext.h, + tests/pkcs11/pkcs11-mock.c, tests/pkcs11/pkcs11-mock.h, + tests/pkcs11/pkcs11-privkey-safenet-always-auth.c: tests: backported + the safenet always auth PKCS#11 test This adds a unit test for safenet protectserver HSM's PKCS#11 + support. That is, detect whether the absence of C_Login on a token, + will result to C_Sign or C_Decrypt to a login using CKU_USER. Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-17 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-17 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h, lib/pkcs11_privkey.c: pkcs11: + simplified pkcs11_login() By cleanups, as well as including the reauth flag in the flags + option. That ensures that the function is close to the 3.5.x branch + version. Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-29 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h, lib/pkcs11_privkey.c: pkcs11: the + GNUTLS_PKCS11_OBJ_FLAG_LOGIN will force a login That is, even in tokens which do not have a CKF_LOGIN_REQUIRED flag + a login will be forced. This allows operation on the safenet HSMs + which do not set that flag. Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-19 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: login prior to the operation not the + initialization That ensures that re-authentication is performed at the appropriate + stage of the operation. Brings the PKCS#11 support in par with the + 3.5.x branch. Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-27 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_privkey.c: Handle specially safenet HSMs + which request explicit authentication These HSMs return CKR_USER_NOT_LOGGED_IN on the first private key + operation, instead of using CKA_ALWAYS_AUTHENTICATE or similar. + Detect that state and retry login with CKU_USER. See discussion in https://github.com/OpenSC/libp11/issues/160 Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-15 Nikos Mavrogiannopoulos + + * lib/x509/ocsp.c: ocsp: added sanity check in returned length This addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1492 Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-09 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: pkcs11: do not set leading zeros when writing + integers Signed-off-by: Nikos Mavrogiannopoulos + +2017-06-08 Nikos Mavrogiannopoulos + + * src/certtool-common.c: certtool: improved error message when + public key cannot be figured [ci skip] Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-24 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-24 Nikos Mavrogiannopoulos + + * lib/ext/status_request.c: + gnutls_ocsp_status_request_enable_client: documented requirements + for parameters That is, the fact that extensions and responder_id parameters must + be allocated, and are assigned to the session. Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-24 Nikos Mavrogiannopoulos + + * lib/ext/status_request.c: ext/status_request: Removed the parsing + of responder IDs from client extension These values were never used by gnutls, nor were accessible to + applications, and as such there is not reason to parse them. Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-24 Nikos Mavrogiannopoulos + + * lib/ext/status_request.c: ext/status_request: ensure response IDs + are properly deinitialized That is, do not attempt to loop through the array if there is no + array allocated. Signed-off-by: Nikos Mavrogiannopoulos + +2017-05-14 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2017-04-28 Nicolas Dufresne + + * lib/auth/rsa_psk.c: rsa-psk: Use the correct username datum In rsa-psk we properly request username for the case the application + uses a callback, but later we use the username cached in the + credentials structure. This will lead to empty username issues. Signed-off-by: Nicolas Dufresne + +2017-04-24 Nikos Mavrogiannopoulos + + * lib/nettle/int/rsa-keygen-fips186.c: Added explicit check for the + bounds of the generated 'd'. This is according to FIPS186-4 sec. B.3.1. Signed-off-by: Nikos Mavrogiannopoulos + +2017-04-24 Nikos Mavrogiannopoulos + + * lib/nettle/int/rsa-keygen-fips186.c: fips140-2: enhanced check of + generated parameters That is, replaced all assert() calls with if statements to allow + gracefull fail. Signed-off-by: Nikos Mavrogiannopoulos + +2017-03-21 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-03-21 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/tls-rehandshake-cert-3.c, tests/utils.h: + tests: backported rehandshake tests Signed-off-by: Nikos Mavrogiannopoulos + +2017-03-21 Nikos Mavrogiannopoulos + + * lib/auth/cert.c, lib/gnutls_handshake.c, lib/gnutls_int.h, + lib/gnutls_kx.c, lib/gnutls_ui.c: handshake: reset cert request + state on handshake init That addresses a bug which on client side on case of an initial + handshake with a client certificate, we continue to send this + certificate even if on rehandshake we were not requested with on. Signed-off-by: Nikos Mavrogiannopoulos + +2017-03-06 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version + +2017-03-05 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-03-05 Alex Gaynor + + * lib/opencdk/read-packet.c: Enforce the max packet length for + OpenPGP subpackets as well This addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392 Signed-off-by: Alex Gaynor + +2017-03-01 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2017-03-01 Nikos Mavrogiannopoulos + + * lib/opencdk/kbnode.c, lib/opencdk/keydb.c, lib/opencdk/literal.c, + lib/opencdk/opencdk.h, lib/opencdk/read-packet.c, + lib/openpgp/gnutls_openpgp.c, lib/openpgp/pgp.c, + lib/openpgp/privkey.c: opencdk: do not parse any secret keys in + packet when reading a certificate This reduces the attack surface on the parsers, and prevents any + bugs in the secret key parser to be exploitable by inserting secret + key sub-packets into an openpgp certificate. This addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=354 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=360 Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-28 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/crt_apis.c: tests: backported crt_apis + from master branch In addition to other APIs, this explicitly tests + gnutls_x509_crt_set_subject_unique_id() and + gnutls_x509_crt_set_issuer_unique_id(). Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-28 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c: certtool: increased buffer for reading from + user This allows reading longer than 128-byte fields interactively. The + new limit is 512-bytes. Relates #179 Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs11/pkcs11-import-with-pin.c: tests: + added PKCS#11 test for pin input This introduces a test on PIN input to retrieve an object using + pin-value and pin-source (file). Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * tests/utils.c, tests/utils.h: tests: utils: added ability to use + tmpfiles Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs11/pkcs11-pubkey-import-rsa.c, + tests/pkcs11/pkcs11-pubkey-import.c: tests: backported PKCS#11 test In addition to public key import checks, this test ensures that the + pin-value attribute is functional. Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * NEWS: doc update Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * configure.ac, lib/pkcs11.c: Use p11_kit_uri_get_pin_value() if + available in p11-kit This allows parsing the pin-value attribute of the PKCS#11 URI. Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-22 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: nettle/pk: added error checking in + _rsa_params_to_pubkey Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-21 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: nettle/pk: corrected memcpy of Q in DSA params Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2017-02-20 Nikos Mavrogiannopoulos + + * lib/opencdk/read-packet.c: opencdk/read-packet.c: corrected typo + in type cast Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-20 Nikos Mavrogiannopoulos + + * lib/opencdk/read-packet.c: cdk_pkt_read: enforce packet limits That ensures that there are no overflows in the subsequent + calculations. Resolves the oss-fuzz found bug: + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=420 Relates: #159 Signed-off-by: Nikos Mavrogiannopoulos + +2017-02-03 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: gnutls_pkcs11_obj_list_import_url2: Always return an + initialized pointer When returning success, but no elements, + gnutls_pkcs11_obj_list_import_url4, could have returned zero number + of elements with a pointer that was uninitialized. Ensure that an + initialized (i.e., null in that case), pointer is always returned. + Reported by Jeremy Harris. Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-17 Nikos Mavrogiannopoulos + + * lib/opencdk/read-packet.c: opencdk: improved error code checking + in the stream reading functions This ammends 49be4f7b82eba2363bb8d4090950dad976a77a3a Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-09 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, tests/key-tests/Makefile.am: tests: + do not run key-tests and cert-tests under leak sanitizer The reason is that we cannot distinguish between a memory leak on + application failure (which is followed by exit- thus should be + ignored) and an address sanitizer issue (which should never be + ignored). As such we disable leak detection with asan and rely on + valgrind. Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-09 Nikos Mavrogiannopoulos + + * tests/key-tests/Makefile.am: tests: added missing file + +2017-01-09 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: Build and Check - separate build + dir (x86): force build in gitlab shared runners In the Centos7 based runners there is an issue running autogen. Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-09 Nikos Mavrogiannopoulos + + * .gitignore, src/Makefile.am: tools: use stamp files to allow + parallel build of autogen files Autogen seems to output on the creates files gradually, something + that makes 'make' believe that the command is complete prior to the + output file being fully populated. The current approach uses stamp + files to ensure that no incomplete files are used for compilation. + +2017-01-09 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2017-01-09 Nikos Mavrogiannopoulos + + * NEWS, doc/Makefile.am, doc/manpages/Makefile.am, symbols.last: + updated auto-generated files + +2017-01-09 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2017-01-09 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2017-01-04 Nikos Mavrogiannopoulos + + * lib/opencdk/read-packet.c: opencdk: added error checking in the + stream reading functions This addresses an out of memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=337 Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-04 Nikos Mavrogiannopoulos + + * lib/opencdk/pubkey.c: opencdk: cdk_pk_get_keyid: fix stack + overflow Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=340 Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-04 Nikos Mavrogiannopoulos + + * lib/opencdk/read-packet.c: opencdk: read_attribute: added more + precise checks when reading stream That addresses heap read overflows found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346 Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-01 Alex Gaynor + + * lib/opencdk/read-packet.c: Corrected a leak in OpenPGP sub-packet + parsing. Signed-off-by: Alex Gaynor + +2016-12-30 Alex Gaynor + + * lib/opencdk/read-packet.c: Attempt to fix a leak in OpenPGP cert + parsing. + +2016-12-26 Alex Gaynor + + * lib/opencdk/read-packet.c: Do not infinite loop if an EOF occurs + while skipping a PGP packet Signed-off-by: Alex Gaynor + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/opencdk/misc.c: opencdk: Fixes to prevent undefined behavior + (found with libubsan) + +2017-01-04 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2017-01-04 Nikos Mavrogiannopoulos + + * lib/auth/rsa.c: auth rsa: eliminated memory leak on pkcs-1 + formatting attack path Signed-off-by: Nikos Mavrogiannopoulos + +2017-01-02 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-12-09 Nikos Mavrogiannopoulos + + * lib/x509/verify.c: pkcs11 verification: ensure that an issuer we + retrieve is not blacklist It may happen in p11-kit trust module that a trusted certificate is + both in the trusted set, and the blacklisted set. To avoid accepting + a certificate when in both sets, we always check whether a trusted + issuer certificate is in the blacklisted set. + +2016-12-31 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: improved error reporting on file error + +2016-12-20 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-12-15 Nikos Mavrogiannopoulos + + * lib/x509/x509_ext.c: gnutls_x509_ext_import_proxy: fix issue + reading the policy language If the language was set but the policy wasn't, that could lead to a + double free, as the value returned to the user was freed. + +2016-12-16 Nikos Mavrogiannopoulos + + * : commit 5ca126e1a5daf071ce690f28823fa97de6a7ae68 Author: Nikos + Mavrogiannopoulos Date: Thu Dec 15 17:05:59 2016 + +0100 + +2016-12-14 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-12-13 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs8-key-decode-encrypted.c, + tests/pkcs8-key-decode.c: tests: added test for PKCS#8 encrypted key + decoding This also verifies that the return value when attempting to decrypt + without a password is GNUTLS_E_DECRYPTION_FAILED. + +2016-11-14 Nikos Mavrogiannopoulos + + * tests/key-tests/Makefile.am, tests/key-tests/pkcs8-invalid: tests: + added test suite with PKCS#8 files that have invalid encryption + +2016-12-14 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c: PKCS#7 decrypt_data: merge all errors + during decryption to GNUTLS_E_DECRYPTION_FAILED + +2016-12-13 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c: pkcs8: ensure that the correct error + code is returned on decryption failure + +2016-12-14 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c: PKCS#5,7 decryption: added sanity check + on padding size Relates #148 + +2016-12-14 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c: PKCS#5,7 decryption: fail without leak + on unknown MAC + +2016-12-14 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c: PKCS#5,7 decryption: fail early on + invalid block sizes + +2016-12-14 Nikos Mavrogiannopoulos + + * lib/x509/privkey_pkcs8.c, lib/x509/x509_int.h: PKCS#5,7 + decryption: enforce limits in the support parameter sizes This allows to detect invalid parameters early rather than later. + Relates #148 + +2016-12-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-07-14 Nikos Mavrogiannopoulos + + * src/tpmtool-args.def, src/tpmtool.c: tpmtool: Added --test-sign + parameter + +2016-12-09 Nikos Mavrogiannopoulos + + * src/tpmtool.c: compiler warnings elimination and other bug fixes + +2015-06-05 Nikos Mavrogiannopoulos + + * src/tpmtool.c: tpmtool: added newline in error messages + +2016-12-09 Nikos Mavrogiannopoulos + + * configure.ac, lib/Makefile.am, lib/abstract_int.h, + lib/gnutls_errors.c, lib/gnutls_global.c, lib/gnutls_global.h, + lib/gnutls_privkey.c, lib/includes/gnutls/gnutls.h.in, lib/tpm.c: + tpm: backported improvements from master branch * Load libtspi dynamically using dlopen - prevents direct linking + with openssl * Fix handling of keys requiring authorization * In import_tpm_key_cb() fix the wrong password loop + +2016-12-09 Nikos Mavrogiannopoulos + + * src/certtool-args.def: doc: updated to documentation of certtool + [ci skip] This corrects options which incorrectly mentioned they support URLs. + +2016-12-07 Nikos Mavrogiannopoulos + + * src/certtool.c: Don't trash DER CRQ output with text data Backported patch from master. + +2016-11-29 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-11-29 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11: tests: backported test suite for p11tool + --set-id and --set-label options + +2015-03-11 Nikos Mavrogiannopoulos + + * src/p11tool-args.def, src/p11tool.c, src/p11tool.h, src/pkcs11.c: + p11tool: added --set-id and --set-label options + +2015-03-11 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/pkcs11.h, lib/libgnutls.map, lib/pkcs11.c, + lib/pkcs11_int.c, lib/pkcs11_int.h: added + gnutls_pkcs11_obj_set_info() This function allows setting information such as the CKA_ID and the + CKA_LABEL of an object. + +2016-11-29 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11: tests: check whether PKCS #11 ID set on + copy/generation is correct + +2016-11-29 Nikos Mavrogiannopoulos + + * src/p11tool-args.def, src/p11tool.c, src/p11tool.h, src/pkcs11.c: + p11tool: allow setting the CKA_ID on object + initialization/generation + +2016-11-29 Nikos Mavrogiannopoulos + + * lib/libgnutls.map: exported new functions + +2015-03-31 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/pkcs11.h, lib/pkcs11_privkey.c: pkcs11: + enhanced key generation functions to allow specifying a CKA_ID + +2015-03-30 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/pkcs11.h, lib/pkcs11_write.c: enhanced copy + functions to allow specifying a CKA_ID + +2016-11-29 Nikos Mavrogiannopoulos + + * lib/x509/pkcs12_encr.c: pkcs12: fixed the calculation of p_size Include the trailing zero into the size calculation. + +2016-11-28 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-11-28 Nikos Mavrogiannopoulos + + * tests/pkcs12-decode/Makefile.am, tests/pkcs12-decode/pkcs12: + tests: added pkcs12 check with openssl generated structure and long + password + +2016-11-28 Nikos Mavrogiannopoulos + + * lib/x509/pkcs12_encr.c: pkcs12: fixed the calculation of p_size That affects passwords which exceed 32 characters. + +2016-11-07 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: _wrap_nettle_pk_verify: use FAIL_IF_LIB_ERROR + prior to returning success This will prevent verification to succeed if the system is in error + state. + +2016-11-02 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-10-21 Nikos Mavrogiannopoulos + + * lib/ext/signature.c, lib/gnutls_alert.c: Terminate handshake if + only unknown or disabled signatures are advertized by the peer That is, do not attempt to proceed assuming that the peer supports + SHA-1. + +2016-10-26 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-13 Nikos Mavrogiannopoulos + + * lib/ext/status_request.c: certificate status requestion response + is optional according to RFC6066 + +2016-10-18 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: allow setting key purposes for non-CA + certificates That is, allow setting code signing, or time stamping key purpose in + certificates that are not marked as CA. The previous restriction + served no purpose. + +2016-10-14 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/multi-alerts.c: tests: added check to + verify that the server will bail out after many alerts + +2016-10-14 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/naked-alerts.c: tests: added check to + verify that the server will bail out after receiving only alerts + +2016-10-14 Nikos Mavrogiannopoulos + + * tests/cert-common.h: tests: backported the common certs from + master + +2016-10-14 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_int.h, lib/gnutls_state.c: + handshake: set a maximum number of warning messages that can be + received per handshake That is to avoid DoS due to the assymetry of cost of sending an + alert vs the cost of processing. + +2016-10-14 Nikos Mavrogiannopoulos + + * lib/gnutls_record.c: record: disallow parsing of alert messages + prior to session start + +2016-10-14 Nikos Mavrogiannopoulos + + * src/certtool-common.c: certtool: improve text on missing options + for cert generation + +2016-10-13 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: avoid asking the security officer PIN twice + on initialization + +2016-10-13 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: improved messages on token initialization + +2016-10-13 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: corrected check of PIN existance in token + initialization + +2016-10-09 Nikos Mavrogiannopoulos + + * tests/Makefile.am: tests: link tests which utilize nettle with + nettle + +2016-10-09 Nikos Mavrogiannopoulos + + * doc/Makefile.am, doc/manpages/Makefile.am: updated auto-generated + files + +2016-10-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-10-09 Nikos Mavrogiannopoulos + + * lib/gnutls_extensions.c: TLS extensions: only cache the extension + IDs from exts that the server supports That avoids imposing any artificial limits on the number of + extensions that a server can handle. Resolves #136 + +2016-10-07 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: added safety net when generating a + certificate request That is, do not allow specifying --generate-request --load-pubkey + without specifying --load-privkey. Previously if --load-pubkey would + have been used, it would have been ignored, causing confusion to the + users. + +2016-09-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-09-16 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_int.h: Increased the maximum + size allowed for handshake messages to 128kb This would allow the library to cope with larger packets, as well as + TLS 1.3 hellos. Suggested by Hubert Kario. + +2016-09-12 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-09-12 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: gnutls_certificate_set_*key: ensure proper + cleanup on key mismatch failures That is, ensure that we keep no local references that are shared + with the caller, and that we properly free all initialized values. + +2016-09-07 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-09-07 Nikos Mavrogiannopoulos + + * lib/system.c: _gnutls_ucs2_to_utf8: fixed use of + WideCharToMultiByte in windows + +2016-09-06 Nikos Mavrogiannopoulos + + * src/ocsptool.c: ocsptool: do not enter a spurious newline to + responses. + +2015-11-12 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, tests/cert-tests/template-test, + tests/cert-tests/template-unique.pem, + tests/cert-tests/template-unique.tmpl: tests: verify that unique IDs + are generated as expected + +2015-11-12 Nikos Mavrogiannopoulos + + * src/certtool-args.def, src/certtool-cfg.c, src/certtool-cfg.h, + src/certtool.c: certtool: Allow writing unique IDs in generated + certificates + +2016-09-05 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-09-05 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2015-11-12 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/x509.h, lib/libgnutls.map, + lib/x509/x509_write.c: Added gnutls_x509_crt_set_issuer_unique_id() + and gnutls_x509_crt_set_subject_unique_id() + +2016-09-05 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-09-03 Nikos Mavrogiannopoulos + + * lib/gnutls_pk.c: _gnutls_encode_ber_rs_raw: zero-pad values when + necessary This addresses issue when encoding values obtained via PKCS#11 which + may not be necessarily padded. Resolves #122 + +2016-09-03 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-test: tests: don't run overflow tests on + archs which fail This addresses a CI failure on x86. + +2016-09-03 Nikos Mavrogiannopoulos + + * tests/slow/hash-large.c: tests: backported hash-large from master + +2016-09-03 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: use the gitlab.com shared runners Backported from master branch + +2016-08-28 David Woodhouse + + * lib/x509/pkcs12.c: gnutls_pkcs12_simple_parse: set the key value + to null on failure + +2016-08-27 Nikos Mavrogiannopoulos + + * lib/x509/ocsp.c: ocsp: corrected the comparison of the serial size + in OCSP response Previously the OCSP certificate check wouldn't verify the serial + length and could succeed in cases it shouldn't. Reported by Stefan Buehler. + +2016-08-24 Nikos Mavrogiannopoulos + + * tests/pkcs8-decode/Makefile.am, tests/pkcs8-decode/pkcs8, + tests/pkcs8-decode/pkcs8-pbes2-sha256.pem: tests: added decoding of + key with pbes2 and SHA256 PRF + +2016-08-24 Nikos Mavrogiannopoulos + + * NEWS, lib/algorithms.h, lib/algorithms/mac.c, lib/gnutls_int.h, + lib/includes/gnutls/x509.h, lib/pkix.asn, lib/pkix_asn1_tab.c, + lib/x509/Makefile.am, lib/x509/pbkdf2-sha1.c, + lib/x509/pbkdf2-sha1.h, lib/x509/pkcs12.c, + lib/x509/privkey_openssl.c, lib/x509/privkey_pkcs8.c, + lib/x509/x509_int.h, tests/gc.c: Added support for decrypting PKCS#8 + files which use HMAC-SHA256 as PRF This backports nettle pbkdf2 support, and improves compatibility + with new openssl versions. + +2014-08-04 Nikos Mavrogiannopoulos + + * lib/x509/pkcs12.c: pkcs12: increased the number of iterations for + MAC + +2016-08-10 Nikos Mavrogiannopoulos + + * lib/crypto-api.c: gnutls_key_generate: fail if the state of the + library is invalid Suggested by Stephan Mueller. + +2016-08-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-08-08 Stefan Sørensen + + * lib/x509/pkcs12.c: Fix gnutls_pkcs12_simple_parse to always + extract the complete chain gnutls_pkcs12_simple_parse was only collecting extra certificates + that was possible elements of the certificate chain when the + extra_certs argument was not NULL. Fix by allways collecting all the + certificates, any unneeded certificates are released before + returning if extra_certs is NULL anyway. Signed-off-by: Stefan Sørensen + +2016-08-07 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: nettle: use rsa_*_key_prepare on key import Previously we calculated the size of the key directly, but by using + the rsa_*_key_prepare we benefit from any checks that may be + introduced in the future. Specifically any checks for invalid public + keys (e.g., keys that may crash the underlying gmp functions). This patch avoids calling rsa_private_key_prepare every time we + construct a nettle private key struct, because this function + requires a bigint multiplication. We call that function once on + private key import. + +2016-08-08 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: Revert "nettle: use rsa_*_key_prepare" This reverts commit a2c3ee54ea8080eeb59fcfeec88a842324982c90. + +2016-08-01 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: nettle: use rsa_*_key_prepare Previously we calculated the size of the key directly, but by using + the rsa_*_key_prepare we benefit from any checks that may be + introduced in the future. Specifically any checks for invalid public + keys (e.g., keys that may crash the underlying gmp functions). + +2016-07-28 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-07-09 Tim Kosse + + * lib/x509/x509.c: gnutls_x509_crt_list_import2 was ignoring the + passed flags if all certificates in the list fit within the + initially allocated memory. + +2016-07-09 Tim Kosse + + * lib/x509/crl.c: gnutls_x509_crl_list_import2 was ignoring the + passed flags if all CTLs in the list fit within the initially + allocated memory. + +2016-07-25 Nikos Mavrogiannopoulos + + * lib/minitasn1/coding.c, lib/minitasn1/decoding.c, + lib/minitasn1/element.c, lib/minitasn1/element.h, + lib/minitasn1/int.h, lib/minitasn1/libtasn1.h, + lib/minitasn1/parser_aux.c, lib/minitasn1/parser_aux.h, + lib/minitasn1/structure.c: minitasn1: updated to libtasn1 4.9 + +2016-07-08 Nikos Mavrogiannopoulos + + * NEWS: NEWS: corrected release date [ci skip] + +2016-07-06 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.24 + +2016-06-30 Nikos Mavrogiannopoulos + + * configure.ac: configure: check for libdl irrespective of FIPS140 + configuration This allows to link to libdl for the tests that require it. + +2016-07-05 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2016-07-05 Nikos Mavrogiannopoulos + + * libdane/errors.c, libdane/includes/gnutls/dane.h: dane: corrected + the license of libdane files The license was always LGPL version 2.1, and these files mentioned + LGPL version 3. Reported by Thomas Petazzoni. + +2016-06-30 Nikos Mavrogiannopoulos + + * tests/Makefile.am: tests: account pkcs11/pkcs11-mock-ext.h in + Makefile + +2016-06-30 Nikos Mavrogiannopoulos + + * tests/Makefile.am: tests: link pkcs11-import-url-privkey with + libdl That is because it uses dlopen(). + +2016-06-30 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-06-30 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs11/pkcs11-import-url-privkey.c, + tests/pkcs11/pkcs11-mock-ext.h, tests/pkcs11/pkcs11-mock.c: tests: + added check to verify the tolerance of broken C_GetAttributes That is, test gnutls_pkcs11_obj_list_import_url4() when importing + private keys from tokens that return CKR_OK on sensitive objects, + and tokens that return CKR_ATTRIBUTE_SENSTIVE. Relates #108 + +2016-06-30 Nikos Mavrogiannopoulos + + * lib/pkcs11_int.c: pkcs11_get_attribute_avalue: correctly handle a + -1 value length from C_GetAttributeValue That is, work-around modules which do not return an error on + sensitive objects. Relates #108 + +2016-06-29 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-06-29 Nikos Mavrogiannopoulos + + * lib/pkcs11_int.c: pkcs11_get_attribute_avalue: do not assign + values on failure When C_GetAttributeValue() returns size but does not return data + then pkcs11_get_attribute_avalue() would set the return data pointer + to a free'd value. This is against the convention expected by + callers, i.e, set data to NULL. Reported by Anthony Alba in #108. + +2016-06-29 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11, tests/suite/testpkcs11.softhsm: tests: + updated testpkcs11 to support softhsmv2 + +2016-06-29 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/{suite => pkcs11}/pkcs11-chainverify.c, + tests/{suite => pkcs11}/pkcs11-combo.c, tests/{suite => + pkcs11}/pkcs11-get-issuer.c, tests/{suite => + pkcs11}/pkcs11-is-known.c, tests/{suite => pkcs11}/softhsm.h, + tests/suite/Makefile.am: tests: moved pkcs11 tests to main test + suite + +2016-06-28 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-is-known.c: tests: backported pkcs11-is-known + from master + +2016-06-23 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: gnutls_pkcs11_crt_is_known: always assume + GNUTLS_PKCS11_OBJ_FLAG_COMPARE unless + GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED is given + +2016-06-28 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: find_cert_cb: minor cleanups in find_cert_cb + +2016-06-22 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-06-22 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-chainverify.c, tests/suite/pkcs11-combo.c, + tests/suite/pkcs11-get-issuer.c, tests/suite/pkcs11-is-known.c, + tests/suite/softhsm.h: tests: backported the softhsmv2 pkcs11 checks + from 3.4.0 + +2016-06-22 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: correctly encode the serial number when + searching for certificate In gnutls_pkcs11_crt_is_known() corrected the encoding of the serial + number to TLV DER from LV DER. This is the encoding we use when + storing that number. + +2016-06-22 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: correctly account check_found_cert() + +2016-06-22 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: Amended "Corrected the writing of serial + number in PKCS#11 modules" This corrects the writing of the serial number. + +2016-06-16 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-06-16 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: dtls: corrected reconstruction of handshake + packets received out of order That is, when the handshake packet is split into multiple different + chunks and received out of order, make sure that reconstruction + occurs properly. Reported by Guillaume Roguez. + +2016-06-16 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: Corrected the writing of serial number in + PKCS#11 modules That is previously the serial number was written in raw format, but + in PKCS#11 the serial number must be set encoded as integer. Report + and fix by Stanislav Zidek. + +2016-05-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-05-31 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: when generating a private key ensure + the public key is not private This is a backport from the 3.4.x branch. + +2016-05-28 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/x86-common.c: x86-common: use secure_getenv() + +2016-05-27 Nikos Mavrogiannopoulos + + * configure.ac: configure.ac: check for secure_getenv where + available and always enable system extensions + +2016-05-27 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-05-27 Nikos Mavrogiannopoulos + + * lib/fips.c, lib/gnutls_global.c, lib/gnutls_mem.h, lib/system.c: + env: use secure_getenv when reading environment variables + +2016-05-23 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: added sanity check to find_obj_url_cb() for + object validity Also avoid unnecessary recursion. + +2016-05-20 Nikos Mavrogiannopoulos + + * tests/suite/eagain, tests/suite/testsrn: tests: use /bin/bash in + tests which require common.sh + +2016-05-21 Nikos Mavrogiannopoulos + + * tests/suite/Makefile.am, tests/suite/testcompat, + tests/suite/testcompat-common, tests/suite/testcompat-main: tests: + backported full openssl suite from master Removed the priority strings not applicable in 3.3.x. + +2016-05-13 Nikos Mavrogiannopoulos + + * tests/dsa/testdsa, tests/openpgp-certs/testcerts, + tests/scripts/common.sh, tests/suite/eagain, + tests/suite/mini-eagain2.c, tests/suite/testcompat-main, + tests/suite/testsrn: tests: simplified server launching process Also attempt to use a new port on every started server and added a + waiting period for the port to become re-usable. + +2016-05-21 Nikos Mavrogiannopoulos + + * tests/version-checks.c: added check for the VERS-ALL priority + keyword + +2016-05-21 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: gnutls_priority_init: recognize the + VERS-ALL keyword This keyword is identical to VERS-TLS-ALL, but it will allow to + re-use priority strings from 3.4.x+ to this branch of gnutls. + +2016-05-20 Nikos Mavrogiannopoulos + + * tests/Makefile.am: tests: do not use pkglib to generate + libpkcs11mock1.so This resulted in the test library being installed. Install we use + noinst for the library, but pass -rpath to LDFLAGS as a hack to for + libtool to generate the shared version. + +2016-05-20 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: released 3.3.23 + +2016-05-19 Nikos Mavrogiannopoulos + + * src/cli.c, src/socket.c, src/socket.h: gnutls-cli: allow operation + with stdin input That is once commands from stdin are given, they are not only sent + to server, but we also wait for a response prior to exiting. Resolves #96 + +2016-05-17 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-05-17 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-05-17 Nikos Mavrogiannopoulos + + * src/cli.c: gnutls-cli: corrected check for OCSP verification + success + +2016-01-18 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c: gnutls_global_init: log gnutls' version on + initialization + +2016-05-12 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-05-12 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/mini-server-name.c: tests: backported + server name checks + +2016-05-12 Nikos Mavrogiannopoulos + + * lib/ext/server_name.c: server_name: only save the supported server + names in the session Invalid server names with embedded nulls and unsupported types are + not saved. + +2016-05-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-05-10 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: cert cred: add the CN to the list of known + hostnames only if no dns_names That is, follow rfc6125 and support CN as a fallback only. + +2016-05-10 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: gnutls_certificate_set_key: import the DNS + names of the certificates That is, only when no (NULL) names are provided. + +2016-05-03 Nikos Mavrogiannopoulos + + * tests/pkcs11/pkcs11-cert-import-url-exts.c, + tests/pkcs11/pkcs11-get-exts.c, + tests/pkcs11/pkcs11-get-raw-issuer-exts.c: Revert "tests: ignore + failure to load pkcs11 mock provider" This reverts commit ae40598e5597b1b1f01a7e55d35b5f476d7d19d7. + +2016-05-03 Nikos Mavrogiannopoulos + + * configure.ac, tests/Makefile.am: tests: don't run pkcs11 mock + module tests under buggy p11-kit + +2016-05-03 Nikos Mavrogiannopoulos + + * tests/pkcs11/pkcs11-cert-import-url-exts.c, + tests/pkcs11/pkcs11-get-exts.c, + tests/pkcs11/pkcs11-get-raw-issuer-exts.c: tests: ignore failure to + load pkcs11 mock provider GnuTLS 3.3.x can work with old versions of p11-kit which do not have + the necessary fixes to load absolute paths. + +2016-05-03 Nikos Mavrogiannopoulos + + * lib/nettle/gnettle.h: Fixed _NETTLE_UPDATE macro The macro was not using the input parameters but rather the actual + variable name from the function (which was identical to input). + Patch by Stanislav Zidek. + +2016-05-03 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: gnutls_certificate_set_key: duplicate the + provided memory That is, do not assume that a heap allocated value is provided. + +2016-05-03 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-05-03 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-05-02 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/pkcs11/pkcs11-cert-import-url-exts.c, + tests/pkcs11/pkcs11-get-exts.c, + tests/pkcs11/pkcs11-get-raw-issuer-exts.c, + tests/pkcs11/pkcs11-mock.c, tests/pkcs11/pkcs11-mock.h: tests: added + a basic PKCS#11 mock module This is used to test gnutls_pkcs11_obj_get_exts(), + gnutls_x509_crt_import_url(), and gnutls_pkcs11_get_raw_issuer() + with the GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT flag. + +2016-05-03 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: find_cert_cb: do not use C_FindObjectsInit() + when another is already running While some modules implicitly terminated the previous run, this is + not something that PKCS#11 modules are expected to typically do. + +2016-05-03 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: the flag + GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT will be respected by + imported certificates That is, certificates imported with gnutls_pkcs11_obj_import_url() + or gnutls_x509_crt_import_url() will be able to be extracted with + their extensions overriden. Previously that was available only on + gnutls_pkcs11_get_raw_issuer() and friends. + +2016-05-03 Nikos Mavrogiannopoulos + + * lib/pkcs11x.c: pkcs11: find_ext_cb: eliminated memory leak + +2016-05-02 Nikos Mavrogiannopoulos + + * lib/pkcs11x.c: gnutls_pkcs11_obj_get_exts: updated documentation + [ci skip] + +2016-04-29 Nikos Mavrogiannopoulos + + * lib/gnutls_privkey_raw.c: corrected import issue in + gnutls_privkey_import_ecc_raw + +2016-04-29 Nikos Mavrogiannopoulos + + * lib/x509/privkey.c: x509/privkey: in raw import functions set the + parameter's algorithm type + +2016-04-26 Nikos Mavrogiannopoulos + + * tests/dane.c: tests: enhanced dane testing with offline + verification checks + +2016-04-26 Nikos Mavrogiannopoulos + + * libdane/dane.c: dane: verification will not fail if a CA entry is + encountered but cannot be verified That addresses the issue of verifying a single certificate against a + list of TLSA entries that contain an entry with CA usage (cert usage + 0). With the previous behavior verification would have failed, while + now this entry will be skipped. + +2016-04-26 Nikos Mavrogiannopoulos + + * lib/gnutls_cert.c, libdane/dane.c: doc: improved documentation on + certificate and DANE verification functions + +2016-04-18 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: _wrap_nettle_pk_derive: reject values of public + key that are over the prime That is do not canonicalise the value we get from the network, but + rather check it for validity. This saves a modular reduction on + handshake and performs a sanity check on the peer's (client) + parameters. Reported by Hubert Kario. Resolves #84 + +2016-04-13 Nikos Mavrogiannopoulos + + * lib/gnutls_sig.c: handshake: do not overwrite the server's + signature algorithm That is, correct a bug under which a client sending a certificate + would overwrite the server's idea about the used signature + algorithm. Reported by Hubert Kario. + +2016-04-12 Nikos Mavrogiannopoulos + + * lib/x509/ocsp.c: gnutls_ocsp_resp_get_single: fail if thisUpdate + is not available or unparsable That is because this field is not optional, and a failure on its + parsing is always fatal. Reported by Yuan Jochen Kang. + +2016-04-09 Nikos Mavrogiannopoulos + + * lib/x509/ocsp_output.c, lib/x509/output.c: x509 output: don't warn + about insecure algorithm when unknown + +2016-04-08 Nikos Mavrogiannopoulos + + * lib/pkix.asn, lib/pkix_asn1_tab.c: pkix.asn: corrected byKey + definition OCSP is defined in an EXPLICIT tags module, and as such we must tag + explicitly all of its tags. + +2016-04-05 Nikos Mavrogiannopoulos + + * lib/x509/name_constraints.c: name constraints: enforce the rules + for IP constraints when adding This will prevent gnutls from generating badly formed certificates. + +2016-04-02 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-04-02 Nikos Mavrogiannopoulos + + * src/ocsptool-common.c: ocsptool: use HTTP/1.0 for requests This avoids issue with servers serving chunk encoding which ocsptool + doesn't support. Reported by Thomas Klute. + +2016-03-30 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-03-30 Nikos Mavrogiannopoulos + + * lib/x509/output.c: x509/output: simplified cidr_to_string() + +2016-03-29 Nikos Mavrogiannopoulos + + * lib/x509/output.c: x509/output: print RFC5280 CIDRs in name + constraints + +2016-03-30 Nikos Mavrogiannopoulos + + * lib/system.c: system_recv_timeout(): verify that the file + descriptor is acceptable for select() + +2016-03-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-03-15 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-nc.pem: tests: template-test was updated + for OCSP key purpose reordering + +2016-03-15 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: do not require a CA for OCSP signing This follows the recommendations in RFC6960 in 4.2.2.2 which allow a + CA to delegate OCSP signing to another certificate without requiring + it to be a CA. Reported by Thomas Klute. + +2016-03-16 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/x86-common.c: x86-common: CPUID override will + only work if CPU has already the capability present This resolves test suite failure on CPUs with limited capabilities. + Reported by Andreas Metzler. + +2016-03-18 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-03-18 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c: handshake: parse the mandatory to parse + extension prior to any callback call This relates to the change of ALPN extension to mandatory to parse, + and allows applications to get ALPN data prior to handshake + completion. + +2016-03-18 Nikos Mavrogiannopoulos + + * tests/mini-x509-callbacks.c: tests: verify that the + post-client-hello callback has access to ALPN data + +2016-03-18 Nikos Mavrogiannopoulos + + * tests/resume.c: tests: added checks for session resumption and + ALPN This checks whether the ALPN extension is re-read on resumption and + is negotiated. + +2016-02-11 Nikos Mavrogiannopoulos + + * tests/resume.c: tests: resume: simplified structure assignment + using C99 syntax + +2016-03-15 Yuriy M. Kaminskiy + + * lib/ext/alpn.c: alpn: ALPN state is per-connection, it should not + be saved with session data In addition the extension was moved to the mandatory to parse to + ensure it is always parsed when sessions are resumed. rfc7301: Unlike many other TLS extensions, this extension does not + establish properties of the session, only of the connection. + When session resumption or session tickets [RFC5077] are used, the + previous contents of this extension are irrelevant, and only the + values in the new handshake messages are considered. Signed-off-by: Yuriy M. Kaminskiy Signed-off-by: + Nikos Mavrogiannopoulos + +2016-03-11 Nikos Mavrogiannopoulos + + * src/cli.c: gnutls-cli: fix invalid initialization in + cert_verify_ocsp() + +2016-03-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-03-08 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-03-08 Nikos Mavrogiannopoulos + + * tests/mini-loss-time.c: tests: backported mini-loss-time fixes + +2016-03-08 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-03-04 Nikos Mavrogiannopoulos + + * tests/slow/Makefile.am: tests: do not run hash-large twice + +2016-03-03 Nikos Mavrogiannopoulos + + * tests/version-checks.c: tests: corrected typo in version-checks + +2016-03-03 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: added check on build with SSL 3.0 + +2016-03-03 Nikos Mavrogiannopoulos + + * tests/suite/testsrn: tests: backported testsrn from 3.4 branch + +2016-03-03 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/cert-common.h, tests/version-checks.c: + tests: added check for version negotiation default prio string That verifies whether the support versions are negotiated. + +2016-03-03 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-03-03 Nikos Mavrogiannopoulos + + * configure.ac, lib/gnutls_priority.c: Remove SSL 3.0 from the + default priority strings That can be reverted by using the --with-ssl3 configure option. + +2016-03-03 Nikos Mavrogiannopoulos + + * tests/slow/Makefile.am: tests: include test-hash-large into dist + +2016-03-01 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: separate builds with asan + +2016-03-01 Nikos Mavrogiannopoulos + + * lib/openpgp/extras.c: gnutls_openpgp_keyring_import: backported + mem leak fix + +2016-03-01 Nikos Mavrogiannopoulos + + * src/p11tool.c: p11tool: avoid warning with cast + +2016-03-01 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: eliminated memory leaks on cert + verification + +2016-03-01 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: backported memory leak fixes in PKCS#12 + handling + +2015-11-09 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: eliminate leaks in _verify_x509_mem() + +2015-11-09 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: eliminate memory leaks in certificate + generation + +2016-02-29 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version [ci skip] + +2016-02-29 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: avoid warning with cast + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/ext/ecc.c: ecc: optimized extension parsing + +2016-02-29 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: fixed asan build for nettle3 + +2016-02-29 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: timespec_sub_ms: fixed operation in 32-bit + systems + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: Fixes to prevent undefined behavior (found + with libubsan) + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/gnutls.h.in: gnutls.h: Fixes to prevent + undefined behavior (found with libubsan) + +2016-02-29 Nikos Mavrogiannopoulos + + * lib/gnutls_mem.h, lib/x509/x509.c: x509: Fixes to prevent + undefined behavior (found with libubsan) + +2016-02-26 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: added libasan build with nettle3 + +2016-02-25 Jan Vcelak + + * lib/x509/privkey_pkcs8.c: gnutls_x509_privkey_import: add missing + algorithm setting for DSA keys The algorithm number was set only in the private key structure, not + in the nested structure with parameters. This made certain + operations to fail (e.g., copying the key into a PKCS #11 token). Signed-off-by: Jan Vcelak + +2015-06-17 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-date.pem, + tests/cert-tests/template-dn.pem, + tests/cert-tests/template-generalized.pem, + tests/cert-tests/template-nc.pem, + tests/cert-tests/template-overflow.pem, + tests/cert-tests/template-overflow2.pem, + tests/cert-tests/template-test, tests/cert-tests/template-test.pem, + tests/cert-tests/template-utf8.pem: tests: regenerate the results in + template-test using UTC times + +2016-02-25 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-02-25 Nikos Mavrogiannopoulos + + * lib/x509/common.c, lib/x509/common.h: When writing the Time ASN.1 + structure follow the RFC5280 recommendations That is make sure we generate dates with UTCTime prior to 2050 and + GeneralizedTime format after 2050. + +2015-06-17 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, tests/cert-tests/template-date.pem, + tests/cert-tests/template-dn.pem, + tests/cert-tests/template-generalized.pem, + tests/cert-tests/template-generalized.tmpl, + tests/cert-tests/template-nc.pem, + tests/cert-tests/template-overflow.pem, + tests/cert-tests/template-overflow2.pem, + tests/cert-tests/template-test, tests/cert-tests/template-test.pem, + tests/cert-tests/template-utf8.pem: tests: verify that we generate + dates with UTCTime prior to 2050 Also that we generate dates with GeneralizedTime format after 2050. + +2016-02-19 Nikos Mavrogiannopoulos + + * lib/nettle/cipher.c: Prevent the encryption or decryption of more + than 2^32 bytes with nettle2 That is because of nettle2 API limitations. Unlike the hash + functions there is no real need for a wrapper as encrypting or + decrypting that amount of data is unlikely. + +2016-02-13 Nikos Mavrogiannopoulos + + * tests/dsa/testdsa, tests/scripts/common.sh: tests: backported + testdsa to prevent random failures in test suite + +2016-02-13 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-02-13 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/hmac-padlock.c, + lib/accelerated/x86/hmac-x86-ssse3.c, + lib/accelerated/x86/sha-padlock.c, + lib/accelerated/x86/sha-padlock.h, + lib/accelerated/x86/sha-x86-ssse3.c, lib/accelerated/x86/sha-x86.h, + lib/accelerated/x86/x86-common.h, lib/nettle/gnettle.h, + lib/nettle/mac.c: nettle: use the correct type for hash and MAC + functions In addition allow for hashing of more than UINT_MAX data bytes with + nettle 2.x in 64-bit systems. + +2016-02-12 Nikos Mavrogiannopoulos + + * tests/slow/Makefile.am, tests/slow/hash-large.c, + tests/slow/test-hash-large: tests: check whether large buffer hashes + and MAC work as expected + +2016-02-10 Nikos Mavrogiannopoulos + + * tests/set_pkcs12_cred.c: tests: set_pkcs12_cred: existing tests + are disabled when in FIPS140-2 mode The tests require access to the RC4 cipher which is not available. + +2016-02-03 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version + +2016-01-31 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2016-01-30 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-date.pem, + tests/cert-tests/template-dn.pem, tests/cert-tests/template-nc.pem, + tests/cert-tests/template-overflow.pem, + tests/cert-tests/template-overflow2.pem, + tests/cert-tests/template-test.pem: Revert "tests: updated to + account for cert generation after + c1405c6e08ef55421108bd4395588368f4122dda fix" This reverts commit 09dcbe564a85c021ebcbf7a3f28075d19c399ce4. + +2016-01-30 Nikos Mavrogiannopoulos + + * lib/x509/x509_ext.c: Revert "Fix out-of-bounds read in + gnutls_x509_ext_export_key_usage" This was a false negative and not a real out-of-bounds read. This + reverts commit c1405c6e08ef55421108bd4395588368f4122dda. + +2016-01-21 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: Added build with ARCFOUR + +2016-01-21 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, lib/gnutls_priority.c, tests/priorities.c: + Added configure flag --with-arcfour128 This flag will re-enable ARCFOUR in the priority strings by default. + +2016-01-20 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-01-20 Nikos Mavrogiannopoulos + + * tests/mini-global-load.c, tests/mini-x509.c, tests/priorities.c, + tests/record-sizes.c: Revert "Revert "tests: updated to account for + ARCFOUR being disabled"" This reverts commit a2f907d0d4e52eb4dd24cc1f5d7d892b21abfd83. + +2016-01-20 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: Revert "Revert "ARCFOUR is disabled from + the default priority strings"" This reverts commit b3b5db319d4246e4735017cc423b92175f713a89. + +2016-01-13 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c: gnutls_pubkey_import_x509_raw: fixed memory + leak + +2016-01-11 Nikos Mavrogiannopoulos + + * lib/x509/output.c: x509: place newline when printing unsupported + othernames + +2016-01-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-01-10 Nikos Mavrogiannopoulos + + * lib/ext/alpn.c: alpn: when parsing the list of protocols return at + the first mutually common That resolves an issue where the server wouldn't select the first + mutually supported. Resolves #63 + +2016-01-10 Nikos Mavrogiannopoulos + + * tests/mini-alpn.c: tests: mini-alpn: corrected protocol selection + order + +2016-01-10 Nikos Mavrogiannopoulos + + * tests/mini-alpn.c: tests: alpn: enhance the testing of ALPN + negotiation + +2016-01-09 Nikos Mavrogiannopoulos + + * lib/ext/alpn.c: alpn: document how the selected protocol is + selected [ci skip] + +2016-01-09 Nikos Mavrogiannopoulos + + * tests/mini-alpn.c: tests: verify that the selected ALPN protocol + is the first advertised + +2016-01-08 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.20 + +2016-01-08 Nikos Mavrogiannopoulos + + * NEWS: reverted ARCFOUR removal change + +2016-01-08 Nikos Mavrogiannopoulos + + * tests/mini-global-load.c, tests/mini-x509.c, tests/priorities.c, + tests/record-sizes.c: Revert "tests: updated to account for ARCFOUR + being disabled" This reverts commit 45926d9561b2e888c505524663b7c7ad87c263bc. + +2016-01-08 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: Revert "ARCFOUR is disabled from the + default priority strings" This reverts commit 76be7bda79d6785eeab3ef8e96db026ad7aac9c3. + +2016-01-07 Nikos Mavrogiannopoulos + + * configure.ac: configure: no longer distribute lzip tarballs + +2015-11-25 Nikos Mavrogiannopoulos + + * src/libopts/text_mmap.c: libopts: use the O_BINARY flag in windows + for files + +2015-11-25 Nikos Mavrogiannopoulos + + * src/libopts/COPYING.gplv3, src/libopts/COPYING.lgplv3, + src/libopts/COPYING.mbsd, src/libopts/Makefile.am, + src/libopts/README, src/libopts/ag-char-map.h, src/libopts/alias.c, + src/libopts/ao-strs.c, src/libopts/ao-strs.h, + src/libopts/autoopts.c, src/libopts/autoopts.h, + src/libopts/autoopts/options.h, src/libopts/autoopts/project.h, + src/libopts/autoopts/usage-txt.h, src/libopts/boolean.c, + src/libopts/check.c, src/libopts/compat/compat.h, + src/libopts/compat/pathfind.c, src/libopts/compat/windows-config.h, + src/libopts/configfile.c, src/libopts/cook.c, src/libopts/enum.c, + src/libopts/env.c, src/libopts/file.c, src/libopts/find.c, + src/libopts/genshell.c, src/libopts/genshell.h, + src/libopts/gettext.h, src/libopts/init.c, src/libopts/intprops.h, + src/libopts/libopts.c, src/libopts/load.c, + src/libopts/m4/libopts.m4, src/libopts/m4/liboptschk.m4, + src/libopts/m4/stdnoreturn.m4, src/libopts/makeshell.c, + src/libopts/nested.c, src/libopts/numeric.c, + src/libopts/option-value-type.c, + src/libopts/option-xat-attribute.c, src/libopts/parse-duration.c, + src/libopts/parse-duration.h, src/libopts/pgusage.c, + src/libopts/proto.h, src/libopts/putshell.c, src/libopts/reset.c, + src/libopts/restore.c, src/libopts/save.c, src/libopts/sort.c, + src/libopts/stack.c, src/libopts/stdnoreturn.in.h, + src/libopts/streqvcmp.c, src/libopts/text_mmap.c, + src/libopts/time.c, src/libopts/tokenize.c, src/libopts/usage.c, + src/libopts/version.c: libopts: updated to 5.18.6 + +2016-01-07 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2016-01-07 Nikos Mavrogiannopoulos + + * Makefile.am, symbols.last: symbols.last: don't include internal + symbols into exported list + +2016-01-07 Nikos Mavrogiannopoulos + + * NEWS: NEWS: doc update + +2016-01-05 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-date.pem, + tests/cert-tests/template-dn.pem, tests/cert-tests/template-nc.pem, + tests/cert-tests/template-overflow.pem, + tests/cert-tests/template-overflow2.pem, + tests/cert-tests/template-test.pem: tests: updated to account for + cert generation after c1405c6e08ef55421108bd4395588368f4122dda fix + +2016-01-05 Nikos Mavrogiannopoulos + + * tests/Makefile.am: tests: Makefile.am: removed invalid program ld + flags + +2016-01-04 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2016-01-04 Tim Kosse + + * lib/x509/x509_ext.c: Fix out-of-bounds read in + gnutls_x509_ext_export_key_usage + +2016-01-01 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: optimized build process That is, in slow asan and valgrind builds don't check the full test + suite. + +2015-12-31 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: fixes to store the imported URL This ammends 603d0db776537c19bdfd907e0fc77c7321874bf0 with changes + for the 3.3.x branch. + +2015-12-31 Nikos Mavrogiannopoulos + + * NEWS: doc update [ci skip] + +2015-12-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-12-31 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: import public keys from any + available object That is, load public keys from the public key object, or the + certificate object if they are present. That affects non-RSA public + keys which do not contain all required fields on the private key + object. + +2015-12-31 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: gnutls_pkcs11_copy_x509_privkey2: corrected + the writing of ECC private key + +2015-12-31 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: gnutls_pkcs11_copy_x509_privkey2: corrected + the type of the written object Previously only RSA objects were correctly written. + +2015-12-24 Nikos Mavrogiannopoulos + + * NEWS: NEWS: doc update [ci skip] + +2015-12-23 Nikos Mavrogiannopoulos + + * lib/ext/max_record.c: max_record: don't consider this extension on + DTLS That is because it doesn't work as expected, and does not fragment + handshake messages. Relates with #61 + +2015-12-20 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-04-28 Nikos Mavrogiannopoulos + + * lib/x509/name_constraints.c, tests/name-constraints.c: Handle DNS + name constraints with leading dot Patch by Fotis Loukos. Resolves 3 Signed-off-by: Nikos Mavrogiannopoulos + +2015-12-15 Nikos Mavrogiannopoulos + + * tests/mini-global-load.c, tests/mini-x509.c, tests/priorities.c, + tests/record-sizes.c: tests: updated to account for ARCFOUR being + disabled + +2015-12-15 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-12-15 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: ARCFOUR is disabled from the default + priority strings ARCFOUR is a cipher known to be broken theoretically and + practically. Configurations that depend on that cipher being on + should explicitly enable it. Resolves #23 + +2015-12-08 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: Do not allow importing public keys from PKCS + #11 private keys for DSA and ECDSA This prevents the reading of the public key when non-RSA keys are + available. This is a much cleaner approach than + 5a4e692511dc3a829eda0d7c5a87e56cbc2055f0. + +2015-12-08 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c, lib/pkcs11.c, lib/pkcs11_int.h, + lib/pkcs11_privkey.c: Revert "Do not allow importing public keys + from PKCS #11 private keys for DSA and ECDSA" This reverts commit 0e79aabab519a6b568cf8c31b38523cce7416bd8. + +2015-12-06 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-12-06 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c, lib/pkcs11.c, lib/pkcs11_int.h, + lib/pkcs11_privkey.c: Do not allow importing public keys from PKCS + #11 private keys for DSA and ECDSA That is, because they do not contain all the required parameters for + a direct import. Reported by Jan Vcelak. + +2015-12-06 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: avoid setting a variable which isn't + used + +2015-12-06 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h, lib/pkcs11_privkey.c: pkcs11: + deinitialize gnutls_pkcs11_obj_t's pubkey on deinit + +2015-12-06 Jan Vcelak + + * lib/pkcs11_privkey.c: pkcs11: fix passing of incorrect variable in + privkey_get_pubkey The code worked for RSA because the content of the variables + matched. But it doesn't match for ECC. CKM_RSA_PKCS_KEY_PAIR_GEN (0x0) == CKK_RSA (0x0) + CKM_ECDSA_KEY_PAIR_GEN (0x1040) != CKK_ECDSA (0x3) Signed-off-by: Jan Vcelak + +2015-11-30 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: allow specifying NULL buffer in + gnutls_x509_crt_get_*_unique_id() + +2015-11-22 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.19 + +2015-11-21 Nikos Mavrogiannopoulos + + * symbols.last: updated auto-generated files + +2015-11-21 Nikos Mavrogiannopoulos + + * doc/scripts/getfuncs.pl: getfuncs.pl: don't consider functions + with _gnutls prefix + +2015-11-21 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c, lib/includes/gnutls/gnutls.h.in, + lib/libgnutls.map: gnutls_global_init_skip: prefixed with an + underscore + +2015-11-21 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2015-11-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-11-16 Nikos Mavrogiannopoulos + + * tests/global-init-override.c, tests/global-init.c: tests: + corrected copyright info + +2015-11-16 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/global-init-override.c: tests: added + check for overriding global initialization + +2015-11-16 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: documented GNUTLS_SKIP_GLOBAL_INIT macro + +2015-11-16 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c, lib/includes/gnutls/gnutls.h.in, + lib/libgnutls.map: Added GNUTLS_SKIP_GLOBAL_INIT macro to allow + programs skip implicit global initialization + +2015-11-16 Nikos Mavrogiannopoulos + + * tests/utils.c, tests/utils.h: utils: backported sec_sleep() + +2015-11-16 Nikos Mavrogiannopoulos + + * tests/mini-handshake-timeout.c: tests: backported + mini-handshake-timeout + +2015-11-16 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: added build and check in FIPS140-2 + mode + +2015-11-16 Nikos Mavrogiannopoulos + + * tests/mini-dtls-record.c, tests/resume-dtls.c: tests: backported + mini-dtls-record.c and resume-dtls.c + +2015-11-16 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: .gitlab-ci.yml: remove the minimal library from + targets + +2015-11-15 Nikos Mavrogiannopoulos + + * lib/x509/x509_write.c: disable_optional_stuff: don't disable + unique IDs if set There are sideways set these values even if they are not in the + public API, and we shouldn't disable them unconditionally. + +2015-11-15 Nikos Mavrogiannopoulos + + * .gitlab-ci.yml: Added CI build rules + +2015-11-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-11-09 Nikos Mavrogiannopoulos + + * lib/algorithms/ciphersuites.c, tests/mini-record.c: Require TLS + 1.2 for all the ciphersuites which are defined for it only This solves an interoperability issue with openssl. Reported by + Viktor Dukhovni. + +2015-11-11 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-11-11 Nikos Mavrogiannopoulos + + * lib/auth/dhe.c, lib/auth/ecdhe.c: Allow switching a ciphersuite to + DHE and ECDHE on a rehandshake + +2015-11-08 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-11-03 Nikos Mavrogiannopoulos + + * lib/gnutls.pc.in: gnutls.pc: don't use the libtool version of the + link options Reported by Dan Kegel. Resolves #49 + +2015-10-23 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-10-15 Nikos Mavrogiannopoulos + + * lib/algorithms/ciphers.c, lib/gnutls_cipher_int.c, + lib/gnutls_priority.c: Disable the NULL cipher on runtime when + FIPS140 mode is enabled instead of statically That way the NULL cipher can be used when not in FIPS140 mode. + +2015-10-15 Nikos Mavrogiannopoulos + + * lib/algorithms.h, lib/algorithms/ciphers.c, lib/algorithms/kx.c, + lib/gnutls_int.h, lib/gnutls_priority.c: backport: Tolerate priority + strings with names of legacy ciphers and key exchanges That enables better backwards compatibility with old applications + which disable or enable algorithms which no longer are supported. + Relates #44 + +2015-10-15 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-10-15 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: pkcs11: write CKA_ISSUER and CKA_SERIAL_NUMBER + when writing on a certificate That allows NSS to read and use the written certificate. Resolves + #43 + +2015-10-12 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-10-12 Lennert Buytenhek + + * lib/nettle/pk.c: Fix memory leak in wrap_nettle_hash_algorithm(). wrap_nettle_hash_algorithm() leaks an mpz_t if it is called with pk + == GNUTLS_PK_RSA and sig == NULL, in which case it will return + without going through the regular exit path that clears the mpz_t it + allocated at the beginning of the function. Use the regular exit + path instead to fix this. This leak can be triggered via calls to + gnutls_pubkey_get_preferred_hash_algorithm(). Signed-off-by: Lennert Buytenhek + +2015-09-14 Nikos Mavrogiannopoulos + + * lib/gnutls_str.c: _gnutls_hex2bin: avoid overrun in the provided + buffer + +2015-09-12 Nikos Mavrogiannopoulos + + * doc/manpages/tpmtool.1: tpmtool.1: updated + +2015-09-12 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version + +2015-09-11 Nikos Mavrogiannopoulos + + * lib/x509/output.c: Don't use formatted output for fixed strings Resolves #35 + +2015-08-21 Nikos Mavrogiannopoulos + + * lib/gnutls_session_pack.c: session packing: corrected issue in PSK + session unpack + +2015-08-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-08-21 Nikos Mavrogiannopoulos + + * lib/x509/verify-high.c, lib/x509/verify-high2.c: x509: when + appending CRLs to a trust list ensure that we don't have duplicates That is, overwrite CRLs if they have been obsoleted. + +2015-08-21 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: allow exporting very long CRLs + +2015-08-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-08-12 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, tests/cert-tests/crl: tests: check + whether the CRL generation code works as expected + +2015-08-12 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: removed limit on maximum imported + certificates in the -i option + +2015-08-12 Nikos Mavrogiannopoulos + + * src/certtool-common.c, src/certtool.c: certtool: eliminated memory + leaks due to new cert loading code + +2015-08-12 Nikos Mavrogiannopoulos + + * src/certtool-common.c, src/certtool-common.h: certtool: lifted + limits on file size to load + +2015-08-10 Nikos Mavrogiannopoulos + + * Makefile.am: before dist ensure that included libopts matches + autogen + +2015-08-09 Nikos Mavrogiannopoulos + + * tests/suite/mini-eagain2.c: tests: backported fix in mini-eagain2 + +2015-08-09 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: pkcs11: increase attributes size in + gnutls_pkcs11_copy_x509_privkey + +2015-08-09 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2015-08-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-08-03 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-08-03 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/pkcs11.h, lib/pkcs11_privkey.c: pkcs11: set + the CKA_TOKEN attribute on generated public keys That also introduces the GNUTLS_PKCS11_OBJ_FLAG_NO_STORE_PUBKEY + flag, to simulate the previous behavior. + +2015-07-31 Nikos Mavrogiannopoulos + + * lib/ext/safe_renegotiation.c: safe renegotiation: simulate + receiving the extension on receival of SCSV + +2015-07-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-07-31 Nikos Mavrogiannopoulos + + * lib/ext/safe_renegotiation.c: safe renegotiation: handle case + where client didn't send any extension That was affected by the "don't try to send extensions we didn't + receive". + +2015-07-31 Nikos Mavrogiannopoulos + + * lib/gnutls_extensions.c, lib/gnutls_handshake.c, lib/gnutls_int.h: + As server don't try to send extensions we didn't receive. + +2015-07-20 Nikos Mavrogiannopoulos + + * lib/x509/common.c: Reset the output value on error in + _gnutls_x509_dn_to_string() Reported by Kurt Roeckx. + +2015-07-20 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: gnutls_prf: document that this is not + identical to RFC5705 + +2015-07-20 Nikos Mavrogiannopoulos + + * src/p11tool-args.def: p11tool: fix documentation for + --generate-ecc and generate-dsa + +2015-07-12 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version + +2015-07-10 Nikos Mavrogiannopoulos + + * lib/ext/dumbfw.c: corrected function name + +2015-07-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-07-10 Nikos Mavrogiannopoulos + + * lib/auth/dhe_psk.c: PSK: set the hint in DHE-PSK and ECDHE-PSK + ciphersuites + +2015-07-09 Nikos Mavrogiannopoulos + + * lib/ext/dumbfw.c: dumbfw: don't append a size prefix in the pad Reported by Hannes Mehnert. + +2015-07-02 Daniel Kahn Gillmor + + * src/certtool.c: certtool --outder should not emit signature + verification status When emitting binary-formatted output, send signature verification + status to stderr, since it is not binary-formatted output. A simpler version of this patch would be to always send signature + verification to stderr, but that would change the text-formatted + output. + +2015-07-01 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-07-01 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c: DSA: the numeric number of bits returned from + public key should depend on P not Y That allows to do the proper evaluation to check certificate + strength. Reported by Hubert Kario. + +2015-07-01 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-07-01 Nikos Mavrogiannopoulos + + * lib/x509/name_constraints.c: name constraints: don't reject + certificates if a CA has the URI or IPADDRESS constraints Don't reject certificates if a CA has the URI or IPADDRESS + constraints, and the end certificate doesn't have an IPaddress name + or a URI set. + +2015-06-26 Nikos Mavrogiannopoulos + + * lib/x509/privkey.c: enhanced header matching code for private keys + to skip unrelated data + +2015-06-25 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-06-25 Nikos Mavrogiannopoulos + + * tests/suite/Makefile.am, tests/suite/ciphersuite/scan-gnutls.sh, + tests/suite/ciphersuite/test-ciphers.js, + tests/suite/ciphersuite/test-ciphersuites.sh, + tests/suite/test-ciphersuite-names: tests: backported + test-ciphersuite-names from master + +2015-06-25 Nikos Mavrogiannopoulos + + * lib/x509/privkey.c: gnutls_x509_privkey_import2: better behavior + when provided with an unencrypted file That is, it will attempt to decode it first as plain file prior to + trying all encrypted options. + +2015-06-25 Nikos Mavrogiannopoulos + + * lib/x509/key_decode.c, lib/x509/mpi.c: _gnutls_get_asn_mpis() will + release any data on failure Resolves #15 + +2015-06-11 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: tests: backported test-compat-main + from master + +2015-06-10 Nikos Mavrogiannopoulos + + * lib/nettle/cipher.c: Corrected camellia256 set key in nettle3 + compat mode + +2015-06-04 Nikos Mavrogiannopoulos + + * lib/nettle/int/drbg-aes.c: drbg-aes: include gnutls_errors.h + +2015-06-03 Nikos Mavrogiannopoulos + + * lib/nettle/int/drbg-aes-self-test.c: fips140: added check for + reseed detection + +2015-06-03 Nikos Mavrogiannopoulos + + * tests/rng-fork.c: tests: check random generator for long outputs + as well + +2015-06-03 Nikos Mavrogiannopoulos + + * lib/nettle/int/drbg-aes.c: fips140: reset the reseed counter only + on reseed + +2015-06-03 Nikos Mavrogiannopoulos + + * lib/nettle/int/drbg-aes-self-test.c: fips140: added more checks on + the reseed and generate function + +2015-06-03 Nikos Mavrogiannopoulos + + * lib/nettle/int/drbg-aes.c, lib/nettle/int/drbg-aes.h: fips140: + enforce the max_number_of_bits_per_request + +2015-05-26 Nikos Mavrogiannopoulos + + * lib/x509/ocsp_output.c: Check the OID size for match when + comparing for the OCSP nonce extension Reported by Hanno Böck. + +2015-05-23 Armin Burgmeier + + * lib/gnutls_ui.c: gnutls_dh_get_prime_bits: return 0 if DH is not + used Before, the number of bits of a zero-length number was attempted to + be extracted, resulting in an error. The changed behaviour is + consistent with the documentation which explicitly states that 0 + should be returned if no DH key exchange was performed. + +2015-05-22 Nikos Mavrogiannopoulos + + * lib/gnutls_ui.c: gnutls_dh_get_group: mention that the values may + include a leading zero + +2015-05-21 Nikos Mavrogiannopoulos + + * lib/gnutls_ui.c: gnutls_dh_set_prime_bits: warn when overriding + the DH max prime size with 1007 bits or less + +2015-05-14 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-05-13 Nikos Mavrogiannopoulos + + * configure.ac, lib/accelerated/x86/aes-gcm-padlock.c, + lib/accelerated/x86/aes-gcm-x86-aesni.c, + lib/accelerated/x86/aes-gcm-x86-ssse3.c, + lib/accelerated/x86/aes-padlock.c, + lib/accelerated/x86/sha-padlock.c, + lib/accelerated/x86/sha-x86-ssse3.c, lib/nettle/Makefile.am, + lib/nettle/cipher.c, lib/nettle/int/dsa-fips.h, + lib/nettle/int/dsa-keygen-fips186.c, lib/nettle/int/dsa-validate.c, + lib/nettle/pk.c, m4/hooks.m4, tests/dsa/testdsa: Allow using nettle3 + with gnutls3.3 + +2015-05-06 Nikos Mavrogiannopoulos + + * tests/sign-md5-rep.c: tests: updated sign-md5-rep to reduce false + failures + +2015-05-05 Nikos Mavrogiannopoulos + + * tests/mini-loss-time.c: tests: eliminate mem leaks in + mini-loss-time + +2015-05-05 Nikos Mavrogiannopoulos + + * tests/mini-loss-time.c: tests: backported mini-loss-time from + master + +2015-04-28 Jan Vcelak + + * lib/nettle/pk.c: fix memory leak in ECDSA key parameters + verification Signed-off-by: Jan Vcelak + +2015-05-03 Nikos Mavrogiannopoulos + + * NEWS: updated NEWS + +2015-05-03 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: released 3.3.15 + +2015-04-30 Nikos Mavrogiannopoulos + + * lib/gnutls_dtls.c: doc: updated gnutls_dtls_set_timeouts + +2015-04-30 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c: gnutls_handshake_set_timeout will properly + work with DTLS + +2015-04-30 Nikos Mavrogiannopoulos + + * doc/examples/ex-client-dtls.c: doc: fixed example with DTLS + timeouts + +2015-04-28 Nikos Mavrogiannopoulos + + * lib/minitasn1/decoding.c, lib/minitasn1/libtasn1.h: updated + minitasn1 + +2015-04-25 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-04-25 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/sign-md5-rep.c: tests: added reproducer + for the MD5 acceptance issue Reported by Karthikeyan Bhargavan. + + http://lists.gnutls.org/pipermail/gnutls-devel/2015-April/007572.htmlConflicts: tests/Makefile.am + +2015-04-25 Nikos Mavrogiannopoulos + + * lib/ext/signature.c: before falling back to SHA1 as signature + algorithm in TLS 1.2 check if it is enabled + +2015-04-25 Nikos Mavrogiannopoulos + + * lib/ext/signature.c: _gnutls_session_sign_algo_enabled: do not + consider any values from the extension data to decide acceptable + algorithms + +2015-04-25 Nikos Mavrogiannopoulos + + * lib/auth/cert.c: set the value used by + gnutls_certificate_client_get_request_status prior to selecting + certificate That allows gnutls_certificate_client_get_request_status() to be + properly operating from the callback. Reported by Anton Lavrentiev. + +2015-04-22 Nikos Mavrogiannopoulos + + * lib/gnutls_cert.c: fixed doc: reported by Anton Lavrentiev + +2015-04-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-04-20 Nikos Mavrogiannopoulos + + * lib/gnutls_ui.c: gnutls_certificate_get_ours: will return the + certificate even if a callback was used This corrects a bug where this function would not work, when + gnutls_certificate_set_retrieve_function2() was used. + +2015-04-20 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: ensure that the X.509 version number is one byte + only + +2015-04-20 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: Check for invalid length in the X.509 version + field If such an invalid length is detected, reject the certificate. + Reported by Hanno Böck. + +2015-03-30 Nikos Mavrogiannopoulos + + * tests/mini-loss-time.c: tests: mini-loss-time: ignore sigpipe + +2015-03-30 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.14 + +2015-03-30 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: tests: change the default port in + testcompat to avoid clash with testsrn + +2015-03-30 Nikos Mavrogiannopoulos + + * doc/texinfo.css: doc: increase border spacing in HTML tables + +2015-03-29 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2015-03-29 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-03-28 Nikos Mavrogiannopoulos + + * lib/gnutls_int.h: do not penalize CBC ciphers with the maximum + send data size That reduced the maximum send size for CBC ciphers from 16384 to + 16384-(block size), which was unnecessary and was causing issues: + https://bugs.winehq.org/show_bug.cgi?id=37500 + +2015-03-29 Nikos Mavrogiannopoulos + + * lib/algorithms/ciphersuites.c, + tests/suite/ciphersuite/scan-gnutls.sh: made ciphersuites.c more + self-contained to be handled by test-ciphersuites.sh + +2015-03-28 Nikos Mavrogiannopoulos + + * lib/x509/x509_ext.c: Better fix for the double free in dist point + parsing + +2015-03-28 Nikos Mavrogiannopoulos + + * lib/minitasn1/parser_aux.c, lib/minitasn1/parser_aux.h: updated + libtasn1 + +2015-03-28 Nikos Mavrogiannopoulos + + * lib/gnutls_datum.c, lib/gnutls_datum.h, lib/x509/gnutls-idna.c, + lib/x509/x509_ext.c: gnutls_subject_alt_names_set and + gnutls_x509_aki_set_cert_issuer will set null-terminated strings + +2015-03-23 Nikos Mavrogiannopoulos + + * lib/x509/x509_ext.c: eliminated double-free in the parsing of dist + points Reported by Robert ÅšwiÄ™cki. + +2015-03-27 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-03-27 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: gnutls_pkcs11_privkey_generate2: increased + the size of ck_attributes + +2015-03-27 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: pkcs11: check gnutls_rnd() for error + condition + +2015-03-27 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: gnutls_pkcs11_privkey_generate2: set a + CKA_ID on key generation + +2015-03-26 Nikos Mavrogiannopoulos + + * lib/pkcs11_write.c: pkcs11: set the CKA_SIGN and CKA_DECRYPT flags + when writing a private key + +2015-03-26 Nikos Mavrogiannopoulos + + * lib/ext/server_name.c: When an application calls + gnutls_server_name_set() with a name of zero size disable the + extension Resolves #2 + +2015-03-25 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-03-25 Nikos Mavrogiannopoulos + + * lib/x509/name_constraints.c: name constraints: when no name of the + type is found, accept the certificate This follows RFC5280 advice closely. Reported by Fotis Loukos. + +2015-03-20 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c: avoid overflow when receiving DTLS 0.9 CCS + +2015-03-13 Nikos Mavrogiannopoulos + + * lib/gnutls_supplemental.c: Fixed handling of supplemental data + with types > 255. Patch by Thierry Quemerais. + +2015-03-13 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: doc update + +2015-03-13 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: gnutls_priority_init: document that + priorities can be NULL + +2015-03-13 Nikos Mavrogiannopoulos + + * lib/crypto-selftests.c: corrected self test for 3DES + +2015-03-11 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: only set ID and label when both size and + data are set + +2015-03-05 Nikos Mavrogiannopoulos + + * configure.ac: configure: check for /usr/share/dns/root.key as well + for dns root key + +2015-03-09 Nikos Mavrogiannopoulos + + * m4/hooks.m4: corrected macro which checks libtasn1 for + asn1_decode_simple_ber + +2015-03-09 Nikos Mavrogiannopoulos + + * lib/minitasn1/decoding.c, lib/minitasn1/libtasn1.h, + lib/minitasn1/parser_aux.c: minitasn1: updated to libtasn1 4.3 + +2015-03-09 Nikos Mavrogiannopoulos + + * doc/cha-internals.texi: rearranged internal documentation + +2015-03-09 Nikos Mavrogiannopoulos + + * src/cli-args.def, src/cli-debug-args.def, src/danetool-args.def, + src/socket.c: tools: added ftp as a starttls protocol + +2015-03-09 Nikos Mavrogiannopoulos + + * src/cli-args.def: gnutls-cli: starttls and starttls-proto can't + mix + +2015-03-07 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: expand on SECURE256 being an alias to + SECURE192 + +2015-03-06 Nikos Mavrogiannopoulos + + * src/tests.c: gnutls-cli-debug: corrected check of certificate + chain order + +2015-03-06 Nikos Mavrogiannopoulos + + * tests/x509cert.c: tests: added small test to verify that + GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED succeeds with a single cert + +2015-03-06 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/tests.c: gnutls-cli-debug: disable + unsupported TLS protocols as soon + +2015-03-06 Nikos Mavrogiannopoulos + + * src/socket.c: cli sockets: check for a digit prior using atoi + +2015-03-06 Nikos Mavrogiannopoulos + + * src/tests.c: gnutls-cli-debug: a cert list of size 1 is always + sorted + +2015-03-06 Nikos Mavrogiannopoulos + + * src/socket.c: gnutls-cli-debug: do not warn multiple times about + unknown protocols + +2015-03-06 Nikos Mavrogiannopoulos + + * doc/cha-support.texi: updated documentation on FIPS140-2 + +2015-03-05 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, + tests/cert-tests/template-basic.pem, + tests/cert-tests/template-basic.tmpl, + tests/cert-tests/template-test: Revert "tests: template-test: added + a baseline check to detect slow systems" This reverts commit 2ee2a78178a842c9b0ef2ca3e12909ca3bb9fe79. + +2015-03-05 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-test: tests: don't perform the overflow + check in 32-bit systems + +2015-03-05 Nikos Mavrogiannopoulos + + * tests/cert-tests/template-date.pem, + tests/cert-tests/template-date.tmpl: tests: date parsing test was + modified to work in 32-bit systems + +2015-03-05 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, + tests/cert-tests/template-basic.pem, + tests/cert-tests/template-basic.tmpl, + tests/cert-tests/template-test: tests: template-test: added a + baseline check to detect slow systems + +2015-03-04 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-12 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11: testpkcs11: do not ignore the failure to + write a trusted CA + +2015-01-05 Nikos Mavrogiannopoulos + + * tests/suite/testpkcs11: testpkcs11: detect softhsm2 + +2015-03-04 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c, lib/tpm.c, lib/x509/common.c, + lib/x509/common.h, lib/x509/dn.c, lib/x509/ocsp.c, + lib/x509/pkcs12.c, lib/x509/pkcs12_bag.c, lib/x509/x509_ext.c, + m4/hooks.m4: use asn1_decode_simple_ber if available + +2015-02-27 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/abstract.h: list + gnutls_pubkey_get_verify_algorithm as deprected + +2015-02-26 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c: corrected typo in gnutls_handshake(), + spotted by Andris Mednis + +2015-02-25 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: released 3.3.13 + +2015-02-20 Nikos Mavrogiannopoulos + + * tests/cert-tests/Makefile.am, tests/cert-tests/invalid-sig, + tests/cert-tests/invalid-sig2.pem, + tests/cert-tests/invalid-sig3.pem: tests: added checks for invalid + X.509 certificate signatures + +2015-02-24 Nikos Mavrogiannopoulos + + * lib/gnutls_session.c: doc update: document that session_get_data() + must be used in non-resumed sessions + +2015-02-21 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: tests: testcompat: disable tests with + NULL ciphersuites; debian doesn't support them + +2015-02-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-02-21 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: fixed handling of GNUTLS_E_INT_CHECK_AGAIN + +2015-02-21 Nikos Mavrogiannopoulos + + * tests/mini-overhead.c, tests/mini-record.c: tests: require DTLS + 1.2 when using GCM + +2015-02-21 Nikos Mavrogiannopoulos + + * lib/algorithms/ciphersuites.c: corrected check which prevented + client to sent an unacceptable for the version ciphersuite + +2015-02-20 Nikos Mavrogiannopoulos + + * lib/gnutls_record.c: fixed sequence number copy + +2015-02-17 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-02-17 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: when importing a certificate ensure that the + signature parameters match + +2015-02-14 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-02-14 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/x86-common.c: Allow AESNI GCM accelaration in + x86 + +2015-02-04 Nikos Mavrogiannopoulos + + * src/cli.c: handle differently OCSP responses that are revoked and + of unknown status + +2015-02-01 Nikos Mavrogiannopoulos + + * src/common.c: compilation fix with return on void function; + reported by David Marx + +2015-01-29 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: doc update + +2015-01-29 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: set the appropriate direction when + _gnutls_io_write_flush() is called + +2015-01-28 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: documented using a session with fork or + multiple threads + +2015-01-25 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: print errno in a more uniform way + +2015-01-19 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: on certificate import check whether the two + signature algorithms match + +2015-01-25 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: simplified _gnutls_writev() by requiring the + total length + +2015-01-19 Nikos Mavrogiannopoulos + + * src/cli.c, src/ocsptool-common.c, src/ocsptool-common.h: don't be + so verbose about the OCSP nonce; it is universally unsupported + +2015-01-17 Tim Ruehsen + + * src/cli.c, src/ocsptool-common.c: OCSP check the whole cert chain Signed-off-by: Nikos Mavrogiannopoulos + +2015-01-17 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.12 + +2015-01-16 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-16 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped versions + +2015-01-16 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-16 Nikos Mavrogiannopoulos + + * libdane/errors.c: corrected typos Reported by Guido Kroon. + +2015-01-16 Nikos Mavrogiannopoulos + + * lib/algorithms/protocols.c, lib/gnutls_int.h: Added the notion of + obsolete versions That prevents using these versions as record version numbers, unless + they are the only protocol supported. This avoids the issues with + servers that have banned SSL 3.0 record versions. + +2015-01-16 Nikos Mavrogiannopoulos + + * src/ocsptool-common.c: ocsptool: follow the documented process for + gnutls_x509_crt_get_authority_info_access + +2015-01-16 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: gnutls_x509_crt_get_authority_info_access: doc + update + +2015-01-15 Nikos Mavrogiannopoulos + + * src/ocsptool-common.c: ocsptool-common: iterate through all AIA + items prior to decidig the OCSP server + +2015-01-13 Nikos Mavrogiannopoulos + + * src/cli-args.def: simplified text for inline-commands-prefix + +2015-01-12 Nikos Mavrogiannopoulos + + * NEWS: doc update: added urls of savannah reports + +2015-01-12 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-12 Nikos Mavrogiannopoulos + + * src/cli-args.def, src/cli.c, src/socket.c: gnutls-cli: added + --starttls-proto option + +2015-01-12 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: cleanup the name of types Conflicts: lib/pkcs11.c + +2015-01-12 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: when importing a public key, import it's + data as well (version 2 fix) + +2015-01-12 Nikos Mavrogiannopoulos + + * lib/x509/verify.c: doc update + +2015-01-11 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: when importing a public key, import it's + data as well + +2015-01-11 Nikos Mavrogiannopoulos + + * lib/gnutls_cert.c: doc update + +2015-01-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-10 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: When setting up TLS with cert-type OpenPGP + from a client, the server verifies if it supports the extension’s + contents in _gnutls_session_cert_type_supported(). This function + checks for cred->get_cert_callback but not cred->get_cert_callback2. + As a result, servers setup for OpenPGP certificate credential + callback with gnutls_certificate_set_retrieve_function2() are unable + to use the OpenPGP certificate type. The solution is to consider cred->get_cert_callback2 alongside + cred->get_cert_callback in _gnutls_session_cert_type_supported(). Patch by Rick van Rein. + +2015-01-10 Nikos Mavrogiannopoulos + + * lib/gnutls_privkey.c: gnutls_privkey_import_openpgp_raw: do not + release the cached value + +2015-01-08 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-08 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c, lib/gnutls_errors.h: When receiving a TLS + record with multiple handshake packets, parse them in one go That resolves: https://savannah.gnu.org/support/?108712 + +2015-01-08 Ludovic Courtès + + * NEWS, guile/modules/gnutls.in: guile: Call 'load-extension' both + during expansion and at run time. Fixes . * guile/modules/gnutls.in: Wrap '%libdir' definition and 'load-extension' call in 'eval-when'. * NEWS: Update. + +2015-01-06 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-06 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: in DTLS don't combine multiple packets which + exceed MTU Resolves: https://savannah.gnu.org/support/?108715 + +2015-01-06 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c: Added more precise check of push functions + availability + +2015-01-06 Nikos Mavrogiannopoulos + + * src/Makefile.am: danetool: only compile when dane is enabled + +2014-12-11 Nikos Mavrogiannopoulos + + * lib/crypto-backend.c: Allow a random generator with the same + priority to re-register That corrects an issue where the library is deinitialized, and + reinitialization wouldn't register the same rnd module. Reported by + Stanislav Zidek. + +2015-01-04 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c: certtool: modified check for READ_NUMERIC + +2015-01-04 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c: certtool: use 64-bit type for CRL serial + number + +2015-01-04 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c: certtool: check for overflows when reading + serial numbers + +2015-01-04 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c, src/certtool-cfg.h: certtool: use int64_t as + type for integers read + +2015-01-04 Nikos Mavrogiannopoulos + + * src/socket.c: gnutls-cli-debug: more precise handling of SMTP + protocol Patch by Andreas Metzler. + +2015-01-04 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2015-01-04 Nikos Mavrogiannopoulos + + * gl/Makefile.am, gl/alloca.in.h, gl/asnprintf.c, gl/asprintf.c, + gl/base64.c, gl/base64.h, gl/byteswap.in.h, gl/c-ctype.c, + gl/c-ctype.h, gl/errno.in.h, gl/float+.h, gl/float.c, + gl/float.in.h, gl/fstat.c, gl/ftell.c, gl/ftello.c, gl/getdelim.c, + gl/getline.c, gl/gettext.h, gl/gettimeofday.c, gl/hash-pjw-bare.c, + gl/hash-pjw-bare.h, gl/intprops.h, gl/itold.c, gl/lseek.c, + gl/m4/00gnulib.m4, gl/m4/absolute-header.m4, gl/m4/alloca.m4, + gl/m4/base64.m4, gl/m4/byteswap.m4, gl/m4/codeset.m4, + gl/m4/errno_h.m4, gl/m4/exponentd.m4, gl/m4/extensions.m4, + gl/m4/extern-inline.m4, gl/m4/fcntl-o.m4, gl/m4/fcntl_h.m4, + gl/m4/fdopen.m4, gl/m4/float_h.m4, gl/m4/fpieee.m4, + gl/m4/fseeko.m4, gl/m4/fstat.m4, gl/m4/ftell.m4, gl/m4/ftello.m4, + gl/m4/func.m4, gl/m4/getdelim.m4, gl/m4/getline.m4, + gl/m4/getpagesize.m4, gl/m4/gettext.m4, gl/m4/gettimeofday.m4, + gl/m4/glibc2.m4, gl/m4/glibc21.m4, gl/m4/gnulib-cache.m4, + gl/m4/gnulib-common.m4, gl/m4/gnulib-comp.m4, gl/m4/gnulib-tool.m4, + gl/m4/iconv.m4, gl/m4/include_next.m4, gl/m4/intdiv0.m4, + gl/m4/intl.m4, gl/m4/intldir.m4, gl/m4/intlmacosx.m4, + gl/m4/intmax.m4, gl/m4/intmax_t.m4, gl/m4/inttypes-pri.m4, + gl/m4/inttypes.m4, gl/m4/inttypes_h.m4, gl/m4/largefile.m4, + gl/m4/lcmessage.m4, gl/m4/ld-output-def.m4, + gl/m4/ld-version-script.m4, gl/m4/lib-ld.m4, gl/m4/lib-link.m4, + gl/m4/lib-prefix.m4, gl/m4/lock.m4, gl/m4/longlong.m4, + gl/m4/lseek.m4, gl/m4/malloc.m4, gl/m4/manywarnings.m4, + gl/m4/math_h.m4, gl/m4/memchr.m4, gl/m4/memmem.m4, gl/m4/minmax.m4, + gl/m4/mmap-anon.m4, gl/m4/msvc-inval.m4, gl/m4/msvc-nothrow.m4, + gl/m4/multiarch.m4, gl/m4/netdb_h.m4, gl/m4/netinet_in_h.m4, + gl/m4/nls.m4, gl/m4/off_t.m4, gl/m4/po.m4, gl/m4/printf-posix.m4, + gl/m4/printf.m4, gl/m4/progtest.m4, gl/m4/read-file.m4, + gl/m4/realloc.m4, gl/m4/size_max.m4, gl/m4/snprintf.m4, + gl/m4/socklen.m4, gl/m4/sockpfaf.m4, gl/m4/ssize_t.m4, + gl/m4/stdalign.m4, gl/m4/stdbool.m4, gl/m4/stddef_h.m4, + gl/m4/stdint.m4, gl/m4/stdint_h.m4, gl/m4/stdio_h.m4, + gl/m4/stdlib_h.m4, gl/m4/strcase.m4, gl/m4/string_h.m4, + gl/m4/strings_h.m4, gl/m4/strndup.m4, gl/m4/strnlen.m4, + gl/m4/strtok_r.m4, gl/m4/strverscmp.m4, gl/m4/sys_socket_h.m4, + gl/m4/sys_stat_h.m4, gl/m4/sys_time_h.m4, gl/m4/sys_types_h.m4, + gl/m4/sys_uio_h.m4, gl/m4/threadlib.m4, gl/m4/time_h.m4, + gl/m4/time_r.m4, gl/m4/uintmax_t.m4, gl/m4/ungetc.m4, + gl/m4/unistd_h.m4, gl/m4/valgrind-tests.m4, gl/m4/vasnprintf.m4, + gl/m4/vasprintf.m4, gl/m4/visibility.m4, gl/m4/vsnprintf.m4, + gl/m4/warn-on-use.m4, gl/m4/warnings.m4, gl/m4/wchar_h.m4, + gl/m4/wchar_t.m4, gl/m4/wint_t.m4, gl/m4/xsize.m4, gl/malloc.c, + gl/memchr.c, gl/memmem.c, gl/minmax.h, gl/msvc-inval.c, + gl/msvc-inval.h, gl/msvc-nothrow.c, gl/msvc-nothrow.h, + gl/netdb.in.h, gl/netinet_in.in.h, gl/printf-args.c, + gl/printf-args.h, gl/printf-parse.c, gl/printf-parse.h, + gl/read-file.c, gl/read-file.h, gl/realloc.c, gl/size_max.h, + gl/snprintf.c, gl/stdalign.in.h, gl/stdbool.in.h, gl/stddef.in.h, + gl/stdint.in.h, gl/stdio-impl.h, gl/stdio.in.h, gl/stdlib.in.h, + gl/str-two-way.h, gl/strcasecmp.c, gl/string.in.h, gl/strings.in.h, + gl/strncasecmp.c, gl/strndup.c, gl/strnlen.c, gl/strtok_r.c, + gl/strverscmp.c, gl/sys_socket.in.h, gl/sys_stat.in.h, + gl/sys_time.in.h, gl/sys_types.in.h, gl/sys_uio.in.h, + gl/tests/Makefile.am, gl/tests/binary-io.h, gl/tests/fcntl.in.h, + gl/tests/fdopen.c, gl/tests/fpucw.h, gl/tests/getpagesize.c, + gl/tests/init.sh, gl/tests/inttypes.in.h, gl/tests/macros.h, + gl/tests/signature.h, gl/tests/test-alloca-opt.c, + gl/tests/test-base64.c, gl/tests/test-binary-io.c, + gl/tests/test-byteswap.c, gl/tests/test-c-ctype.c, + gl/tests/test-errno.c, gl/tests/test-fcntl-h.c, + gl/tests/test-fdopen.c, gl/tests/test-fgetc.c, + gl/tests/test-float.c, gl/tests/test-fputc.c, + gl/tests/test-fread.c, gl/tests/test-fstat.c, + gl/tests/test-ftell.c, gl/tests/test-ftell3.c, + gl/tests/test-ftello.c, gl/tests/test-ftello3.c, + gl/tests/test-ftello4.c, gl/tests/test-func.c, + gl/tests/test-fwrite.c, gl/tests/test-getdelim.c, + gl/tests/test-getline.c, gl/tests/test-gettimeofday.c, + gl/tests/test-iconv.c, gl/tests/test-init.sh, + gl/tests/test-intprops.c, gl/tests/test-inttypes.c, + gl/tests/test-memchr.c, gl/tests/test-netdb.c, + gl/tests/test-netinet_in.c, gl/tests/test-read-file.c, + gl/tests/test-snprintf.c, gl/tests/test-stdalign.c, + gl/tests/test-stdbool.c, gl/tests/test-stddef.c, + gl/tests/test-stdint.c, gl/tests/test-stdio.c, + gl/tests/test-stdlib.c, gl/tests/test-string.c, + gl/tests/test-strings.c, gl/tests/test-strnlen.c, + gl/tests/test-strverscmp.c, gl/tests/test-sys_socket.c, + gl/tests/test-sys_stat.c, gl/tests/test-sys_time.c, + gl/tests/test-sys_types.c, gl/tests/test-sys_uio.c, + gl/tests/test-sys_wait.h, gl/tests/test-time.c, + gl/tests/test-u64.c, gl/tests/test-unistd.c, + gl/tests/test-vasnprintf.c, gl/tests/test-vasprintf.c, + gl/tests/test-vc-list-files-cvs.sh, + gl/tests/test-vc-list-files-git.sh, gl/tests/test-verify.c, + gl/tests/test-vsnprintf.c, gl/tests/test-wchar.c, + gl/tests/zerosize-ptr.h, gl/time.in.h, gl/time_r.c, gl/u64.h, + gl/unistd.in.h, gl/vasnprintf.c, gl/vasnprintf.h, gl/vasprintf.c, + gl/verify.h, gl/vsnprintf.c, gl/wchar.in.h, gl/xsize.h, + src/gl/Makefile.am, src/gl/accept.c, src/gl/alloca.in.h, + src/gl/arpa_inet.in.h, src/gl/asnprintf.c, src/gl/bind.c, + src/gl/c-ctype.c, src/gl/c-ctype.h, src/gl/close.c, + src/gl/connect.c, src/gl/dup2.c, src/gl/errno.in.h, src/gl/error.c, + src/gl/error.h, src/gl/exitfail.c, src/gl/exitfail.h, + src/gl/fd-hook.c, src/gl/fd-hook.h, src/gl/float+.h, + src/gl/float.c, src/gl/float.in.h, src/gl/fseek.c, src/gl/fseeko.c, + src/gl/fstat.c, src/gl/ftell.c, src/gl/ftello.c, + src/gl/gai_strerror.c, src/gl/getaddrinfo.c, src/gl/getdelim.c, + src/gl/getline.c, src/gl/getpass.c, src/gl/getpass.h, + src/gl/getpeername.c, src/gl/gettext.h, src/gl/gettime.c, + src/gl/gettimeofday.c, src/gl/inet_ntop.c, src/gl/inet_pton.c, + src/gl/intprops.h, src/gl/itold.c, src/gl/listen.c, src/gl/lseek.c, + src/gl/m4/00gnulib.m4, src/gl/m4/absolute-header.m4, + src/gl/m4/alloca.m4, src/gl/m4/arpa_inet_h.m4, src/gl/m4/bison.m4, + src/gl/m4/clock_time.m4, src/gl/m4/close.m4, src/gl/m4/dup2.m4, + src/gl/m4/eealloc.m4, src/gl/m4/environ.m4, src/gl/m4/errno_h.m4, + src/gl/m4/error.m4, src/gl/m4/exponentd.m4, + src/gl/m4/extensions.m4, src/gl/m4/extern-inline.m4, + src/gl/m4/float_h.m4, src/gl/m4/fseek.m4, src/gl/m4/fseeko.m4, + src/gl/m4/fstat.m4, src/gl/m4/ftell.m4, src/gl/m4/ftello.m4, + src/gl/m4/getaddrinfo.m4, src/gl/m4/getdelim.m4, + src/gl/m4/getline.m4, src/gl/m4/getpass.m4, src/gl/m4/gettime.m4, + src/gl/m4/gettimeofday.m4, src/gl/m4/gnulib-cache.m4, + src/gl/m4/gnulib-common.m4, src/gl/m4/gnulib-comp.m4, + src/gl/m4/gnulib-tool.m4, src/gl/m4/hostent.m4, + src/gl/m4/include_next.m4, src/gl/m4/inet_ntop.m4, + src/gl/m4/inet_pton.m4, src/gl/m4/intmax_t.m4, + src/gl/m4/inttypes_h.m4, src/gl/m4/largefile.m4, + src/gl/m4/longlong.m4, src/gl/m4/lseek.m4, src/gl/m4/malloc.m4, + src/gl/m4/malloca.m4, src/gl/m4/math_h.m4, src/gl/m4/memchr.m4, + src/gl/m4/minmax.m4, src/gl/m4/mktime.m4, src/gl/m4/mmap-anon.m4, + src/gl/m4/msvc-inval.m4, src/gl/m4/msvc-nothrow.m4, + src/gl/m4/multiarch.m4, src/gl/m4/netdb_h.m4, + src/gl/m4/netinet_in_h.m4, src/gl/m4/off_t.m4, + src/gl/m4/parse-datetime.m4, src/gl/m4/printf.m4, + src/gl/m4/read-file.m4, src/gl/m4/realloc.m4, src/gl/m4/select.m4, + src/gl/m4/servent.m4, src/gl/m4/setenv.m4, src/gl/m4/signal_h.m4, + src/gl/m4/size_max.m4, src/gl/m4/snprintf.m4, + src/gl/m4/socketlib.m4, src/gl/m4/sockets.m4, src/gl/m4/socklen.m4, + src/gl/m4/sockpfaf.m4, src/gl/m4/ssize_t.m4, src/gl/m4/stdalign.m4, + src/gl/m4/stdbool.m4, src/gl/m4/stddef_h.m4, src/gl/m4/stdint.m4, + src/gl/m4/stdint_h.m4, src/gl/m4/stdio_h.m4, src/gl/m4/stdlib_h.m4, + src/gl/m4/strdup.m4, src/gl/m4/strerror.m4, src/gl/m4/string_h.m4, + src/gl/m4/sys_select_h.m4, src/gl/m4/sys_socket_h.m4, + src/gl/m4/sys_stat_h.m4, src/gl/m4/sys_time_h.m4, + src/gl/m4/sys_types_h.m4, src/gl/m4/sys_uio_h.m4, + src/gl/m4/time_h.m4, src/gl/m4/time_r.m4, src/gl/m4/timespec.m4, + src/gl/m4/tm_gmtoff.m4, src/gl/m4/unistd_h.m4, + src/gl/m4/vasnprintf.m4, src/gl/m4/warn-on-use.m4, + src/gl/m4/wchar_h.m4, src/gl/m4/wchar_t.m4, src/gl/m4/wint_t.m4, + src/gl/m4/xalloc.m4, src/gl/m4/xsize.m4, src/gl/malloc.c, + src/gl/malloca.c, src/gl/malloca.h, src/gl/memchr.c, + src/gl/minmax.h, src/gl/mktime.c, src/gl/msvc-inval.c, + src/gl/msvc-inval.h, src/gl/msvc-nothrow.c, src/gl/msvc-nothrow.h, + src/gl/netdb.in.h, src/gl/netinet_in.in.h, src/gl/parse-datetime.h, + src/gl/parse-datetime.y, src/gl/printf-args.c, + src/gl/printf-args.h, src/gl/printf-parse.c, src/gl/printf-parse.h, + src/gl/progname.c, src/gl/progname.h, src/gl/read-file.c, + src/gl/read-file.h, src/gl/realloc.c, src/gl/recv.c, + src/gl/recvfrom.c, src/gl/select.c, src/gl/send.c, src/gl/sendto.c, + src/gl/setenv.c, src/gl/setsockopt.c, src/gl/shutdown.c, + src/gl/signal.in.h, src/gl/size_max.h, src/gl/snprintf.c, + src/gl/socket.c, src/gl/sockets.c, src/gl/sockets.h, + src/gl/stdalign.in.h, src/gl/stdbool.in.h, src/gl/stddef.in.h, + src/gl/stdint.in.h, src/gl/stdio-impl.h, src/gl/stdio.in.h, + src/gl/stdlib.in.h, src/gl/strdup.c, src/gl/strerror-override.c, + src/gl/strerror-override.h, src/gl/strerror.c, src/gl/string.in.h, + src/gl/sys_select.in.h, src/gl/sys_socket.in.h, + src/gl/sys_stat.in.h, src/gl/sys_time.in.h, src/gl/sys_types.in.h, + src/gl/sys_uio.in.h, src/gl/time.in.h, src/gl/time_r.c, + src/gl/timespec.h, src/gl/unistd.in.h, src/gl/unsetenv.c, + src/gl/vasnprintf.c, src/gl/vasnprintf.h, src/gl/verify.h, + src/gl/w32sock.h, src/gl/wchar.in.h, src/gl/xalloc-die.c, + src/gl/xalloc-oversized.h, src/gl/xalloc.h, src/gl/xmalloc.c, + src/gl/xsize.h: updated gnulib + +2015-01-02 Nikos Mavrogiannopoulos + + * src/cli-debug.c: gnutls-cli-debug: corrected the skip of ignored + checks + +2014-12-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-12-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-12-31 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: --pubkey-info will load a public key + from stdin + +2014-12-31 Nikos Mavrogiannopoulos + + * lib/system.h: include netinet/in.h if present to access ipv6 + related structures Based on patch by Rumko. https://savannah.gnu.org/support/?108713 + +2014-12-30 Matthias-Christian Ott + + * lib/gnutls_cipher_int.c: Don't call _gnutls_cipher_encrypt2 with + textlen = 0 in _gnutls_auth_cipher_encrypt2_tag If the plaintext is shorter than the block size of the used cipher, + _gnutls_auth_cipher_encrypt2_tag calls _gnutls_cipher_encrypt2 with + textlen = 0. By definition _gnutls_cipher_encrypt2 does nothing in + this case and thus does not need to be called. + +2014-12-30 Matthias-Christian Ott + + * lib/accelerated/x86/aes-gcm-padlock.c, + lib/accelerated/x86/aes-padlock.c: Handle zero length plaintext for + VIA PadLock functions If the plaintext is shorter than the block size of the used cipher, + _gnutls_auth_cipher_encrypt2_tag calls _gnutls_cipher_encrypt2 with + textlen = 0. padlock_ecb_encrypt and padlock_cbc_encrypt assume that + the plaintext length (last parameter) is greater than zero and + segfault otherwise. The assembler code for both functions is + automatically generated and imported from OpenSSL, so to ease + maintenance the length should be validated in the functions that + call padlock_ecb_encrypt or padlock_cbc_encrypt. + +2014-12-28 Nikos Mavrogiannopoulos + + * tests/openpgp-keyring.c: tests: enhanced openpgp-keyring test + +2014-12-28 Nikos Mavrogiannopoulos + + * lib/openpgp/output.c: openpgp: properly print names in oneline + output as well + +2014-12-28 Nikos Mavrogiannopoulos + + * lib/openpgp/output.c: updates in openpgp DSA key printing + +2014-12-28 Nikos Mavrogiannopoulos + + * lib/openpgp/output.c: properly print openpgp names + +2014-12-25 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/common.c, src/tests.c: tools: use OCSP + functions only when OCSP is enabled + +2014-12-24 Nikos Mavrogiannopoulos + + * lib/gnutls_pubkey.c: Corrected encoding and decoding of ANSI X9.62 That affects gnutls_pubkey_export_ecc_x962() and + gnutls_pubkey_import_ecc_x962(). + +2014-12-24 Nikos Mavrogiannopoulos + + * src/certtool-args.def, src/p11tool-args.def: tools: document the + available curves + +2014-12-23 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-12-23 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/pkcs11.h, lib/pkcs11.c, lib/pkcs11_int.h, + lib/pkcs11_privkey.c, lib/pkcs11_secret.c, lib/pkcs11_write.c: Use + hints to support incomplete PKCS#11 URIs + +2014-12-23 Nikos Mavrogiannopoulos + + * doc/examples/Makefile.am, src/Makefile.am, src/gl/Makefile.am, + src/gl/m4/gnulib-cache.m4, src/gl/m4/gnulib-comp.m4: completely + separated the two gnulibs to avoid conflicts + +2014-12-23 Nikos Mavrogiannopoulos + + * gl/Makefile.am, gl/m4/extensions.m4, gl/m4/extern-inline.m4, + gl/m4/gnulib-comp.m4, gl/m4/iconv.m4, gl/m4/printf.m4, + gl/m4/stdalign.m4, gl/m4/stddef_h.m4, gl/m4/stdio_h.m4, + gl/stdalign.in.h, gl/stddef.in.h, gl/tests/test-fcntl-h.c, + gl/tests/test-stddef.c, gl/unistd.in.h, gl/vasnprintf.c, + src/gl/Makefile.am, src/gl/m4/extensions.m4, + src/gl/m4/extern-inline.m4, src/gl/m4/gnulib-comp.m4, + src/gl/m4/printf.m4, src/gl/m4/stdalign.m4, src/gl/m4/stddef_h.m4, + src/gl/m4/stdio_h.m4, src/gl/parse-datetime.y, + src/gl/stdalign.in.h, src/gl/stddef.in.h, src/gl/timespec.h, + src/gl/unistd.in.h, src/gl/vasnprintf.c: updated gnulib + +2014-12-22 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-12-22 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: when importing object CAs from PKCS#11 + URL, import the marked as trusted only + +2014-12-22 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: when matching objects, also match the label + +2014-12-21 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-chainverify.c: added missing variable + +2014-12-21 Nikos Mavrogiannopoulos + + * lib/x509/Makefile.am: Added p11-kit cflags in x509/ + +2014-12-21 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-chainverify.c, tests/suite/pkcs11-combo.c, + tests/suite/pkcs11-get-issuer.c, tests/suite/pkcs11-is-known.c, + tests/suite/softhsm.h, tests/suite/testpkcs11.softhsm: Added + softhsm.h to share code in softhsm detection Conflicts: tests/suite/pkcs11-chainverify.c tests/suite/pkcs11-privkey.c + +2014-12-21 Nikos Mavrogiannopoulos + + * lib/pkcs11_int.h, lib/x509/verify-high2.c: Directly import PKCS + #11 object URLs as trusted certificates That is, don't treat them as trusted modules, because they aren't a + token URL, but rather a direct reference to specific objects. + +2014-12-19 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c, lib/gnutls_record.c: corrected documentation + for the cork/uncork functions Reported by Jaak Ristioja. + +2014-12-19 Nikos Mavrogiannopoulos + + * lib/gnutls_record.c: doc update + +2014-12-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-12-19 Nikos Mavrogiannopoulos + + * lib/algorithms/protocols.c: Added more precise version check in + _gnutls_version_lowest + +2014-11-21 Nikos Mavrogiannopoulos + + * lib/algorithms.h, lib/algorithms/protocols.c, + lib/gnutls_handshake.c, lib/gnutls_int.h, lib/gnutls_priority.c: The + record version in the client Hello will be set to the lowest + supported protocol There should have been no harm in keeping it SSL 3.0 but + unfortunately in draft-thomson-sslv3-diediedie-00 it has been marked + as MUST NOT do that. That will be fixed in a later revision but + since then there are servers not accepting SSL 3.0 as a valid record + version (note that this is about the record version, which describes + the format of the packet, nothing to do with the negotiated + version). + +2014-12-19 Nikos Mavrogiannopoulos + + * lib/gnutls_record.c: corrected documentation of gnutls_cork() + +2014-12-12 Ludovic Courtès + + * NEWS, doc/gnutls-guile.texi, guile/modules/gnutls.in, + guile/modules/gnutls/build/smobs.scm, guile/src/core.c, + guile/tests/openpgp-auth.scm, guile/tests/x509-auth.scm: Revert + "guile: Remove RSA parameters and related procedures." This reverts commit 9f5788469f6f3f3fdd4cf064621a903607f10f2f; this + will be done in the 3.4 branch, as for the C library. Update NEWS + accordingly. + +2014-12-12 Ludovic Courtès + + * NEWS: Update 'NEWS'. + +2014-12-11 Ludovic Courtès + + * guile/tests/openpgp-keyring.scm: guile: Open binary file in binary + mode, for the sake of MinGW. Reported by Eli Zaretskii . * guile/tests/openpgp-keyring.scm: Use 'open-file' with "rb" instead + of 'open-input-file'. + +2014-12-11 Ludovic Courtès + + * guile/src/Makefile.am: guile: Link with '-no-undefined'. Fixes builds on MinGW. Reported by Eli Zaretskii . * guile/src/Makefile.am (guile_gnutls_v_2_la_LDFLAGS): Add -no-undefined. + +2014-12-04 Ludovic Courtès + + * guile/src/Makefile.am: guile: Build with warnings. * guile/src/Makefile.am (AM_CFLAGS) [HAVE_GCC]: Add -Wall -Wextra -Wno-unused-parameter. + +2014-12-04 Ludovic Courtès + + * guile/modules/Makefile.am, guile/modules/gnutls.in, + guile/modules/gnutls/build/priorities.scm, guile/src/Makefile.am, + guile/src/core.c, guile/src/make-session-priorities.scm, + guile/tests/session-record-port.scm, guile/tests/x509-auth.scm: + guile: Remove the deprecated priority API. * guile/modules/gnutls/build/priorities.scm: Remove. * guile/src/make-session-priorities.scm: Remove. * guile/modules/Makefile.am (EXTRA_DIST): Adjust accordingly. * guile/src/Makefile.am (EXTRA_DIST): Likewise. (GENERATED_BINDINGS): Remove 'priorities.i.c'. (priorities.i.c): Remove target. * guile/src/core.c: Don't include it. (scm_gnutls_set_default_priority_x): Remove. * guile/modules/gnutls.in (gnutls): Adjust export list. * guile/tests/session-record-port.scm: Use + 'set-session-priorities!'. * guile/tests/x509-auth.scm: Likewise. + +2014-12-04 Ludovic Courtès + + * doc/gnutls-guile.texi, guile/modules/gnutls.in, + guile/modules/gnutls/build/smobs.scm, guile/src/core.c, + guile/tests/openpgp-auth.scm, guile/tests/x509-auth.scm: guile: + Remove RSA parameters and related procedures. * guile/modules/gnutls/build/smobs.scm (%rsa-parameters-smob): + Remove. (%gnutls-smobs): Remove it. * guile/src/core.c (scm_gnutls_make_rsa_parameters, scm_gnutls_pkcs1_import_rsa_parameters, scm_gnutls_pkcs1_export_rsa_parameters, scm_gnutls_set_certificate_credentials_rsa_export_params_x): + Remove. * guile/modules/gnutls.in: Adjust export list. * guile/tests/openpgp-auth.scm (import-rsa-params): Remove. Remove references to it and to 'set-certificate-credentials-rsa-export-parameters!'. * guile/tests/x509-auth.scm: Likewise. * doc/gnutls-guile.texi (Representation of Binary Data): Remove references to RSA parameters. Adjust example accordingly. (OpenPGP Authentication Guile Example): Likewise. + +2014-12-12 Nikos Mavrogiannopoulos + + * lib/random.c: gnutls_rnd: doc update + +2014-12-12 Nikos Mavrogiannopoulos + + * lib/x509/pkcs12.c: gnutls_pkcs12_simple_parse: doc update + +2014-12-12 Nikos Mavrogiannopoulos + + * libdane/dane.c: improved documentation on dane + +2014-12-11 Nikos Mavrogiannopoulos + + * src/pkcs11.c: p11tool: use Sleep() in windows + +2014-12-11 Nikos Mavrogiannopoulos + + * src/certtool-cfg.c: certtool: ensure that default_serial_int is + 64-bits or more + +2014-12-11 Nikos Mavrogiannopoulos + + * src/socket.c: use select() instead of alarm for better portability Based on patch by Eli Zaretskii. + +2014-12-11 Nikos Mavrogiannopoulos + + * NEWS: released 3.3.11 + +2014-12-11 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2014-12-11 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-main: testcompat: corrected usage of null + cipher + +2014-12-10 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-fips.c: added the .check function in FIPS140-2 code + +2014-12-05 Nikos Mavrogiannopoulos + + * lib/x509/dn.c: _gnutls_x509_get_dn() always return a null + terminated string + +2014-12-02 Nikos Mavrogiannopoulos + + * lib/random.h: if the rnd structure doesn't provide check, + _gnutls_rnd_check() will succeed + +2014-11-30 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: Reorganized, and eliminated memory leak in + _gnutls_x509_crt_check_revocation() Reported by Tim Rühsen. + +2014-11-28 Nikos Mavrogiannopoulos + + * lib/includes/gnutls/gnutls.h.in, lib/includes/gnutls/pkcs11.h: doc + update + +2014-11-25 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/tests.c, src/tests.h: gnutls-cli-debug: Added + check for whether %NO_EXTENSIONS is required + +2014-11-28 Nikos Mavrogiannopoulos + + * lib/gnutls_ui.c: gnutls_session_get_desc: allow proper printing of + the NULL KX + +2014-11-25 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: gnutls_certificate_set_x509_key_*: eliminated + memory leak when certificate could not be parsed Reported by Georg Richter. + +2014-11-24 Nikos Mavrogiannopoulos + + * src/socket.c: gnutls-cli-debug: do not print error on unknown + protocols + +2014-11-24 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: documented the limitations of the loading + functions + +2014-11-24 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: corrected memleak in read_key_mem() Patch by Georg Richter. + +2014-11-24 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/tests.c, src/tests.h: gnutls-cli-debug: Added + check for sorted certificate chain + +2014-11-22 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_record.c, + tests/mini-rehandshake-2.c: restore only the documented behavior + +2014-11-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-21 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/mini-rehandshake-2.c: tests: added test + for GNUTLS_E_GOT_APPLICATION_DATA on rehandshake Conflicts: tests/Makefile.am + +2014-11-21 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_record.c: treat + GNUTLS_E_GOT_APPLICATION_DATA as non-fatal if initial negotiation is + complete This corrects a regression introduced in + b5a0de2e6da98866cafb770c3141b7353d030ab2 Reported by Dan Winship. + https://savannah.gnu.org/support/?108690 + +2014-11-21 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-21 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: Revert "The priority modifier + %LATEST_RECORD_VERSION is now the default" This reverts commit 96b408b20fe8707306f38cba6f652556b99a47e4. + +2014-11-13 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.c: _rnd_get_event: use memset to avoid + valgrind complaints + +2014-11-21 Nikos Mavrogiannopoulos + + * lib/fips.c: compilation fix for FIPS140-2 mode + +2014-11-21 Nikos Mavrogiannopoulos + + * lib/x509/ocsp.c: deinitialize the OCSP response der data That also makes sure that reinitialization of ASN1 structures are + done when it is required only. + +2014-11-17 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: NORMAL priority: prioritize the less than + 256-bits curves at the lowest level + +2014-11-16 Nikos Mavrogiannopoulos + + * lib/fips.c, lib/fips.h, lib/gnutls_global.c: properly reset the + zombie mode in FIPS mode This amends 9158f590f4a18c84fc9eb41877b29d73b30af879 + +2014-11-15 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-14 David Weber + + * src/cli.c, src/serv.c: Fixed SRTP profile configuration in cli.c + and serv.c. I have tested the fix in 3.3.10. This commit is UNTESTED as i am + unable to compile gnutls (./configure complains about gl_INIT and + ggl_INIT). Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-14 Nikos Mavrogiannopoulos + + * src/common.c: gnutls-cli: print info on the OCSP status request + +2014-11-14 Nikos Mavrogiannopoulos + + * lib/x509/ocsp.c: use the original DER/BER data when verifying an + OCSP response Conflicts: lib/x509/ocsp.c + +2014-11-14 Nikos Mavrogiannopoulos + + * lib/system.c: windows: updated _gnutls_ucs2_to_utf8() + +2014-11-14 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/tests.c, src/tests.h: gnutls-cli-debug: check + for OCSP status response Conflicts: src/tests.c + +2014-11-13 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/tests.c, src/tests.h: added check for servers + that disallow the SSL 3.0 record version + +2014-11-14 Nikos Mavrogiannopoulos + + * tests/cert-tests/crq: corrected crq test case; reported by Andreas + Metzler + +2014-11-13 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: set the GNUTLS_PIN_CONTEXT_SPECIFIC flag on PIN + callback + +2014-11-13 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.h: rnd: removed the packed attribute from + event_st That prevents a SIGBUS on solaris sparc systems. Reported by Thomas + Thorberger. + +2014-11-13 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-13 Nikos Mavrogiannopoulos + + * lib/gnutls_priority.c: The priority modifier + %LATEST_RECORD_VERSION is now the default This works-around issue with servers that forbit the SSL 3.0 version + number from the first packet of the record protocol. + +2014-11-10 Nikos Mavrogiannopoulos + + * tests/suite/testcompat-common, tests/suite/testcompat-main: + testcompat: updated + +2014-11-10 Nikos Mavrogiannopoulos + + * configure.ac, m4/hooks.m4: bumped version + +2014-11-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-31 Nikos Mavrogiannopoulos + + * configure.ac, tests/cert-tests/Makefile.am, tests/cert-tests/crq: + Added check with the invalid crq sent by Sean Burford + +2014-10-31 Nikos Mavrogiannopoulos + + * lib/gnutls_ecc.c: when exporting curve coordinates to X9.63 + format, perform additional sanity checks on input Reported by Sean Burford. + +2014-11-08 Nikos Mavrogiannopoulos + + * doc/cha-intro-tls.texi: doc update + +2014-11-08 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi, doc/cha-intro-tls.texi: doc: updated text + on session tickets + +2014-11-07 Nikos Mavrogiannopoulos + + * src/socket.c: tools: include arpa/inet.h in socket.c + +2014-11-07 Nikos Mavrogiannopoulos + + * doc/examples/ex-serv-dtls.c: doc: use the same port for DTLS + client and server + +2014-11-07 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: pass the correct user type to protected + authentication login + +2014-11-07 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: doc: corrected values for INSECURE level + +2014-11-07 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-07 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h: pkcs11_login: set the correct user + type on reauthentication + +2014-11-06 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h, lib/pkcs11_privkey.c: pkcs11: + force login on tokens that require it + +2014-11-06 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/pkcs11_int.h, lib/pkcs11_privkey.c: added + support for PKCS #11 keys that require reauthentication and + simplified pkcs11_login + +2014-11-06 Nikos Mavrogiannopoulos + + * gl/unistd.in.h, src/gl/unistd.in.h: applied patch by A. Klitzing + to improve compatibile with some apple systems Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-05 Nikos Mavrogiannopoulos + + * src/cli-debug.c, src/common.c, src/common.h, src/tests.c: + gnutls-cli-debug: backported changes from 3.4.0 branch + +2014-11-05 Chen Hongzhi + + * lib/x509/pkcs12.c: Fix double-free in gnutls_pkcs12_simple_parse() Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-04 Nikos Mavrogiannopoulos + + * doc/scripts/mytexi2latex: mytexi2latex: handle na@"ive + +2014-11-04 Chris Barry + + * doc/cha-auth.texi, doc/cha-cert-auth.texi, + doc/cha-cert-auth2.texi, doc/cha-errors.texi, doc/sec-tls-app.texi: + Cleaning up some awkward phrasings. Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-04 Nikos Mavrogiannopoulos + + * lib/ext/alpn.c: updated text + +2014-11-03 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-11-03 Jaak Ristioja + + * lib/system_override.c: doc: Added missing reference for EMSGSIZE + to inline documentation of gnutls_transport_set_errno(). Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-03 Jaak Ristioja + + * lib/system_override.c: doc: Fixed typo in inline comment of + gnutls_transport_set_errno(). Signed-off-by: Nikos Mavrogiannopoulos + +2014-11-02 Nikos Mavrogiannopoulos + + * lib/gnutls_errors.c: updated the text for + GNUTLS_E_UNSUPPORTED_VERSION_PACKET + +2014-11-01 Nikos Mavrogiannopoulos + + * lib/x509/common.c: when calling gnutls_x509_crt_get_subject_key_id + set the id_size + +2014-11-01 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: deinitialize the temporary spki data + +2014-10-31 Nikos Mavrogiannopoulos + + * tests/Makefile.am, tests/init_fds.c: tests: added test for + gnutls_global_init after all descriptors are closed Conflicts: tests/Makefile.am + +2014-10-31 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c, lib/nettle/rnd-common.c, lib/random.h: + corrected check for urandom fd + +2014-10-31 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c: corrected exit state from gnutls_global_init + +2014-10-31 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-31 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: updated text for gnutls_fd_in_use() to + account the new behavior + +2014-10-31 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c, lib/includes/gnutls/gnutls.h.in, + lib/libgnutls.map, lib/nettle/rnd-common.c: dropped + gnutls_fd_in_use, it is no longer necessary Conflicts: lib/libgnutls.map + +2014-10-31 Nikos Mavrogiannopoulos + + * lib/crypto-backend.h, lib/gnutls_global.c, + lib/nettle/rnd-common.c, lib/nettle/rnd-common.h, lib/nettle/rnd.c, + lib/random.h: When gnutls_global_init() is called manually from the + application check the urandom fd for validity That addresses the issue where a server closes all open file + descriptors and then calls gnutls_global_init(). Conflicts: lib/nettle/rnd-common.c + +2014-10-29 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: _gnutls_dh_generate_key() will account the q_bits + +2014-10-29 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-28 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-28 Nikos Mavrogiannopoulos + + * lib/nettle/rnd.c: doc update + +2014-10-28 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: do not explicitly refresh rnd state on session + deinit It is already being refreshed during the session lifetime. + +2014-10-26 Nikos Mavrogiannopoulos + + * configure.ac: disable hardware acceleration by default in solaris + +2014-10-25 Nikos Mavrogiannopoulos + + * tests/dtls/dtls: tests: dtls-stress -r disabled as it causes + issues when used with freebsd kernel + +2014-10-25 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/elf/aes-ssse3-x86.s, + lib/accelerated/x86/elf/aes-ssse3-x86_64.s, + lib/accelerated/x86/elf/aesni-x86.s, + lib/accelerated/x86/elf/aesni-x86_64.s, + lib/accelerated/x86/elf/cpuid-x86.s, + lib/accelerated/x86/elf/cpuid-x86_64.s, + lib/accelerated/x86/elf/e_padlock-x86.s, + lib/accelerated/x86/elf/e_padlock-x86_64.s, + lib/accelerated/x86/elf/ghash-x86_64.s, + lib/accelerated/x86/elf/sha1-ssse3-x86.s, + lib/accelerated/x86/elf/sha1-ssse3-x86_64.s, + lib/accelerated/x86/elf/sha256-avx-x86_64.s, + lib/accelerated/x86/elf/sha256-ssse3-x86.s, + lib/accelerated/x86/elf/sha512-ssse3-x86.s, + lib/accelerated/x86/elf/sha512-ssse3-x86_64.s: do not use the ifdef + directive in assembly files, as it isn't portable + +2014-10-23 Nikos Mavrogiannopoulos + + * configure.ac, lib/Makefile.am: check and use libnsl (used in + solaris) + +2014-10-23 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/elf/aes-ssse3-x86.s, + lib/accelerated/x86/elf/aes-ssse3-x86_64.s, + lib/accelerated/x86/elf/aesni-x86.s, + lib/accelerated/x86/elf/aesni-x86_64.s, + lib/accelerated/x86/elf/cpuid-x86.s, + lib/accelerated/x86/elf/cpuid-x86_64.s, + lib/accelerated/x86/elf/e_padlock-x86.s, + lib/accelerated/x86/elf/e_padlock-x86_64.s, + lib/accelerated/x86/elf/ghash-x86_64.s, + lib/accelerated/x86/elf/sha1-ssse3-x86.s, + lib/accelerated/x86/elf/sha1-ssse3-x86_64.s, + lib/accelerated/x86/elf/sha256-avx-x86_64.s, + lib/accelerated/x86/elf/sha256-ssse3-x86.s, + lib/accelerated/x86/elf/sha512-ssse3-x86.s, + lib/accelerated/x86/elf/sha512-ssse3-x86_64.s: use the + .note.GNU-stack in linux systems only + +2014-10-23 Nikos Mavrogiannopoulos + + * gl/Makefile.am, gl/m4/extern-inline.m4, gl/m4/gnulib-common.m4, + gl/m4/manywarnings.m4, gl/m4/stdlib_h.m4, gl/m4/threadlib.m4, + gl/m4/unistd_h.m4, gl/stdlib.in.h, gl/tests/fcntl.in.h, + gl/unistd.in.h, gl/vasnprintf.c, maint.mk, src/gl/Makefile.am, + src/gl/error.c, src/gl/getpass.c, src/gl/m4/extern-inline.m4, + src/gl/m4/gnulib-common.m4, src/gl/m4/stdlib_h.m4, + src/gl/m4/unistd_h.m4, src/gl/parse-datetime.y, src/gl/stdlib.in.h, + src/gl/sys_select.in.h, src/gl/unistd.in.h, src/gl/vasnprintf.c: + updated gnulib + +2014-10-23 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-23 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-get-issuer.c: tests: check the issuer value + validity of gnutls_x509_trust_list_get_issuer + +2014-10-23 Nikos Mavrogiannopoulos + + * lib/x509/verify-high.c: corrected bug in + gnutls_x509_trust_list_get_issuer() when used without the + GNUTLS_TL_GET_COPY flag + +2014-10-22 Nikos Mavrogiannopoulos + + * tests/slow/Makefile.am: tests: include minitasn1 when needed + +2014-10-22 Nikos Mavrogiannopoulos + + * src/danetool.c: use HAVE_DANE ifdef for unused functions + +2014-10-22 Nikos Mavrogiannopoulos + + * lib/libgnutls.map: exported gnutls_fd_in_use + +2014-10-22 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-22 Nikos Mavrogiannopoulos + + * doc/cha-gtls-app.texi: document gnutls_fd_in_use() + +2014-10-22 Nikos Mavrogiannopoulos + + * lib/pkcs11_privkey.c: corrected FIND_OBJECT loop when the token + func is used + +2014-10-22 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c: gnutls_fd_in_use: mention version + +2014-10-22 Nikos Mavrogiannopoulos + + * lib/gnutls_state.c, lib/includes/gnutls/gnutls.h.in, + lib/nettle/rnd-common.c, lib/random.h: added gnutls_fd_in_use() to + check whether a file descriptor is in use + +2014-10-21 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: fips140-2: limit the FIPS code in fips mode + +2014-10-21 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: fips140-2: use the FIPS algorithms only when in + FIPS140-2 mode + +2014-10-20 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-08-05 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: default pkcs-cipher is now 3des as in + PKCS #12 + +2014-10-17 Nikos Mavrogiannopoulos + + * src/cli-args.def: gnutls-cli: prevent the combination of the -p + and --list options As -p may be mistaken for --priority that would prevent wrong + outputs. + +2014-10-17 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: avoid d from getting out of scope + +2014-10-17 Nikos Mavrogiannopoulos + + * src/udp-serv.c: gnutls-serv: avoid possible buffer overrun + +2014-10-17 Nikos Mavrogiannopoulos + + * lib/x509/privkey.c: avoid memory leak on + gnutls_x509_privkey_generate() failure + +2014-10-15 Nikos Mavrogiannopoulos + + * lib/nettle/int/dsa-fips.h, lib/nettle/int/dsa-keygen-fips186.c, + lib/nettle/int/dsa-validate.c: in FIPS140-2 mode only disable + 1024-bit DSA parameters when generating + +2014-10-14 Ludovic Courtès + + * guile/src/core.c: guile: Remove trailing zero in + 'gnutls_server_name_set' call. In GnuTLS 3.2.19 (and possibly 3.3.9 and 3.1.17), + 'set-session-server-name!' would pass a trailing nul character on + the wire after the server name, which would thus be rejected by + servers. + +2014-10-14 Nikos Mavrogiannopoulos + + * lib/nettle/int/dsa-fips.h, lib/nettle/int/provable-prime.c, + lib/nettle/int/rsa-keygen-fips186.c: FIPS140-2 RSA key generation + changes to account for seed starting with null byte + +2014-10-14 Nikos Mavrogiannopoulos + + * src/libopts/Makefile.am: corrected libopt's Makefile.am reported by Marius Schamschula. + +2014-10-10 Nikos Mavrogiannopoulos + + * lib/nettle/int/rsa-keygen-fips186.c: use lcm(p-1,q-1) instead of + phi(n) for RSA key generation in FIPS-140-2 mode + +2014-10-14 Nikos Mavrogiannopoulos + + * lib/accelerated/x86/sha-x86-ssse3.c: corrected the SSSE3 optimized + SHA224 + +2014-10-14 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.c: simplified getrusage code; the failure + check code wasn't needed + +2014-10-13 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-13 Nikos Mavrogiannopoulos + + * tests/x509-extensions.c: tests: added check for import failure of + v1 certificate with extensions + +2014-10-13 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: do not allow importing X.509 certificates with + version < 3 and extensions present + +2014-10-13 Nikos Mavrogiannopoulos + + * cfg.mk: update the guile manual along the C one + +2014-10-13 Nikos Mavrogiannopoulos + + * NEWS, configure.ac, m4/hooks.m4: bumped version + +2014-10-13 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-11 Nikos Mavrogiannopoulos + + * src/libopts/Makefile.am, src/libopts/ag-char-map.h, + src/libopts/ao-strs.c, src/libopts/ao-strs.h, + src/libopts/autoopts.h, src/libopts/autoopts/options.h, + src/libopts/autoopts/usage-txt.h, src/libopts/compat/_Noreturn.h, + src/libopts/genshell.c, src/libopts/genshell.h, + src/libopts/intprops.h, src/libopts/m4/libopts.m4, + src/libopts/m4/stdnoreturn.m4, src/libopts/option-value-type.c, + src/libopts/option-value-type.h, + src/libopts/option-xat-attribute.c, + src/libopts/option-xat-attribute.h, src/libopts/parse-duration.c, + src/libopts/proto.h, src/libopts/stdnoreturn.in.h, + src/libopts/version.c: updated to libopts 5.18.4 + +2014-10-11 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.c: place all rusage variables into + HAVE_GETRUSAGE block + +2014-10-11 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-11 Nikos Mavrogiannopoulos + + * lib/nettle/rnd-common.c: rnd: if RUSAGE_THREAD fails try + RUSAGE_SELF + +2014-10-10 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-combo.c: tests: pkcs11-combo: use unique db + file + +2014-10-10 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-02 Nikos Mavrogiannopoulos + + * lib/ext/session_ticket.c: use wait and retransmit when receiving + session tickets + +2014-10-02 Nikos Mavrogiannopoulos + + * tests/dtls/dtls, tests/dtls/dtls-stress.c: tests: added -r option + to dtls-stress That allows it to replay messages in a kind of arbitrary way. + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/ext/heartbeat.c: forbid heartbeat messages during a handshake + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_int.h, lib/gnutls_state.c: + added internal variable to track handshake status Conflicts: lib/gnutls_handshake.c + +2014-10-09 Nikos Mavrogiannopoulos + + * .gitignore: more files to ignore + +2014-10-09 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-is-known.c: tests: updated time in + pkcs11-is-known + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: handle errors from override_cert_exts as + fatal + +2014-10-09 Nikos Mavrogiannopoulos + + * tests/chainverify.c, tests/suite/pkcs11-chainverify.c, + tests/test-chains.h: tests: allow running specific chainverify tests + on fixed dates Conflicts: tests/chainverify.c tests/suite/pkcs11-chainverify.c tests/test-chains.h + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/x509/common.c: _gnutls_check_valid_key_id: corrected + activation/expiration check + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/x509/common.c, lib/x509/common.h: pkcs11: + simplified and optimized loop + +2014-10-09 Nikos Mavrogiannopoulos + + * doc/cha-crypto.texi: mention nettle as the recommended crypto + backend + +2014-10-09 Nikos Mavrogiannopoulos + + * tests/suite/Makefile.am, tests/suite/pkcs11-combo.c: tests: Added + check to ensure that trust list combination with extra certificates + works + +2014-10-09 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/x509/verify-high.c: when both a trust module and additional + CAs are present account the latter as well That solves an issue in openconnect which used the system trust + module, plus additional certificates. Conflicts: lib/x509/verify-high.c + +2014-10-09 Nikos Mavrogiannopoulos + + * lib/x509/verify-high.c, lib/x509/verify-high.h: simplify the + handling of trust_list_get_issuer() when GNUTLS_TL_GET_COPY is not + given + +2014-10-08 Nikos Mavrogiannopoulos + + * lib/nettle/pk.c: corrected assignment + +2014-10-08 Nikos Mavrogiannopoulos + + * lib/libgnutls.map: corrected the name of exported function + +2014-10-07 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-07 Nikos Mavrogiannopoulos + + * tests/test-chains.h: tests: corrected test for v1 cert signing + (removed bogus authorityIdentifier) + +2014-10-07 Nikos Mavrogiannopoulos + + * src/certtool.c: certtool: only set the authority key identifier, + if there is a corresponding subject key identifier + +2014-10-07 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: do not shortcut checks when + GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY is specified + +2014-10-07 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/x509/common.c, lib/x509/common.h: pkcs11: always + check for a valid subjectKeyIdentifier match That way, expired certificates can co-exist with their replacements. + +2014-10-06 Armin Burgmeier + + * lib/x509/verify-high2.c: Return an error if multiple PKCS11 URLs + are added to a trust list Before, the new URL would overwrite the old URL, and the memory of + theold URL would be leaked. It is documented that only one URL can + be used, so it should be safe to reject any attempt to add another + one. Signed-off-by: Armin Burgmeier + +2014-10-07 Nikos Mavrogiannopoulos + + * lib/pkcs11.c, lib/x509/common.c, lib/x509/common.h: pkcs11: when + no CKA_ID can be relied on fallback on checking the + SubjectKeyIdentifier Patch by David Woodhouse. + +2014-10-02 Nikos Mavrogiannopoulos + + * lib/gnutls_global.c: report the FIPS140-2 mode + +2014-10-07 Nikos Mavrogiannopoulos + + * lib/libgnutls.map, lib/nettle/pk.c: added FIPS140-2 ECDH + verification functions + +2014-10-07 Nikos Mavrogiannopoulos + + * lib/libgnutls.map, lib/nettle/pk.c: added FIPS140-2 DH + verification functions + +2014-10-07 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-is-known.c: tests: corrected check with + gnutls_x509_trust_list_get_issuer + +2014-10-06 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: corrected remove_pkcs11_url() + +2014-10-06 Nikos Mavrogiannopoulos + + * tests/suite/Makefile.am, tests/suite/pkcs11-is-known.c: tests: + check gnutls_pkcs11_crt_is_known() when multiple same DNs are + present + +2014-10-06 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: pkcs11: when checking for presence do not give up on + the first mismatch + +2014-10-06 Nikos Mavrogiannopoulos + + * lib/pkcs11.c: address memory leak in gnutls_pkcs11_crt_is_known() + +2014-10-05 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: doc update: clarifications in + gnutls_x509_trust_list_add_trust_file + +2014-10-02 Nikos Mavrogiannopoulos + + * lib/x509/verify-high.c: corrected compilation for non-pkcs11; + reported by David Woodhouse. + +2014-09-29 Nikos Mavrogiannopoulos + + * NEWS: corrected typo + +2014-10-01 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-10-01 Nikos Mavrogiannopoulos + + * tests/suite/pkcs11-get-issuer.c, tests/x509cert.c: tests: added + check for GNUTLS_TL_GET_COPY + +2014-10-01 Nikos Mavrogiannopoulos + + * lib/gnutls_cert.c, lib/gnutls_x509.c, lib/includes/gnutls/x509.h, + lib/x509/ocsp.c, lib/x509/verify-high.c: Added GNUTLS_TL_GET_COPY + flag and documented the limitations of + gnutls_x509_trust_list_get_issuer() + +2014-09-30 Nikos Mavrogiannopoulos + + * lib/opencdk/stream.h: opencdk: changed filter_fnct_t to match the + actual function prototypes + +2014-09-30 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-09-26 Nikos Mavrogiannopoulos + + * lib/gnutls_buffers.c, lib/gnutls_handshake.c: do not allow + GNUTLS_E_LARGE_PACKET to be returned from non-DTLS sessions + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/system.c: gnutls_x509_trust_list_add_system_trust() will not + allow duplicate entries + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/x509/verify-high2.c: use _DIRENT_HAVE_D_TYPE to detect + d->d_type + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/x509/x509.c: corrected type + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_int.h, lib/gnutls_state.c: + protect DTLS clients that don't handle GNUTLS_E_LARGE_PACKET from an + infinite loop on handshake + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/gnutls_errors.c: removed unused error values + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/gnutls_handshake.c, lib/gnutls_record.c, lib/gnutls_record.h: + restrict the number of non-fatal errors gnutls_handshake() can + return + +2014-09-25 Nikos Mavrogiannopoulos + + * lib/gnutls_errors.c: optimized gnutls_error_is_fatal() by + splitting the errors to two tables + +2014-09-22 Ludovic Courtès + + * guile/src/core.c: guile: Restore cross-reference in + 'set-session-priorities!' docstring. This had been destroyed in 32d90395. + +2014-09-22 Ludovic Courtès + + * guile/modules/gnutls.in, guile/modules/gnutls/build/enums.scm, + guile/src/core.c, guile/tests/anonymous-auth.scm: guile: Add + bindings for 'gnutls_server_name_set'. This adds the 'set-session-server-name!' procedure and the + 'server-name-type' enum type. + +2014-09-18 Armin Burgmeier + + * lib/x509/verify-high.c: Memory leak fix on certificate copy + failure Signed-off-by: Armin Burgmeier + +2014-09-17 Armin Burgmeier + + * lib/gnutls_ui.c: Fix a documentation typo Signed-off-by: Armin Burgmeier + +2014-09-19 Nikos Mavrogiannopoulos + + * cfg.mk, lib/accelerated/x86/files.mk: regenerated files.mk + +2014-09-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-09-19 Nikos Mavrogiannopoulos + + * libdane/dane.c: libdane: do not require the CA to be a direct CA + +2014-09-19 Nikos Mavrogiannopoulos + + * NEWS: doc update + +2014-09-19 Nikos Mavrogiannopoulos + + * tests/scripts/common.sh, tests/suite/testpkcs11: tests: enhanced + test suite to pass more of the PKCS #11 API under valgrind + +2014-09-19 Nikos Mavrogiannopoulos + + * src/serv-args.def, src/serv.c: gnutls-serv: added the --provider + option + +2014-09-19 Nikos Mavrogiannopoulos + + * src/common.c: tools: corrected pin entry + +2014-09-19 Nikos Mavrogiannopoulos + + * lib/gnutls_x509.c: cleaned up memory deallocation in + read_cert_url() That caused unexpected results when loading PKCS #11 URLs. Reported + by Joseph Peruski. + +2014-09-18 Nikos Mavrogiannopoulos + + * doc/certtool.cfg: updated certtool.cfg + 2014-09-18 Nikos Mavrogiannopoulos * doc/Makefile.am, doc/manpages/Makefile.am, symbols.last: updated @@ -138,7 +4606,7 @@ lib/pkcs11_int.c, lib/pkcs11_int.h, lib/x509/common.h, lib/x509/output.c, lib/x509/x509_ext.c: allow retrieving extensions in a trust module using - GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT Conflicts: lib/pkcs11.c + GNUTLS_PKCS11_OBJ_FLAG_OVERWRITE_TRUSTMOD_EXT Conflicts: lib/pkcs11.c 2014-09-10 Nikos Mavrogiannopoulos @@ -156,7 +4624,7 @@ lib/includes/gnutls/x509.h, lib/libgnutls.map, lib/x509/verify-high.c: gnutls_x509_trust_list_verify_crt2 is in par with gnutls_certificate_verify_peers That is, it accepts a list of gnutls_typed_vdata_st and allows for - flexibility. Conflicts: lib/libgnutls.map + flexibility. Conflicts: lib/libgnutls.map 2014-09-08 Nikos Mavrogiannopoulos @@ -172,7 +4640,7 @@ * lib/gnutls_x509.c, lib/includes/gnutls/x509.h, lib/libgnutls.map, lib/x509/verify-high.c: Added - gnutls_x509_trust_list_verify_purpose_crt() Conflicts: lib/libgnutls.map + gnutls_x509_trust_list_verify_purpose_crt() Conflicts: lib/libgnutls.map 2014-09-13 Nikos Mavrogiannopoulos @@ -190,7 +4658,7 @@ 2014-09-13 Nikos Mavrogiannopoulos * tests/Makefile.am, tests/crlverify.c: tests: Added crlverify to - check gnutls_x509_crl_verify and gnutls_x509_trust_list_add_crls Conflicts: tests/Makefile.am + check gnutls_x509_crl_verify and gnutls_x509_trust_list_add_crls Conflicts: tests/Makefile.am 2014-09-13 Nikos Mavrogiannopoulos @@ -418,7 +4886,7 @@ rounds One round is before the AES acceleration is registered, and the second is after. That is to allow testing of the AES implementation used in the DRBG. That is a hack until nettle handles all cipher - acceleration. Conflicts: lib/gnutls_global.c + acceleration. Conflicts: lib/gnutls_global.c 2014-09-01 Nikos Mavrogiannopoulos @@ -943,7 +5411,7 @@ * lib/includes/gnutls/pkcs11.h, lib/libgnutls.map, lib/pkcs11_privkey.c, src/pkcs11.c: changed semantics of gnutls_pkcs11_privkey_get_pubkey; named - gnutls_pkcs11_privkey_export_pubkey Conflicts: lib/libgnutls.map + gnutls_pkcs11_privkey_export_pubkey Conflicts: lib/libgnutls.map 2014-08-06 Nikos Mavrogiannopoulos @@ -1007,7 +5475,7 @@ 2014-07-31 Nikos Mavrogiannopoulos * lib/nettle/rnd-common.c, lib/system.h, lib/x509/verify-high2.c: - several windows compilation fixes Conflicts: lib/atfork.h + several windows compilation fixes Conflicts: lib/atfork.h 2014-07-29 Nikos Mavrogiannopoulos @@ -2683,9 +7151,9 @@ lib/accelerated/x86/aes-padlock.c, lib/accelerated/x86/sha-padlock.c, lib/accelerated/x86/sha-x86-ssse3.c, - lib/accelerated/x86/x86-common.c, lib/accelerated/x86/x86-common.h, - lib/accelerated/x86/x86.h: x86.h was renamed to x86-common.h to - avoid clashes with system headers. + lib/accelerated/x86/x86-common.c, lib/accelerated/x86/{x86.h => + x86-common.h}: x86.h was renamed to x86-common.h to avoid clashes + with system headers. 2014-04-27 Nikos Mavrogiannopoulos @@ -3323,18 +7791,16 @@ 2014-04-03 Nikos Mavrogiannopoulos - * configure.ac, tests/Makefile.am, tests/key-id/Makefile.am, - tests/key-id/README, tests/key-id/ca-gnutls-keyid.pem, - tests/key-id/ca-no-keyid.pem, tests/key-id/ca-weird-keyid.pem, - tests/key-id/key-ca.pem, tests/key-id/key-id, - tests/key-id/key-user.pem, tests/key-tests/Makefile.am, - tests/key-tests/README, tests/key-tests/ca-gnutls-keyid.pem, - tests/key-tests/ca-no-keyid.pem, - tests/key-tests/ca-weird-keyid.pem, tests/key-tests/key-ca-1234.p8, + * configure.ac, tests/Makefile.am, tests/{key-id => + key-tests}/Makefile.am, tests/{key-id => key-tests}/README, + tests/{key-id => key-tests}/ca-gnutls-keyid.pem, tests/{key-id => + key-tests}/ca-no-keyid.pem, tests/{key-id => + key-tests}/ca-weird-keyid.pem, tests/key-tests/key-ca-1234.p8, tests/key-tests/key-ca-empty.p8, tests/key-tests/key-ca-null.p8, - tests/key-tests/key-ca.pem, tests/key-tests/key-id, - tests/key-tests/key-user.pem, tests/key-tests/pkcs8: Added self-test - for PKCS #8 key conversion and reading + tests/{key-id => key-tests}/key-ca.pem, tests/{key-id => + key-tests}/key-id, tests/{key-id => key-tests}/key-user.pem, + tests/key-tests/pkcs8: Added self-test for PKCS #8 key conversion + and reading 2014-04-03 Nikos Mavrogiannopoulos @@ -3843,9 +8309,9 @@ 2014-03-06 Kevin Cernekee - * .gitignore, doc/manpages/Makefile.am, src/Makefile.am, - src/psk-args.def, src/psk.c, src/psktool-args.def: Rename - psk-args.def to psktool-args.def Other utilities generate invoke-%.texi from %-args.def, but + * .gitignore, doc/manpages/Makefile.am, src/Makefile.am, src/psk.c, + src/{psk-args.def => psktool-args.def}: Rename psk-args.def to + psktool-args.def Other utilities generate invoke-%.texi from %-args.def, but currently invoke-psktool.texi is generated from psk-args.def. If we make psktool conform to the same convention as the other utilities, we can use a generic pattern to handle all of them the same way. Signed-off-by: Kevin Cernekee @@ -5094,7 +9560,7 @@ 2014-01-26 Nikos Mavrogiannopoulos * doc/scripts/getfuncs-map.pl, lib/libgnutls.map: added - gnutls_realloc_fast to false positives Conflicts: lib/libgnutls.map + gnutls_realloc_fast to false positives Conflicts: lib/libgnutls.map 2014-01-26 Nikos Mavrogiannopoulos @@ -6000,7 +10466,7 @@ 2013-12-20 Nikos Mavrogiannopoulos - * lib/Makefile.am: libtasn1 generated files are set in BUILT_SOURCES Conflicts: lib/Makefile.am + * lib/Makefile.am: libtasn1 generated files are set in BUILT_SOURCES Conflicts: lib/Makefile.am 2013-12-18 Nikos Mavrogiannopoulos @@ -6181,11 +10647,9 @@ 2013-12-14 Nikos Mavrogiannopoulos - * lib/accelerated/x86/Makefile.am, - lib/accelerated/x86/hmac-x86-ssse3.c, - lib/accelerated/x86/hmac-x86.c, - lib/accelerated/x86/sha-x86-ssse3.c, lib/accelerated/x86/sha-x86.c: - use better names for files + * lib/accelerated/x86/Makefile.am, lib/accelerated/x86/{hmac-x86.c + => hmac-x86-ssse3.c}, lib/accelerated/x86/{sha-x86.c => + sha-x86-ssse3.c}: use better names for files 2013-12-14 Nikos Mavrogiannopoulos @@ -6198,13 +10662,12 @@ 2013-12-14 Nikos Mavrogiannopoulos * lib/accelerated/x86/Makefile.am, - lib/accelerated/x86/aes-gcm-x86-pclmul.c, + lib/accelerated/x86/{aes-gcm-x86.c => aes-gcm-x86-pclmul.c}, lib/accelerated/x86/aes-gcm-x86-ssse3.c, - lib/accelerated/x86/aes-gcm-x86.c, lib/accelerated/x86/aes-x86.c, - lib/accelerated/x86/aes-x86.h, lib/accelerated/x86/hmac-x86.c, - lib/accelerated/x86/sha-x86.c, lib/accelerated/x86/sha-x86.h: When - PCLMUL isn't available use the SSSE3 implementation of AES to - optimize GCM. + lib/accelerated/x86/aes-x86.c, lib/accelerated/x86/aes-x86.h, + lib/accelerated/x86/hmac-x86.c, lib/accelerated/x86/sha-x86.c, + lib/accelerated/x86/sha-x86.h: When PCLMUL isn't available use the + SSSE3 implementation of AES to optimize GCM. 2013-12-14 Nikos Mavrogiannopoulos @@ -6298,40 +10761,28 @@ devel/perlasm/sha512-ssse3-x86_64.pl, lib/accelerated/x86/Makefile.am, lib/accelerated/x86/aes-padlock.h, lib/accelerated/x86/aes-x86.c, - lib/accelerated/x86/coff/aesni-x86.s, - lib/accelerated/x86/coff/aesni-x86_64.s, - lib/accelerated/x86/coff/appro-aes-gcm-x86-64-coff.s, - lib/accelerated/x86/coff/appro-aes-x86-64-coff.s, - lib/accelerated/x86/coff/appro-aes-x86-coff.s, - lib/accelerated/x86/coff/cpuid-x86-64-coff.s, - lib/accelerated/x86/coff/cpuid-x86-coff.s, - lib/accelerated/x86/coff/cpuid-x86.s, - lib/accelerated/x86/coff/cpuid-x86_64.s, - lib/accelerated/x86/coff/e_padlock-x86.s, - lib/accelerated/x86/coff/e_padlock-x86_64.s, - lib/accelerated/x86/coff/ghash-x86_64.s, - lib/accelerated/x86/coff/openssl-cpuid-x86.s, + lib/accelerated/x86/coff/{appro-aes-x86-coff.s => aesni-x86.s}, + lib/accelerated/x86/coff/{appro-aes-x86-64-coff.s => + aesni-x86_64.s}, lib/accelerated/x86/coff/{cpuid-x86-coff.s => + cpuid-x86.s}, lib/accelerated/x86/coff/{cpuid-x86-64-coff.s => + cpuid-x86_64.s}, lib/accelerated/x86/coff/{padlock-x86-coff.s => + e_padlock-x86.s}, lib/accelerated/x86/coff/{padlock-x86-64-coff.s + => e_padlock-x86_64.s}, + lib/accelerated/x86/coff/{appro-aes-gcm-x86-64-coff.s => + ghash-x86_64.s}, lib/accelerated/x86/coff/openssl-cpuid-x86.s, lib/accelerated/x86/coff/openssl-cpuid-x86_64.s, - lib/accelerated/x86/coff/padlock-x86-64-coff.s, - lib/accelerated/x86/coff/padlock-x86-coff.s, lib/accelerated/x86/coff/sha1-ssse3-x86.s, lib/accelerated/x86/coff/sha1-ssse3-x86_64.s, lib/accelerated/x86/coff/sha256-avx-x86_64.s, lib/accelerated/x86/coff/sha256-ssse3-x86.s, lib/accelerated/x86/coff/sha512-ssse3-x86.s, lib/accelerated/x86/coff/sha512-ssse3-x86_64.s, - lib/accelerated/x86/elf/aesni-x86.s, - lib/accelerated/x86/elf/aesni-x86_64.s, - lib/accelerated/x86/elf/appro-aes-gcm-x86-64.s, - lib/accelerated/x86/elf/appro-aes-x86-64.s, - lib/accelerated/x86/elf/appro-aes-x86.s, - lib/accelerated/x86/elf/cpuid-x86-64.s, - lib/accelerated/x86/elf/cpuid-x86_64.s, - lib/accelerated/x86/elf/e_padlock-x86.s, - lib/accelerated/x86/elf/e_padlock-x86_64.s, - lib/accelerated/x86/elf/ghash-x86_64.s, - lib/accelerated/x86/elf/padlock-x86-64.s, - lib/accelerated/x86/elf/padlock-x86.s, + lib/accelerated/x86/elf/{appro-aes-x86.s => aesni-x86.s}, + lib/accelerated/x86/elf/{appro-aes-x86-64.s => aesni-x86_64.s}, + lib/accelerated/x86/elf/{cpuid-x86-64.s => cpuid-x86_64.s}, + lib/accelerated/x86/elf/{padlock-x86.s => e_padlock-x86.s}, + lib/accelerated/x86/elf/{padlock-x86-64.s => e_padlock-x86_64.s}, + lib/accelerated/x86/elf/{appro-aes-gcm-x86-64.s => ghash-x86_64.s}, lib/accelerated/x86/elf/sha1-ssse3-x86.s, lib/accelerated/x86/elf/sha1-ssse3-x86_64.s, lib/accelerated/x86/elf/sha256-avx-x86_64.s, @@ -6339,22 +10790,19 @@ lib/accelerated/x86/elf/sha512-ssse3-x86.s, lib/accelerated/x86/elf/sha512-ssse3-x86_64.s, lib/accelerated/x86/files.mk, lib/accelerated/x86/hmac-x86.c, - lib/accelerated/x86/macosx/aesni-x86.s, - lib/accelerated/x86/macosx/aesni-x86_64.s, - lib/accelerated/x86/macosx/appro-aes-gcm-x86-64-macosx.s, - lib/accelerated/x86/macosx/appro-aes-x86-64-macosx.s, - lib/accelerated/x86/macosx/appro-aes-x86-macosx.s, - lib/accelerated/x86/macosx/cpuid-x86-64-macosx.s, + lib/accelerated/x86/macosx/{appro-aes-x86-macosx.s => aesni-x86.s}, + lib/accelerated/x86/macosx/{appro-aes-x86-64-macosx.s => + aesni-x86_64.s}, lib/accelerated/x86/macosx/cpuid-x86-64-macosx.s, lib/accelerated/x86/macosx/cpuid-x86-macosx.s, lib/accelerated/x86/macosx/cpuid-x86.s, lib/accelerated/x86/macosx/cpuid-x86_64.s, - lib/accelerated/x86/macosx/e_padlock-x86.s, - lib/accelerated/x86/macosx/e_padlock-x86_64.s, - lib/accelerated/x86/macosx/ghash-x86_64.s, - lib/accelerated/x86/macosx/openssl-cpuid-x86.s, + lib/accelerated/x86/macosx/{padlock-x86-macosx.s => + e_padlock-x86.s}, + lib/accelerated/x86/macosx/{padlock-x86-64-macosx.s => + e_padlock-x86_64.s}, + lib/accelerated/x86/macosx/{appro-aes-gcm-x86-64-macosx.s => + ghash-x86_64.s}, lib/accelerated/x86/macosx/openssl-cpuid-x86.s, lib/accelerated/x86/macosx/openssl-cpuid-x86_64.s, - lib/accelerated/x86/macosx/padlock-x86-64-macosx.s, - lib/accelerated/x86/macosx/padlock-x86-macosx.s, lib/accelerated/x86/macosx/sha1-ssse3-x86.s, lib/accelerated/x86/macosx/sha1-ssse3-x86_64.s, lib/accelerated/x86/macosx/sha256-avx-x86_64.s, @@ -6640,7 +11088,7 @@ 2013-11-30 Nikos Mavrogiannopoulos - * : Merged the FIPS140-2 support code. Conflicts: lib/gnutls_global.c tests/mini-overhead.c + * : Merged the FIPS140-2 support code. Conflicts: lib/gnutls_global.c tests/mini-overhead.c 2013-11-30 Nikos Mavrogiannopoulos @@ -6872,11 +11320,11 @@ 2013-11-25 Nikos Mavrogiannopoulos - * configure.ac, lib/nettle/Makefile.am, lib/nettle/gcm-camellia.c, - lib/nettle/gcm-camellia.h, lib/nettle/int/drbg-aes-self-test.c, - lib/nettle/int/drbg-aes.c, lib/nettle/int/drbg-aes.h, - lib/nettle/int/gcm-camellia.c, lib/nettle/int/gcm-camellia.h, - lib/nettle/rnd-fips.c: Added DRBG submitted to nettle in gnutls. + * configure.ac, lib/nettle/Makefile.am, + lib/nettle/int/drbg-aes-self-test.c, lib/nettle/int/drbg-aes.c, + lib/nettle/int/drbg-aes.h, lib/nettle/{ => int}/gcm-camellia.c, + lib/nettle/{ => int}/gcm-camellia.h, lib/nettle/rnd-fips.c: Added + DRBG submitted to nettle in gnutls. 2013-11-25 Nikos Mavrogiannopoulos @@ -7176,7 +11624,7 @@ lib/x509/verify-high.c, lib/x509/x509.c, lib/xssl.c: Added support for fips states. This implies that when in FIPS mode and the library is not in operational state (i.e., all self checks succeeded), crypto - functionality of the library will fail. This includes: * API functions of gnutls/crypto.h * API functions of gnutls/abstract.h * API functions of gnutls/x509.h * gnutls_init() * API functions of gnutls/xssl.h + functionality of the library will fail. This includes: * API functions of gnutls/crypto.h * API functions of gnutls/abstract.h * API functions of gnutls/x509.h * gnutls_init() * API functions of gnutls/xssl.h 2013-11-11 Nikos Mavrogiannopoulos @@ -7270,7 +11718,7 @@ 2013-11-26 Nikos Mavrogiannopoulos * configure.ac, lib/Makefile.am: Do not link gnutls against librt - unlress it is really necessary. Conflicts: configure.ac lib/Makefile.am + unlress it is really necessary. Conflicts: configure.ac lib/Makefile.am 2013-11-24 Nikos Mavrogiannopoulos @@ -7331,10 +11779,9 @@ 2013-11-23 Nikos Mavrogiannopoulos * gl/Makefile.am, gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4, - gl/strerror-override.c, gl/strerror-override.h, gl/strerror.c, - gl/tests/Makefile.am, gl/tests/strerror-override.c, - gl/tests/strerror-override.h, gl/tests/strerror.c: Added strerror - module. + gl/{tests => }/strerror-override.c, gl/{tests => + }/strerror-override.h, gl/{tests => }/strerror.c, + gl/tests/Makefile.am: Added strerror module. 2013-11-23 Nikos Mavrogiannopoulos @@ -7639,11 +12086,10 @@ 2013-11-13 Nikos Mavrogiannopoulos - * gl/Makefile.am, gl/base64.c, gl/intprops.h, + * gl/Makefile.am, gl/base64.c, gl/{tests => }/intprops.h, gl/m4/extern-inline.m4, gl/m4/gnulib-cache.m4, - gl/m4/gnulib-comp.m4, gl/tests/Makefile.am, gl/tests/intprops.h, - maint.mk: Added intprops module (which is needed by newer libtasn1 - versions) + gl/m4/gnulib-comp.m4, gl/tests/Makefile.am, maint.mk: Added intprops + module (which is needed by newer libtasn1 versions) 2013-11-12 Nikos Mavrogiannopoulos @@ -9159,19 +13605,18 @@ gl/basename-lgpl.c, gl/bind.c, gl/byteswap.in.h, gl/c-ctype.c, gl/c-ctype.h, gl/close.c, gl/closedir.c, gl/connect.c, gl/dirent-private.h, gl/dirent.in.h, gl/dirname-lgpl.c, - gl/dirname.h, gl/dosname.h, gl/dup2.c, gl/errno.in.h, gl/error.c, - gl/error.h, gl/fd-hook.c, gl/fd-hook.h, gl/filename.h, gl/float+.h, - gl/float.c, gl/float.in.h, gl/fpucw.h, gl/frexp.c, gl/frexpl.c, - gl/fseek.c, gl/fseeko.c, gl/fseterr.c, gl/fseterr.h, gl/fstat.c, - gl/ftell.c, gl/ftello.c, gl/gai_strerror.c, gl/getaddrinfo.c, - gl/getdelim.c, gl/getline.c, gl/getopt.c, gl/getopt.in.h, - gl/getopt1.c, gl/getopt_int.h, gl/getpass.c, gl/getpass.h, - gl/getpeername.c, gl/getsubopt.c, gl/gettext.h, gl/gettimeofday.c, - gl/hash-pjw-bare.c, gl/hash-pjw-bare.h, gl/inet_ntop.c, - gl/inet_pton.c, gl/intprops.h, gl/isnan.c, gl/isnand-nolibm.h, - gl/isnand.c, gl/isnanf-nolibm.h, gl/isnanf.c, gl/isnanl-nolibm.h, - gl/isnanl.c, gl/itold.c, gl/listen.c, gl/lseek.c, - gl/m4/alphasort.m4, gl/m4/argp.m4, gl/m4/closedir.m4, + gl/dirname.h, gl/dup2.c, gl/errno.in.h, gl/error.c, gl/error.h, + gl/fd-hook.c, gl/fd-hook.h, gl/filename.h, gl/float+.h, gl/float.c, + gl/float.in.h, gl/frexp.c, gl/frexpl.c, gl/fseek.c, gl/fseeko.c, + gl/fseterr.c, gl/fseterr.h, gl/fstat.c, gl/ftell.c, gl/ftello.c, + gl/gai_strerror.c, gl/getaddrinfo.c, gl/getdelim.c, gl/getline.c, + gl/getopt.c, gl/getopt.in.h, gl/getopt1.c, gl/getopt_int.h, + gl/getpass.c, gl/getpass.h, gl/getpeername.c, gl/getsubopt.c, + gl/gettext.h, gl/gettimeofday.c, gl/hash-pjw-bare.c, + gl/hash-pjw-bare.h, gl/inet_ntop.c, gl/inet_pton.c, gl/isnan.c, + gl/isnand-nolibm.h, gl/isnand.c, gl/isnanf-nolibm.h, gl/isnanf.c, + gl/isnanl-nolibm.h, gl/isnanl.c, gl/itold.c, gl/listen.c, + gl/lseek.c, gl/m4/alphasort.m4, gl/m4/argp.m4, gl/m4/closedir.m4, gl/m4/dirent_h.m4, gl/m4/dirname.m4, gl/m4/double-slash-root.m4, gl/m4/eealloc.m4, gl/m4/environ.m4, gl/m4/error.m4, gl/m4/exponentf.m4, gl/m4/exponentl.m4, gl/m4/frexp.m4, @@ -9200,45 +13645,45 @@ gl/stdalign.in.h, gl/stdarg.in.h, gl/stdbool.in.h, gl/stddef.in.h, gl/stdint.in.h, gl/stdio-impl.h, gl/stdio.in.h, gl/stdlib.in.h, gl/str-two-way.h, gl/strcasecmp.c, gl/strchrnul.c, - gl/strchrnul.valgrind, gl/strdup.c, gl/strerror-override.c, - gl/strerror-override.h, gl/strerror.c, gl/string.in.h, + gl/strchrnul.valgrind, gl/strdup.c, gl/string.in.h, gl/strings.in.h, gl/stripslash.c, gl/strncasecmp.c, gl/strndup.c, gl/strnlen.c, gl/strtok_r.c, gl/strverscmp.c, gl/sys_select.in.h, gl/sys_socket.in.h, gl/sys_stat.in.h, gl/sys_time.in.h, gl/sys_types.in.h, gl/sys_uio.in.h, gl/sysexits.in.h, - gl/tests/Makefile.am, gl/tests/dosname.h, gl/tests/fpucw.h, - gl/tests/infinity.h, gl/tests/intprops.h, gl/tests/malloca.c, - gl/tests/malloca.h, gl/tests/malloca.valgrind, + gl/tests/Makefile.am, gl/{ => tests}/dosname.h, gl/{ => + tests}/fpucw.h, gl/tests/infinity.h, gl/{ => tests}/intprops.h, + gl/tests/malloca.c, gl/tests/malloca.h, gl/tests/malloca.valgrind, gl/tests/minus-zero.h, gl/tests/nan.h, gl/tests/putenv.c, - gl/tests/randomd.c, gl/tests/randoml.c, gl/tests/setenv.c, - gl/tests/strerror-override.c, gl/tests/strerror-override.h, - gl/tests/strerror.c, gl/tests/test-argp-2.sh, gl/tests/test-argp.c, - gl/tests/test-dirent.c, gl/tests/test-environ.c, - gl/tests/test-fprintf-posix.h, gl/tests/test-frexp.c, - gl/tests/test-frexp.h, gl/tests/test-frexpl.c, - gl/tests/test-fseterr.c, gl/tests/test-getopt.c, - gl/tests/test-getopt.h, gl/tests/test-getopt_long.h, - gl/tests/test-isnand-nolibm.c, gl/tests/test-isnand.h, - gl/tests/test-isnanf-nolibm.c, gl/tests/test-isnanf.h, - gl/tests/test-isnanl-nolibm.c, gl/tests/test-isnanl.h, - gl/tests/test-malloc-gnu.c, gl/tests/test-malloca.c, - gl/tests/test-math.c, gl/tests/test-printf-frexp.c, - gl/tests/test-printf-frexpl.c, gl/tests/test-printf-posix.h, - gl/tests/test-printf-posix.output, gl/tests/test-rawmemchr.c, - gl/tests/test-setenv.c, gl/tests/test-signbit.c, - gl/tests/test-sleep.c, gl/tests/test-strchrnul.c, - gl/tests/test-sysexits.c, gl/tests/test-unsetenv.c, - gl/tests/test-version-etc.c, gl/tests/test-version-etc.sh, - gl/tests/test-vfprintf-posix.c, gl/tests/test-vfprintf-posix.sh, - gl/tests/test-vprintf-posix.c, gl/tests/test-vprintf-posix.sh, - gl/tests/unsetenv.c, gl/time.in.h, gl/time_r.c, gl/u64.h, - gl/unistd.in.h, gl/vasnprintf.c, gl/vasnprintf.h, gl/vasprintf.c, - gl/verify.h, gl/version-etc-fsf.c, gl/version-etc.c, - gl/version-etc.h, gl/vfprintf.c, gl/vprintf.c, gl/vsnprintf.c, - gl/w32sock.h, gl/wchar.in.h, gl/xsize.h, src/certtool.c, - src/cli-debug.c, src/cli.c, src/danetool.c, src/ocsptool-common.c, - src/ocsptool.c, src/p11tool.c, src/psk.c, src/serv.c, - src/srptool.c, src/tpmtool.c: gnulib only contains lgplv2 modules + gl/tests/randomd.c, gl/tests/randoml.c, gl/tests/setenv.c, gl/{ => + tests}/strerror-override.c, gl/{ => tests}/strerror-override.h, + gl/{ => tests}/strerror.c, gl/tests/test-argp-2.sh, + gl/tests/test-argp.c, gl/tests/test-dirent.c, + gl/tests/test-environ.c, gl/tests/test-fprintf-posix.h, + gl/tests/test-frexp.c, gl/tests/test-frexp.h, + gl/tests/test-frexpl.c, gl/tests/test-fseterr.c, + gl/tests/test-getopt.c, gl/tests/test-getopt.h, + gl/tests/test-getopt_long.h, gl/tests/test-isnand-nolibm.c, + gl/tests/test-isnand.h, gl/tests/test-isnanf-nolibm.c, + gl/tests/test-isnanf.h, gl/tests/test-isnanl-nolibm.c, + gl/tests/test-isnanl.h, gl/tests/test-malloc-gnu.c, + gl/tests/test-malloca.c, gl/tests/test-math.c, + gl/tests/test-printf-frexp.c, gl/tests/test-printf-frexpl.c, + gl/tests/test-printf-posix.h, gl/tests/test-printf-posix.output, + gl/tests/test-rawmemchr.c, gl/tests/test-setenv.c, + gl/tests/test-signbit.c, gl/tests/test-sleep.c, + gl/tests/test-strchrnul.c, gl/tests/test-sysexits.c, + gl/tests/test-unsetenv.c, gl/tests/test-version-etc.c, + gl/tests/test-version-etc.sh, gl/tests/test-vfprintf-posix.c, + gl/tests/test-vfprintf-posix.sh, gl/tests/test-vprintf-posix.c, + gl/tests/test-vprintf-posix.sh, gl/tests/unsetenv.c, gl/time.in.h, + gl/time_r.c, gl/u64.h, gl/unistd.in.h, gl/vasnprintf.c, + gl/vasnprintf.h, gl/vasprintf.c, gl/verify.h, gl/version-etc-fsf.c, + gl/version-etc.c, gl/version-etc.h, gl/vfprintf.c, gl/vprintf.c, + gl/vsnprintf.c, gl/w32sock.h, gl/wchar.in.h, gl/xsize.h, + src/certtool.c, src/cli-debug.c, src/cli.c, src/danetool.c, + src/ocsptool-common.c, src/ocsptool.c, src/p11tool.c, src/psk.c, + src/serv.c, src/srptool.c, src/tpmtool.c: gnulib only contains + lgplv2 modules 2013-08-05 Nikos Mavrogiannopoulos @@ -9418,8 +13863,8 @@ 2013-07-26 Nikos Mavrogiannopoulos - * tests/Makefile.am, tests/mini.c, tests/record-sizes.c: Updated - mini test. + * tests/Makefile.am, tests/{mini.c => record-sizes.c}: Updated mini + test. 2013-07-25 Nikos Mavrogiannopoulos @@ -11153,8 +15598,8 @@ * configure.ac, lib/algorithms/ciphersuites.c, lib/algorithms/kx.c, lib/auth/Makefile.am, lib/auth/anon_ecdh.c, lib/auth/cert.c, lib/auth/cert.h, lib/auth/dh_common.c, lib/auth/dhe.c, - lib/auth/dhe_psk.c, lib/auth/ecdh_common.c, lib/auth/ecdh_common.h, - lib/auth/ecdhe.c, lib/auth/ecdhe.h, lib/auth/rsa_export.c, + lib/auth/dhe_psk.c, lib/auth/{ecdh_common.c => ecdhe.c}, + lib/auth/{ecdh_common.h => ecdhe.h}, lib/auth/rsa_export.c, lib/gnutls_handshake.c, lib/gnutls_kx.c, lib/gnutls_priority.c, lib/gnutls_rsa_export.c, lib/gnutls_state.c, lib/gnutls_ui.c, m4/hooks.m4: Added options to disable more key exchange mechanisms. In that DHE was separated from ECDHE. @@ -12254,10 +16699,10 @@ * NEWS, lib/Makefile.am, lib/gnutls_cert.c, lib/gnutls_errors.c, lib/includes/Makefile.am, lib/includes/gnutls/gnutls.h.in, - lib/includes/gnutls/sbuf.h, lib/includes/gnutls/xssl.h, - lib/libgnutls.map, lib/sbuf.c, lib/sbuf.h, lib/sbuf_getline.c, - lib/xssl.c, lib/xssl.h, lib/xssl_getline.c, tests/Makefile.am, - tests/mini-sbuf.c, tests/mini-xssl.c: Added new interface. + lib/includes/gnutls/{sbuf.h => xssl.h}, lib/libgnutls.map, + lib/{sbuf.c => xssl.c}, lib/{sbuf.h => xssl.h}, lib/{sbuf_getline.c + => xssl_getline.c}, tests/Makefile.am, tests/mini-sbuf.c, + tests/mini-xssl.c: Added new interface. 2013-01-27 Nikos Mavrogiannopoulos @@ -13297,14 +17742,14 @@ 2012-11-20 Nikos Mavrogiannopoulos - * build-aux/gendocs.sh, configure.ac, gl/Makefile.am, gl/dup2.c, - gl/errno.in.h, gl/m4/errno_h.m4, gl/m4/gnulib-cache.m4, + * build-aux/gendocs.sh, configure.ac, gl/Makefile.am, gl/{tests => + }/dup2.c, gl/errno.in.h, gl/m4/errno_h.m4, gl/m4/gnulib-cache.m4, gl/m4/gnulib-comp.m4, gl/m4/select.m4, gl/m4/stdlib_h.m4, gl/select.c, gl/stdlib.in.h, gl/strerror-override.c, - gl/strerror-override.h, gl/tests/Makefile.am, gl/tests/dup2.c, - gl/tests/fcntl.in.h, gl/tests/test-fcntl-h.c, - gl/tests/test-iconv.c, gl/tests/test-select.h, lib/system.c, - m4/hooks.m4, maint.mk: use gnulib to detect iconv. + gl/strerror-override.h, gl/tests/Makefile.am, gl/tests/fcntl.in.h, + gl/tests/test-fcntl-h.c, gl/tests/test-iconv.c, + gl/tests/test-select.h, lib/system.c, m4/hooks.m4, maint.mk: use + gnulib to detect iconv. 2012-11-20 Nikos Mavrogiannopoulos diff -Nru gnutls28-3.3.8/config.h.in gnutls28-3.3.30/config.h.in --- gnutls28-3.3.8/config.h.in 2014-09-18 07:12:18.000000000 -0400 +++ gnutls28-3.3.30/config.h.in 2018-07-16 01:41:09.000000000 -0400 @@ -57,6 +57,9 @@ /* enable anonymous authentication */ #undef ENABLE_ANON +/* Enable ARCFOUR128 */ +#undef ENABLE_ARCFOUR128 + /* Enable cryptodev support */ #undef ENABLE_CRYPTODEV @@ -108,6 +111,9 @@ /* enable SRP authentication */ #undef ENABLE_SRP +/* Enable SSL3.0 */ +#undef ENABLE_SSL3 + /* fopen(3) accepts a 'b' in the mode flag */ #undef FOPEN_BINARY_FLAG @@ -305,6 +311,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H +/* Have this function */ +#undef HAVE_ASN1_DECODE_SIMPLE_BER + /* Define to 1 if you have the `atexit' function. */ #undef HAVE_ATEXIT @@ -637,6 +646,9 @@ /* nettle is enabled */ #undef HAVE_LIBNETTLE +/* Define if you have the libnsl library. */ +#undef HAVE_LIBNSL + /* Define if you have the libpthread library. */ #undef HAVE_LIBPTHREAD @@ -1369,6 +1381,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H +/* Define to 1 if you have the `secure_getenv' function. */ +#undef HAVE_SECURE_GETENV + /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT @@ -1703,8 +1718,7 @@ /* Define to 1 if lseek does not detect pipes. */ #undef LSEEK_PIPE_BROKEN -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ @@ -1719,6 +1733,9 @@ /* no ssize_t type was found */ #undef NO_SSIZE_T +/* p11-kit supports p11_kit_uri_get_pin_value() */ +#undef P11_KIT_HAS_PIN_VALUE + /* Name of package */ #undef PACKAGE @@ -1775,8 +1792,8 @@ 'sig_atomic_t'. */ #undef SIG_ATOMIC_T_SUFFIX -/* The size of `char*', as computed by sizeof. */ -#undef SIZEOF_CHARP +/* The size of `char *', as computed by sizeof. */ +#undef SIZEOF_CHAR_P /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT @@ -1835,9 +1852,15 @@ /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME +/* the location of the trousers library */ +#undef TROUSERS_LIB + /* The DNSSEC root key file */ #undef UNBOUND_ROOT_KEY_FILE +/* nettle 3.0 or later */ +#undef USE_NETTLE3 + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -1850,6 +1873,10 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# undef __USE_MINGW_ANSI_STDIO +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -1963,13 +1990,28 @@ 'reference to static identifier "f" in extern inline function'. This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. - Suppress the use of extern inline on problematic Apple configurations. - OS X 10.8 and earlier mishandle it; see, e.g., - . + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and for clang but remains for g++; see . - Perhaps Apple will fix this some day. */ -#if (defined __APPLE__ \ + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ && (defined __header_inline \ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ && ! defined __clang__) \ @@ -1977,19 +2019,19 @@ && (defined __GNUC__ || defined __cplusplus)) \ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ && defined __GNUC__ && ! defined __cplusplus)))) -# define _GL_EXTERN_INLINE_APPLE_BUG +# define _GL_EXTERN_INLINE_STDHEADER_BUG #endif #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ : (199901L <= __STDC_VERSION__ \ && !defined __HP_cc \ && !(defined __SUNPRO_C && __STDC__))) \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline # define _GL_EXTERN_INLINE_IN_USE #elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ - && !defined _GL_EXTERN_INLINE_APPLE_BUG) + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) @@ -2003,6 +2045,11 @@ # define _GL_EXTERN_INLINE static _GL_UNUSED #endif +/* In GCC, suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA @@ -2010,10 +2057,6 @@ # define _GL_INLINE_HEADER_CONST_PRAGMA \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") # endif - /* Suppress GCC's bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - . */ # define _GL_INLINE_HEADER_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ diff -Nru gnutls28-3.3.8/configure gnutls28-3.3.30/configure --- gnutls28-3.3.8/configure 2014-09-18 07:12:18.000000000 -0400 +++ gnutls28-3.3.30/configure 2018-07-16 01:40:31.000000000 -0400 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GnuTLS 3.3.8. +# Generated by GNU Autoconf 2.69 for GnuTLS 3.3.30. # # Report bugs to . # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='GnuTLS' PACKAGE_TARNAME='gnutls' -PACKAGE_VERSION='3.3.8' -PACKAGE_STRING='GnuTLS 3.3.8' +PACKAGE_VERSION='3.3.30' +PACKAGE_STRING='GnuTLS 3.3.30' PACKAGE_BUGREPORT='bugs@gnutls.org' PACKAGE_URL='' @@ -680,10 +680,16 @@ INSTALL_LIBOPTS_FALSE INSTALL_LIBOPTS_TRUE POSIX_SHELL +GL_GENERATE_STDNORETURN_H_FALSE +GL_GENERATE_STDNORETURN_H_TRUE +STDNORETURN_H +TROUSERS_LIB ENABLE_TROUSERS_FALSE ENABLE_TROUSERS_TRUE TSS_CFLAGS TSS_LIBS +HAVE_BUGGY_P11_KIT_FALSE +HAVE_BUGGY_P11_KIT_TRUE ENABLE_PKCS11_FALSE ENABLE_PKCS11_TRUE P11_KIT_LIBS @@ -692,16 +698,23 @@ ENABLE_DANE_TRUE UNBOUND_CFLAGS UNBOUND_LIBS +ENABLE_SSL3_FALSE +ENABLE_SSL3_TRUE +ENABLE_ARCFOUR128_FALSE +ENABLE_ARCFOUR128_TRUE ENABLE_SELF_CHECKS_FALSE ENABLE_SELF_CHECKS_TRUE +ENABLE_NON_SUITEB_CURVES_FALSE +ENABLE_NON_SUITEB_CURVES_TRUE FIPS140_LIBS +ENABLE_FIPS140_FALSE +ENABLE_FIPS140_TRUE LIBDL_PREFIX LTLIBDL LIBDL HAVE_LIBDL -ENABLE_FIPS140_FALSE -ENABLE_FIPS140_TRUE CXXCPP +LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO @@ -985,6 +998,7 @@ GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T +HAVE_MAX_ALIGN_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE @@ -1091,6 +1105,7 @@ REPLACE_REALPATH REPLACE_REALLOC REPLACE_RANDOM_R +REPLACE_QSORT_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_PTSNAME @@ -1142,6 +1157,7 @@ GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_RANDOM +GNULIB_QSORT_R GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME @@ -1346,6 +1362,10 @@ GL_COND_LIBTOOL_TRUE LIBICONV_PREFIX HAVE_LIBICONV +LIBNSL_PREFIX +LTLIBNSL +LIBNSL +HAVE_LIBNSL LIBPTHREAD_PREFIX LTLIBPTHREAD LIBPTHREAD @@ -1383,9 +1403,14 @@ GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +HAVE_GTK_DOC_FALSE +HAVE_GTK_DOC_TRUE +GTKDOC_DEPS_LIBS +GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE +GTKDOC_CHECK_PATH GTKDOC_CHECK ENABLE_TESTS_FALSE ENABLE_TESTS_TRUE @@ -1400,9 +1425,11 @@ REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R +REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR +REPLACE_READLINKAT REPLACE_READLINK REPLACE_READ REPLACE_PWRITE @@ -1546,6 +1573,8 @@ LIBTASN1_CFLAGS GMP_LIBS GMP_CFLAGS +USE_NETTLE3_FALSE +USE_NETTLE3_TRUE ENABLE_NETTLE_FALSE ENABLE_NETTLE_TRUE HOGWEED_LIBS @@ -1687,6 +1716,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1744,6 +1774,7 @@ with_libintl_prefix with_librt_prefix with_libpthread_prefix +with_libnsl_prefix enable_ld_version_script enable_valgrind_tests enable_gcc_warnings @@ -1751,17 +1782,21 @@ enable_shared with_pic enable_fast_install +with_aix_soname with_sysroot enable_libtool_lock enable_self_checks -enable_fips140_mode with_libdl_prefix +enable_fips140_mode enable_non_suiteb_curves +with_arcfour128 +with_ssl3 enable_libdane with_unbound_root_key_file with_system_priority_file with_p11_kit with_tpm +with_trousers_lib enable_local_libopts enable_libopts_install with_autoopts_config @@ -1806,6 +1841,9 @@ GMP_LIBS LIBTASN1_CFLAGS LIBTASN1_LIBS +GTKDOC_DEPS_CFLAGS +GTKDOC_DEPS_LIBS +LT_SYS_LIBRARY_PATH CXXCPP P11_KIT_CFLAGS P11_KIT_LIBS @@ -1849,6 +1887,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -2101,6 +2140,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -2238,7 +2286,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -2351,7 +2399,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GnuTLS 3.3.8 to adapt to many kinds of systems. +\`configure' configures GnuTLS 3.3.30 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2391,6 +2439,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2421,7 +2470,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GnuTLS 3.3.8:";; + short | recursive ) echo "Configuration of GnuTLS 3.3.30:";; esac cat <<\_ACEOF @@ -2511,19 +2560,27 @@ --without-librt-prefix don't search for librt in includedir and libdir --with-libpthread-prefix[=DIR] search for libpthread in DIR/include and DIR/lib --without-libpthread-prefix don't search for libpthread in includedir and libdir + --with-libnsl-prefix[=DIR] search for libnsl in DIR/include and DIR/lib + --without-libnsl-prefix don't search for libnsl in includedir and libdir --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] + --with-aix-soname=aix|svr4|both + shared library versioning (aka "SONAME") variant to + provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot=DIR Search for dependent libraries within DIR - (or the compiler's sysroot if not specified). + --with-sysroot[=DIR] Search for dependent libraries within DIR (or the + compiler's sysroot if not specified). --with-libdl-prefix[=DIR] search for libdl in DIR/include and DIR/lib --without-libdl-prefix don't search for libdl in includedir and libdir + --with-arcfour128 include ARCFOUR128 in priority strings + --with-ssl3 include SSL3.0 in priority strings --with-unbound-root-key-file specify the unbound root key file --with-system-priority-file specify the system priority file --without-p11-kit Build without p11-kit and PKCS#11 support --without-tpm Disable TPM (trousers) support. + --with-trousers-lib=LIB set the location of the trousers library --with-autoopts-config specify the config-info script --with-regex-header a reg expr header is specified --with-libregex libregex installation prefix @@ -2578,6 +2635,12 @@ C compiler flags for LIBTASN1, overriding pkg-config LIBTASN1_LIBS linker flags for LIBTASN1, overriding pkg-config + GTKDOC_DEPS_CFLAGS + C compiler flags for GTKDOC_DEPS, overriding pkg-config + GTKDOC_DEPS_LIBS + linker flags for GTKDOC_DEPS, overriding pkg-config + LT_SYS_LIBRARY_PATH + User-defined run-time library search path. CXXCPP C++ preprocessor P11_KIT_CFLAGS C compiler flags for P11_KIT, overriding pkg-config @@ -2653,7 +2716,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GnuTLS configure 3.3.8 +GnuTLS configure 3.3.30 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2990,6 +3053,73 @@ } # ac_fn_cxx_try_compile +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -3173,73 +3303,6 @@ } # ac_fn_c_compute_int -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache @@ -3483,7 +3546,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GnuTLS $as_me 3.3.8, which was +It was created by GnuTLS $as_me 3.3.30, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3967,7 +4030,7 @@ -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -4139,8 +4202,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -4159,7 +4222,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4453,7 +4516,7 @@ # Define the identity of the package. PACKAGE='gnutls' - VERSION='3.3.8' + VERSION='3.3.30' cat >>confdefs.h <<_ACEOF @@ -4487,8 +4550,8 @@ # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -6447,6 +6510,8 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h @@ -6984,6 +7049,9 @@ # Code from module fseeko: # Code from module fstat: + # Code from module ftell: + # Code from module ftello: + # Code from module getaddrinfo: # Code from module getdelim: # Code from module getline: @@ -7004,6 +7072,7 @@ # Code from module malloc-posix: # Code from module malloca: # Code from module memchr: + # Code from module minmax: # Code from module mktime: # Code from module msvc-inval: # Code from module msvc-nothrow: @@ -7012,6 +7081,7 @@ # Code from module netinet_in: # Code from module parse-datetime: # Code from module progname: + # Code from module read-file: # Code from module realloc-posix: # Code from module recv: # Code from module recvfrom: @@ -7904,6 +7974,8 @@ + + if test x"$AUTOGEN" = "x/bin/true"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** @@ -8139,6 +8211,7 @@ fi +use_accel=yes case "$host" in *mingw32* | *mingw64*) have_win=yes @@ -8146,6 +8219,19 @@ *darwin*) have_macosx=yes ;; + *solaris*) + use_accel=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: +*** +*** In solaris hardware acceleration is disabled by default due to issues +*** with the assembler. Use --enable-hardware-acceleration to enable it. +*** " >&5 +$as_echo "$as_me: WARNING: +*** +*** In solaris hardware acceleration is disabled by default due to issues +*** with the assembler. Use --enable-hardware-acceleration to enable it. +*** " >&2;} + ;; *) have_elf=yes ;; @@ -8179,8 +8265,6 @@ # Check whether --enable-hardware-acceleration was given. if test "${enable_hardware_acceleration+set}" = set; then : enableval=$enable_hardware_acceleration; use_accel=$enableval -else - use_accel=yes fi hw_accel=none @@ -8282,11 +8366,11 @@ # Interfaces changed/added/removed: CURRENT++ REVISION=0 # Interfaces added: AGE++ # Interfaces removed: AGE=0 (+bump all symbol versions in .map) - LT_CURRENT=69 + LT_CURRENT=71 - LT_REVISION=0 + LT_REVISION=4 - LT_AGE=41 + LT_AGE=43 LT_SSL_CURRENT=27 @@ -8327,12 +8411,12 @@ pkg_cv_NETTLE_CFLAGS="$NETTLE_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 2.7 nettle < 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "nettle >= 2.7 nettle < 3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 2.7\""; } >&5 + ($PKG_CONFIG --exists --print-errors "nettle >= 2.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_NETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle >= 2.7 nettle < 3.0" 2>/dev/null` + pkg_cv_NETTLE_CFLAGS=`$PKG_CONFIG --cflags "nettle >= 2.7" 2>/dev/null` else pkg_failed=yes fi @@ -8345,12 +8429,12 @@ pkg_cv_NETTLE_LIBS="$NETTLE_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 2.7 nettle < 3.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "nettle >= 2.7 nettle < 3.0") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"nettle >= 2.7\""; } >&5 + ($PKG_CONFIG --exists --print-errors "nettle >= 2.7") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_NETTLE_LIBS=`$PKG_CONFIG --libs "nettle >= 2.7 nettle < 3.0" 2>/dev/null` + pkg_cv_NETTLE_LIBS=`$PKG_CONFIG --libs "nettle >= 2.7" 2>/dev/null` else pkg_failed=yes fi @@ -8369,9 +8453,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - NETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nettle >= 2.7 nettle < 3.0"` + NETTLE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "nettle >= 2.7"` else - NETTLE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nettle >= 2.7 nettle < 3.0"` + NETTLE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "nettle >= 2.7"` fi # Put the nasty error message in config.log where it belongs echo "$NETTLE_PKG_ERRORS" >&5 @@ -8381,14 +8465,14 @@ as_fn_error $? " *** - *** Libnettle 2.7.1 was not found. Note that this version of gnutls doesn't support nettle 3.0. + *** Libnettle 2.7.1 was not found. " "$LINENO" 5 elif test $pkg_failed = untried; then as_fn_error $? " *** - *** Libnettle 2.7.1 was not found. Note that this version of gnutls doesn't support nettle 3.0. + *** Libnettle 2.7.1 was not found. " "$LINENO" 5 else @@ -8490,6 +8574,24 @@ $as_echo "#define HAVE_LIBNETTLE 1" >>confdefs.h + nettle_version=`$PKG_CONFIG --modversion nettle` + + if $PKG_CONFIG --atleast-version=3.0 nettle; then + +$as_echo "#define USE_NETTLE3 1" >>confdefs.h + + use_nettle3=yes + else + use_nettle3=no + fi + if test "$use_nettle3" = "yes"; then + USE_NETTLE3_TRUE= + USE_NETTLE3_FALSE='#' +else + USE_NETTLE3_TRUE='#' + USE_NETTLE3_FALSE= +fi + GNUTLS_REQUIRES_PRIVATE="Requires.private: nettle, hogweed" @@ -8578,12 +8680,12 @@ pkg_cv_LIBTASN1_CFLAGS="$LIBTASN1_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtasn1 >= 3.9\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libtasn1 >= 3.9") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtasn1 >= 4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtasn1 >= 4.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBTASN1_CFLAGS=`$PKG_CONFIG --cflags "libtasn1 >= 3.9" 2>/dev/null` + pkg_cv_LIBTASN1_CFLAGS=`$PKG_CONFIG --cflags "libtasn1 >= 4.0" 2>/dev/null` else pkg_failed=yes fi @@ -8596,12 +8698,12 @@ pkg_cv_LIBTASN1_LIBS="$LIBTASN1_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtasn1 >= 3.9\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libtasn1 >= 3.9") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtasn1 >= 4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libtasn1 >= 4.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBTASN1_LIBS=`$PKG_CONFIG --libs "libtasn1 >= 3.9" 2>/dev/null` + pkg_cv_LIBTASN1_LIBS=`$PKG_CONFIG --libs "libtasn1 >= 4.0" 2>/dev/null` else pkg_failed=yes fi @@ -8620,9 +8722,9 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBTASN1_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libtasn1 >= 3.9"` + LIBTASN1_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libtasn1 >= 4.0"` else - LIBTASN1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libtasn1 >= 3.9"` + LIBTASN1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libtasn1 >= 4.0"` fi # Put the nasty error message in config.log where it belongs echo "$LIBTASN1_PKG_ERRORS" >&5 @@ -8665,6 +8767,22 @@ if test "$included_libtasn1" = "no"; then GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libtasn1" + oldlibs="$LIBS" + LIBS="$LIBS $LIBTASN1_LIBS" + oldcflags="$CFLAGS" + CFLAGS="$CFLAGS $LIBTASN1_CFLAGS" + ac_fn_c_check_func "$LINENO" "asn1_decode_simple_ber" "ac_cv_func_asn1_decode_simple_ber" +if test "x$ac_cv_func_asn1_decode_simple_ber" = xyes; then : + +$as_echo "#define HAVE_ASN1_DECODE_SIMPLE_BER 1" >>confdefs.h + +fi + + LIBS="$oldlibs" + else + +$as_echo "#define HAVE_ASN1_DECODE_SIMPLE_BER 1" >>confdefs.h + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C99 macros are supported" >&5 @@ -9326,9 +9444,11 @@ REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; + REPLACE_READLINKAT=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; @@ -9615,16 +9735,79 @@ - # Extract the first word of "gtkdoc-check", so it can be a program name with args. + + gtk_doc_requires="gtk-doc >= 1.1" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 +$as_echo_n "checking for gtk-doc... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_gtk_doc=yes +else + have_gtk_doc=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 +$as_echo "$have_gtk_doc" >&6; } + + if test "$have_gtk_doc" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&5 +$as_echo "$as_me: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&2;} + fi + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$GTKDOC_CHECK"; then + ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK+:} false; then : +if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : $as_echo_n "(cached) " >&6 else - case $GTKDOC_CHECK in + case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. + ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -9634,7 +9817,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -9645,10 +9828,10 @@ ;; esac fi -GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK -if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } +GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH +if test -n "$GTKDOC_CHECK_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 +$as_echo "$GTKDOC_CHECK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -9761,23 +9944,91 @@ fi - if test x$enable_gtk_doc = xyes; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.1\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.1") 2>&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + as_fn_error $? " + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 + fi + + if test "x$PACKAGE_NAME" != "xglib"; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 +$as_echo_n "checking for GTKDOC_DEPS... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$GTKDOC_DEPS_CFLAGS"; then + pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - : + pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` else - as_fn_error $? "You need to have gtk-doc >= 1.1 installed to build $PACKAGE_NAME" "$LINENO" 5 + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$GTKDOC_DEPS_LIBS"; then + pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0"` + else + GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +elif test $pkg_failed = untried; then + : +else + GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS + GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi + fi # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : @@ -9798,6 +10049,18 @@ enable_gtk_doc_pdf=no fi + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + + + if test x$have_gtk_doc = xyes; then + HAVE_GTK_DOC_TRUE= + HAVE_GTK_DOC_FALSE='#' +else + HAVE_GTK_DOC_TRUE='#' + HAVE_GTK_DOC_FALSE= +fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= @@ -12093,7 +12356,7 @@ esac -for ac_func in fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf +for ac_func in secure_getenv fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -13848,6 +14111,559 @@ gnutls_needs_librt=yes fi +if test "$ac_cv_func_inet_pton" != "yes";then + + + + + + + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libnsl-prefix was given. +if test "${with_libnsl_prefix+set}" = set; then : + withval=$with_libnsl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + 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 + +fi + + LIBNSL= + LTLIBNSL= + INCNSL= + LIBNSL_PREFIX= + HAVE_LIBNSL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='nsl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBNSL="${LIBNSL}${LIBNSL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + eval libname=\"$acl_libname_spec\" # typically: libname=lib$name + if test -n "$acl_shlibext"; then + shrext=".$acl_shlibext" # typically: shrext=.so + else + shrext= + fi + if test $use_additional = yes; then + dir="$additional_libdir" + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBNSL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi + fi + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext"; then + found_dir="$dir" + found_a="$dir/$libname.$acl_libext" + fi + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no \ + || test "X$found_dir" = "X/usr/$acl_libdirstem" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + LIBNSL="${LIBNSL}${LIBNSL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$acl_hardcode_direct" = yes; then + LIBNSL="${LIBNSL}${LIBNSL:+ }$found_so" + else + if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then + LIBNSL="${LIBNSL}${LIBNSL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBNSL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBNSL="${LIBNSL}${LIBNSL:+ }-L$found_dir" + fi + if test "$acl_hardcode_minus_L" != no; then + LIBNSL="${LIBNSL}${LIBNSL:+ }$found_so" + else + LIBNSL="${LIBNSL}${LIBNSL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBNSL="${LIBNSL}${LIBNSL:+ }$found_a" + else + LIBNSL="${LIBNSL}${LIBNSL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */$acl_libdirstem | */$acl_libdirstem/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` + if test "$name" = 'nsl'; then + LIBNSL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + */$acl_libdirstem2 | */$acl_libdirstem2/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` + if test "$name" = 'nsl'; then + LIBNSL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux* | gnu* | k*bsd*-gnu) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCNSL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCNSL="${INCNSL}${INCNSL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + 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" \ + || 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;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBNSL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBNSL="${LIBNSL}${LIBNSL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBNSL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBNSL="${LIBNSL}${LIBNSL:+ }$dep" + LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }$dep" + ;; + esac + done + fi + else + LIBNSL="${LIBNSL}${LIBNSL:+ }-l$name" + LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$acl_hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBNSL="${LIBNSL}${LIBNSL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$acl_hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBNSL="${LIBNSL}${LIBNSL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBNSL="${LTLIBNSL}${LTLIBNSL:+ }-R$found_dir" + done + fi + + + + + + + + ac_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCNSL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 +$as_echo_n "checking for libnsl... " >&6; } +if ${ac_cv_libnsl+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_save_LIBS="$LIBS" + case " $LIBNSL" in + *" -l"*) LIBS="$LIBS $LIBNSL" ;; + *) LIBS="$LIBNSL $LIBS" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +inet_pton(0,0,0); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_libnsl=yes +else + ac_cv_libnsl='no' +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libnsl" >&5 +$as_echo "$ac_cv_libnsl" >&6; } + if test "$ac_cv_libnsl" = yes; then + HAVE_LIBNSL=yes + +$as_echo "#define HAVE_LIBNSL 1" >>confdefs.h + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libnsl" >&5 +$as_echo_n "checking how to link with libnsl... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBNSL" >&5 +$as_echo "$LIBNSL" >&6; } + else + HAVE_LIBNSL=no + CPPFLAGS="$ac_save_CPPFLAGS" + LIBNSL= + LTLIBNSL= + LIBNSL_PREFIX= + fi + + + + + + + +fi + if test "$ac_cv_func_clock_gettime" != "yes";then @@ -15186,17 +16002,19 @@ for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + int main () { int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + ; return 0; } @@ -16787,6 +17605,7 @@ GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_QSORT_R=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; @@ -16838,6 +17657,7 @@ REPLACE_PTSNAME=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; @@ -17507,6 +18327,7 @@ REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; HAVE_WCHAR_T=1; @@ -18774,6 +19595,344 @@ + case "$host_os" in + osf*) + +$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 +$as_echo_n "checking whether is self-contained... " >&6; } +if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_socket_h_selfcontained=yes +else + gl_cv_header_sys_socket_h_selfcontained=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 +$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } + if test $gl_cv_header_sys_socket_h_selfcontained = yes; then + for ac_func in shutdown +do : + ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" +if test "x$ac_cv_func_shutdown" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SHUTDOWN 1 +_ACEOF + +fi +done + + if test $ac_cv_func_shutdown = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 +$as_echo_n "checking whether defines the SHUT_* macros... " >&6; } +if ${gl_cv_header_sys_socket_h_shut+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_sys_socket_h_shut=yes +else + gl_cv_header_sys_socket_h_shut=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 +$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } + if test $gl_cv_header_sys_socket_h_shut = no; then + SYS_SOCKET_H='sys/socket.h' + fi + fi + fi + # We need to check for ws2tcpip.h now. + + + + + + + + + : + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_socket_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_socket_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/socket.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_socket_h + gl_cv_next_sys_socket_h='"'$gl_header'"' + else + gl_cv_next_sys_socket_h='<'sys/socket.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 +$as_echo "$gl_cv_next_sys_socket_h" >&6; } + fi + NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/socket.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_socket_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive + + + + + if test $ac_cv_header_sys_socket_h = yes; then + HAVE_SYS_SOCKET_H=1 + HAVE_WS2TCPIP_H=0 + else + HAVE_SYS_SOCKET_H=0 + if test $ac_cv_header_ws2tcpip_h = yes; then + HAVE_WS2TCPIP_H=1 + else + HAVE_WS2TCPIP_H=0 + fi + fi + + + + ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +_ACEOF + + +fi +ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " + /* sys/types.h is not needed according to POSIX, but the + sys/socket.h in i386-unknown-freebsd4.10 and + powerpc-apple-darwin5.5 required it. */ +#include +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#endif + +" +if test "x$ac_cv_type_sa_family_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SA_FAMILY_T 1 +_ACEOF + + +fi + + if test $ac_cv_type_struct_sockaddr_storage = no; then + HAVE_STRUCT_SOCKADDR_STORAGE=0 + fi + if test $ac_cv_type_sa_family_t = no; then + HAVE_SA_FAMILY_T=0 + fi + if test $ac_cv_type_struct_sockaddr_storage != no; then + ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #endif + +" +if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +_ACEOF + + +else + HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 +fi + + fi + if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ + || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then + SYS_SOCKET_H='sys/socket.h' + fi + + + + + : + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + + + for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Some systems require prerequisite headers. */ +#include +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + @@ -22840,8 +23999,12 @@ /* Test _Alignas only on platforms where gnulib can help. */ #if \ ((defined __cplusplus && 201103 <= __cplusplus) \ - || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ - || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C \ + || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ? 1 : -1]; @@ -22912,6 +24075,15 @@ STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = xyes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -23041,6 +24213,8 @@ + + if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else @@ -23774,343 +24948,6 @@ - case "$host_os" in - osf*) - -$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h - - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 -$as_echo_n "checking whether is self-contained... " >&6; } -if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_sys_socket_h_selfcontained=yes -else - gl_cv_header_sys_socket_h_selfcontained=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 -$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } - if test $gl_cv_header_sys_socket_h_selfcontained = yes; then - for ac_func in shutdown -do : - ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" -if test "x$ac_cv_func_shutdown" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SHUTDOWN 1 -_ACEOF - -fi -done - - if test $ac_cv_func_shutdown = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 -$as_echo_n "checking whether defines the SHUT_* macros... " >&6; } -if ${gl_cv_header_sys_socket_h_shut+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_sys_socket_h_shut=yes -else - gl_cv_header_sys_socket_h_shut=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 -$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } - if test $gl_cv_header_sys_socket_h_shut = no; then - SYS_SOCKET_H='sys/socket.h' - fi - fi - fi - # We need to check for ws2tcpip.h now. - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_socket_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_socket_h = yes; then - - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'sys/socket.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_sys_socket_h - gl_cv_next_sys_socket_h='"'$gl_header'"' - else - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 -$as_echo "$gl_cv_next_sys_socket_h" >&6; } - fi - NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/socket.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_socket_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi - fi - - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_type_sa_family_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SA_FAMILY_T 1 -_ACEOF - - -fi - - if test $ac_cv_type_struct_sockaddr_storage = no; then - HAVE_STRUCT_SOCKADDR_STORAGE=0 - fi - if test $ac_cv_type_sa_family_t = no; then - HAVE_SA_FAMILY_T=0 - fi - if test $ac_cv_type_struct_sockaddr_storage != no; then - ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_WS2TCPIP_H - #include - #endif - -" -if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -_ACEOF - - -else - HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 -fi - - fi - if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ - || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then - SYS_SOCKET_H='sys/socket.h' - fi - - - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - - - - - for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Some systems require prerequisite headers. */ -#include -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - @@ -28638,6 +29475,239 @@ + + + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then + REPLACE_FTELL=1 + fi + + if test $REPLACE_FTELL = 1; then + + + + + + + + + ggl_LIBOBJS="$ggl_LIBOBJS ftell.$ac_objext" + + fi + + + + + + GNULIB_FTELL=1 + + + + + +$as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h + + + + + + + + + + + + + : + + + + + + if test $ac_cv_have_decl_ftello = no; then + HAVE_DECL_FTELLO=0 + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5 +$as_echo_n "checking for ftello... " >&6; } +if ${gl_cv_func_ftello+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +ftello (stdin); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_ftello=yes +else + gl_cv_func_ftello=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5 +$as_echo "$gl_cv_func_ftello" >&6; } + if test $gl_cv_func_ftello = no; then + HAVE_FTELLO=0 + else + if test $WINDOWS_64_BIT_OFF_T = 1; then + REPLACE_FTELLO=1 + fi + if test $gl_cv_var_stdin_large_offset = no; then + REPLACE_FTELLO=1 + fi + if test $REPLACE_FTELLO = 0; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5 +$as_echo_n "checking whether ftello works... " >&6; } +if ${gl_cv_func_ftello_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_ftello_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_ftello_works="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#define TESTFILE "conftest.tmp" +int +main (void) +{ + FILE *fp; + + /* Create a file with some contents. */ + fp = fopen (TESTFILE, "w"); + if (fp == NULL) + return 70; + if (fwrite ("foogarsh", 1, 8, fp) < 8) + return 71; + if (fclose (fp)) + return 72; + + /* The file's contents is now "foogarsh". */ + + /* Try writing after reading to EOF. */ + fp = fopen (TESTFILE, "r+"); + if (fp == NULL) + return 73; + if (fseek (fp, -1, SEEK_END)) + return 74; + if (!(getc (fp) == 'h')) + return 1; + if (!(getc (fp) == EOF)) + return 2; + if (!(ftell (fp) == 8)) + return 3; + if (!(ftell (fp) == 8)) + return 4; + if (!(putc ('!', fp) == '!')) + return 5; + if (!(ftell (fp) == 9)) + return 6; + if (!(fclose (fp) == 0)) + return 7; + fp = fopen (TESTFILE, "r"); + if (fp == NULL) + return 75; + { + char buf[10]; + if (!(fread (buf, 1, 10, fp) == 9)) + return 10; + if (!(memcmp (buf, "foogarsh!", 9) == 0)) + return 11; + } + if (!(fclose (fp) == 0)) + return 12; + + /* The file's contents is now "foogarsh!". */ + + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_ftello_works=yes +else + gl_cv_func_ftello_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5 +$as_echo "$gl_cv_func_ftello_works" >&6; } + case "$gl_cv_func_ftello_works" in + *yes) ;; + *) + REPLACE_FTELLO=1 + +$as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h + + ;; + esac + fi + fi + + if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then + + + + + + + + + ggl_LIBOBJS="$ggl_LIBOBJS ftello.$ac_objext" + + + for ac_func in _ftelli64 +do : + ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64" +if test "x$ac_cv_func__ftelli64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTELLI64 1 +_ACEOF + +fi +done + + + fi + + + + + + GNULIB_FTELLO=1 + + + + + +$as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&5 $as_echo "$as_me: checking how to do getaddrinfo, freeaddrinfo and getnameinfo" >&6;} GETADDRINFO_LIB= @@ -30490,6 +31560,9 @@ + + + : @@ -31213,6 +32286,7 @@ #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl _ACEOF + : @@ -32274,202 +33348,6 @@ - - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - - LIBSOCKET= - if test $HAVE_WINSOCK2_H = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5 -$as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; } -if ${gl_cv_func_wsastartup+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef HAVE_WINSOCK2_H -# include -#endif -int -main () -{ - - WORD wVersionRequested = MAKEWORD(1, 1); - WSADATA wsaData; - int err = WSAStartup(wVersionRequested, &wsaData); - WSACleanup (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_wsastartup=yes -else - gl_cv_func_wsastartup=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5 -$as_echo "$gl_cv_func_wsastartup" >&6; } - if test "$gl_cv_func_wsastartup" = "yes"; then - -$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h - - LIBSOCKET='-lws2_32' - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 -$as_echo_n "checking for library containing setsockopt... " >&6; } -if ${gl_cv_lib_socket+:} false; then : - $as_echo_n "(cached) " >&6 -else - - gl_cv_lib_socket= - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - gl_save_LIBS="$LIBS" - LIBS="$gl_save_LIBS -lsocket" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lsocket" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnetwork" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lnetwork" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - LIBS="$gl_save_LIBS -lnet" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern -#ifdef __cplusplus -"C" -#endif -char setsockopt(); -int -main () -{ -setsockopt(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_lib_socket="-lnet" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi - fi - LIBS="$gl_save_LIBS" - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$gl_cv_lib_socket"; then - gl_cv_lib_socket="none needed" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5 -$as_echo "$gl_cv_lib_socket" >&6; } - if test "$gl_cv_lib_socket" != "none needed"; then - LIBSOCKET="$gl_cv_lib_socket" - fi - fi - - - - - - - : - - ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " /* is not needed according to POSIX, but the in i386-unknown-freebsd4.10 and @@ -32593,8 +33471,12 @@ /* Test _Alignas only on platforms where gnulib can help. */ #if \ ((defined __cplusplus && 201103 <= __cplusplus) \ - || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \ - || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER) + || (defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ + : __GNUC__) \ + || __HP_cc || __HP_aCC || __IBMC__ || __IBMCPP__ \ + || __ICC || 0x5110 <= __SUNPRO_C \ + || 1300 <= _MSC_VER) struct alignas_test { char c; char alignas (8) alignas_8; }; char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 ? 1 : -1]; @@ -32665,6 +33547,15 @@ STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = xyes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -32794,6 +33685,8 @@ + + if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else @@ -33510,343 +34403,6 @@ - case "$host_os" in - osf*) - -$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h - - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is self-contained" >&5 -$as_echo_n "checking whether is self-contained... " >&6; } -if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_sys_socket_h_selfcontained=yes -else - gl_cv_header_sys_socket_h_selfcontained=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 -$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } - if test $gl_cv_header_sys_socket_h_selfcontained = yes; then - for ac_func in shutdown -do : - ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" -if test "x$ac_cv_func_shutdown" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SHUTDOWN 1 -_ACEOF - -fi -done - - if test $ac_cv_func_shutdown = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines the SHUT_* macros" >&5 -$as_echo_n "checking whether defines the SHUT_* macros... " >&6; } -if ${gl_cv_header_sys_socket_h_shut+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_sys_socket_h_shut=yes -else - gl_cv_header_sys_socket_h_shut=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 -$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } - if test $gl_cv_header_sys_socket_h_shut = no; then - SYS_SOCKET_H='sys/socket.h' - fi - fi - fi - # We need to check for ws2tcpip.h now. - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_socket_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_socket_h = yes; then - - - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'sys/socket.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - - gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_sys_socket_h - gl_cv_next_sys_socket_h='"'$gl_header'"' - else - gl_cv_next_sys_socket_h='<'sys/socket.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 -$as_echo "$gl_cv_next_sys_socket_h" >&6; } - fi - NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/socket.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_socket_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_sys_socket_h = yes; then - HAVE_SYS_SOCKET_H=1 - HAVE_WS2TCPIP_H=0 - else - HAVE_SYS_SOCKET_H=0 - if test $ac_cv_header_ws2tcpip_h = yes; then - HAVE_WS2TCPIP_H=1 - else - HAVE_WS2TCPIP_H=0 - fi - fi - - - - ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF - - -fi -ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif -#ifdef HAVE_WS2TCPIP_H -#include -#endif - -" -if test "x$ac_cv_type_sa_family_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_SA_FAMILY_T 1 -_ACEOF - - -fi - - if test $ac_cv_type_struct_sockaddr_storage = no; then - HAVE_STRUCT_SOCKADDR_STORAGE=0 - fi - if test $ac_cv_type_sa_family_t = no; then - HAVE_SA_FAMILY_T=0 - fi - if test $ac_cv_type_struct_sockaddr_storage != no; then - ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - #ifdef HAVE_WS2TCPIP_H - #include - #endif - -" -if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 -_ACEOF - - -else - HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 -fi - - fi - if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ - || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then - SYS_SOCKET_H='sys/socket.h' - fi - - - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - - - - - for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Some systems require prerequisite headers. */ -#include -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - @@ -35057,6 +35613,14 @@ fi # List all gcc warning categories. + # To compare this list to your installed GCC's, run this Bash command: + # + # comm -3 \ + # <(sed -n 's/^ *\(-[^ ]*\) .*/\1/p' manywarnings.m4 | sort) \ + # <(gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort | + # grep -v -x -f <( + # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec)) + gl_manywarn_set= for gl_manywarn_item in \ -W \ @@ -35075,6 +35639,7 @@ -Wcomments \ -Wcoverage-mismatch \ -Wcpp \ + -Wdate-time \ -Wdeprecated \ -Wdeprecated-declarations \ -Wdisabled-optimization \ @@ -35114,9 +35679,9 @@ -Wnarrowing \ -Wnested-externs \ -Wnonnull \ - -Wnormalized=nfc \ -Wold-style-declaration \ -Wold-style-definition \ + -Wopenmp-simd \ -Woverflow \ -Woverlength-strings \ -Woverride-init \ @@ -35167,13 +35732,26 @@ -Wvla \ -Wvolatile-register-var \ -Wwrite-strings \ - -fdiagnostics-show-option \ - -funit-at-a-time \ \ ; do gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item" done + # gcc --help=warnings outputs an unusual form for this option; list + # it here so that the above 'comm' command doesn't report a false match. + gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc" + + # These are needed for older GCC versions. + if test -n "$GCC"; then + case `($CC --version) 2>/dev/null` in + 'gcc (GCC) '[0-3].* | \ + 'gcc (GCC) '4.[0-7].*) + gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option" + gl_manywarn_set="$gl_manywarn_set -funit-at-a-time" + ;; + esac + fi + # Disable specific options as needed. if test "$gl_cv_cc_nomfi_needed" = yes; then gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers" @@ -35567,8 +36145,8 @@ -macro_version='2.4.2' -macro_revision='1.3337' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -35582,7 +36160,7 @@ -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. @@ -35631,7 +36209,7 @@ $ECHO "" } -case "$ECHO" in +case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -35824,19 +36402,19 @@ # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -35850,7 +36428,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -35861,7 +36439,7 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -35872,32 +36450,32 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -35940,33 +36518,38 @@ else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM="$NM" + lt_cv_path_NM=$NM else - lt_nm_to_check="${ac_tool_prefix}nm" + lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + tmp_nm=$ac_dir/$lt_tmp_nm + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) + # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty + case $build_os in + mingw*) lt_bad_file=conftest.nm/nofile ;; + *) lt_bad_file=/dev/null ;; + esac + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in + *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break + break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break + break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -35977,15 +36560,15 @@ esac fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" +if test no != "$lt_cv_path_NM"; then + NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -36091,9 +36674,9 @@ fi fi - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols" + DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: @@ -36101,8 +36684,8 @@ esac fi - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" + if test : != "$DUMPBIN"; then + NM=$DUMPBIN fi fi test -z "$NM" && NM=nm @@ -36142,7 +36725,7 @@ $as_echo_n "(cached) " >&6 else i=0 - teststring="ABCD" + teststring=ABCD case $build_os in msdosdjgpp*) @@ -36182,7 +36765,7 @@ lt_cv_sys_max_cmd_len=8192; ;; - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -36233,22 +36816,22 @@ *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do + for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ + while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough + test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -36266,7 +36849,7 @@ fi -if test -n $lt_cv_sys_max_cmd_len ; then +if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -36284,30 +36867,6 @@ : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -36430,13 +36989,13 @@ reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then + if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + if test yes = "$GCC"; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -36564,13 +37123,13 @@ # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. +# 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. +# that responds to the $file_magic_cmd with a given extended regex. +# If you have 'file' or equivalent on your system and you're not sure +# whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -36597,8 +37156,7 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then + if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -36694,8 +37252,8 @@ lt_cv_deplibs_check_method=pass_all ;; -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then +openbsd* | bitrig*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -36748,6 +37306,9 @@ tpf*) lt_cv_deplibs_check_method=pass_all ;; +os2*) + lt_cv_deplibs_check_method=pass_all + ;; esac fi @@ -36905,8 +37466,8 @@ case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh; + # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -36918,7 +37479,7 @@ ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" + lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac @@ -37072,7 +37633,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -eq 0; then + if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -37080,7 +37641,7 @@ ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test "$ac_status" -ne 0; then + if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi @@ -37093,7 +37654,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test "x$lt_cv_ar_at_file" = xno; then +if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -37310,7 +37871,7 @@ if test -n "$RANLIB"; then case $host_os in - openbsd*) + bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -37400,7 +37961,7 @@ symcode='[ABCDGISTW]' ;; hpux*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; @@ -37433,14 +37994,44 @@ symcode='[ABCDGIRSTW]' ;; esac +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + # Gets list of data symbols to import. + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" + # Adjust the below global symbol transforms to fixup imported variables. + lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" + lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" + lt_c_name_lib_hook="\ + -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ + -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" +else + # Disable hooks by default. + lt_cv_sys_global_symbol_to_import= + lt_cdecl_hook= + lt_c_name_hook= + lt_c_name_lib_hook= +fi + # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ +$lt_cdecl_hook\ +" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ +$lt_c_name_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" + +# Transform an extracted symbol line into symbol name with lib prefix and +# symbol address. +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ +$lt_c_name_lib_hook\ +" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ +" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ +" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -37458,21 +38049,24 @@ # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. + # Fake it for dumpbin and say T for any non-static function, + # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ +" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ +" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ +" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ +" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ +" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ +" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -37520,11 +38114,11 @@ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime +#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE +/* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined(__osf__) +#elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -37550,7 +38144,7 @@ { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -37570,13 +38164,13 @@ mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" + LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext}; then + test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -37597,7 +38191,7 @@ rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then + if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= @@ -37650,6 +38244,16 @@ + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -37662,9 +38266,9 @@ lt_sysroot= -case ${with_sysroot} in #( +case $with_sysroot in #( yes) - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -37674,8 +38278,8 @@ no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +$as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -37687,18 +38291,99 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +$as_echo_n "checking for a working dd... " >&6; } +if ${ac_cv_path_lt_DD+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +: ${lt_DD:=$DD} +if test -z "$lt_DD"; then + ac_path_lt_DD_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in dd; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_lt_DD" || continue +if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: +fi + $ac_path_lt_DD_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_lt_DD"; then + : + fi +else + ac_cv_path_lt_DD=$lt_DD +fi + +rm -f conftest.i conftest2.i conftest.out +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +$as_echo "$ac_cv_path_lt_DD" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +$as_echo_n "checking how to truncate binary pipes... " >&6; } +if ${lt_cv_truncate_bin+:} false; then : + $as_echo_n "(cached) " >&6 +else + printf 0123456789abcdef0123456789abcdef >conftest.i +cat conftest.i conftest.i >conftest2.i +lt_cv_truncate_bin= +if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then + cmp -s conftest.i conftest.out \ + && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" +fi +rm -f conftest.i conftest2.i conftest.out +test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +$as_echo "$lt_cv_truncate_bin" >&6; } + + + + + + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes +test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set mode + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -37707,24 +38392,25 @@ test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE="32" + HPUX_IA64_MODE=32 ;; *ELF-64*) - HPUX_IA64_MODE="64" + HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -37753,9 +38439,50 @@ rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '#line '$LINENO' "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. Note that the listed cases only cover the + # situations where additional linker options are needed (such as when + # doing 32-bit compilation for a host where ld defaults to 64-bit, or + # vice versa); the common cases where no linker options are needed do + # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -37778,10 +38505,10 @@ ;; esac ;; - powerpc64le-*) + powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; - powerpc64-*) + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -37800,10 +38527,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - powerpcle-*) + powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; - powerpc-*) + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -37821,7 +38548,7 @@ *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" + SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -37861,13 +38588,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then + if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" + CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) - # Find out which ABI we are using. + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -37879,7 +38607,7 @@ case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*) + i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -37888,7 +38616,7 @@ esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD="${LD-ld}_sol2" + LD=${LD-ld}_sol2 fi ;; *) @@ -37904,7 +38632,7 @@ ;; esac -need_locks="$enable_libtool_lock" +need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -38015,7 +38743,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then +if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -38518,7 +39246,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then + if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -38536,7 +39264,7 @@ cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test $_lt_result -eq 0; then + elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -38575,7 +39303,7 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -38604,7 +39332,7 @@ _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then + elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -38617,32 +39345,32 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then + if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + if test yes = "$lt_cv_ld_exported_symbols_list"; then + _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -38650,6 +39378,41 @@ ;; esac +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default @@ -38667,9 +39430,9 @@ func_stripname_cnf () { - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + case $2 in + .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; + *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf @@ -38687,14 +39450,14 @@ *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -38725,14 +39488,14 @@ *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -38757,14 +39520,14 @@ *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -38772,8 +39535,6 @@ fi -test -z "$pic_mode" && pic_mode=default - @@ -38789,14 +39550,14 @@ *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -38810,11 +39571,63 @@ + shared_archive_member_spec= +case $host,$enable_shared in +power*-*-aix[5-9]*,yes) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + +# Check whether --with-aix-soname was given. +if test "${with_aix_soname+set}" = set; then : + withval=$with_aix_soname; case $withval in + aix|svr4|both) + ;; + *) + as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 + ;; + esac + lt_cv_with_aix_soname=$with_aix_soname +else + if ${lt_cv_with_aix_soname+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_with_aix_soname=aix +fi + + with_aix_soname=$lt_cv_with_aix_soname +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +$as_echo "$with_aix_soname" >&6; } + if test aix != "$with_aix_soname"; then + # For the AIX way of multilib, we name the shared archive member + # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', + # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. + # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, + # the AIX toolchain works better with OBJECT_MODE set (default 32). + if test 64 = "${OBJECT_MODE-32}"; then + shared_archive_member_spec=shr_64 + else + shared_archive_member_spec=shr + fi + fi + ;; +*) + with_aix_soname=aix + ;; +esac + + + + + + + # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" +LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -38863,7 +39676,7 @@ -if test -n "${ZSH_VERSION+set}" ; then +if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi @@ -38902,7 +39715,7 @@ # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then + if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -38913,14 +39726,14 @@ ofile=libtool can_build_shared=yes -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a -with_gnu_ld="$lt_cv_prog_gnu_ld" +with_gnu_ld=$lt_cv_prog_gnu_ld -old_CC="$CC" -old_CFLAGS="$CFLAGS" +old_CC=$CC +old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc @@ -38929,15 +39742,8 @@ test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +func_cc_basename $compiler +cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it @@ -38952,22 +39758,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -f "$ac_dir/${ac_tool_prefix}file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -38990,13 +39796,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -39018,22 +39824,22 @@ else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_MAGIC_CMD=$MAGIC_CMD + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -f "$ac_dir/file"; then + lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : @@ -39056,13 +39862,13 @@ break fi done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" + IFS=$lt_save_ifs + MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } @@ -39083,7 +39889,7 @@ # Use C for the default configuration in the libtool script -lt_save_CC="$CC" +lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -39145,7 +39951,7 @@ lt_prog_compiler_no_builtin_flag= -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; @@ -39161,7 +39967,7 @@ lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" + lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -39191,7 +39997,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then +if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : @@ -39209,17 +40015,18 @@ lt_prog_compiler_static= - if test "$GCC" = yes; then + if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi + lt_prog_compiler_pic='-fPIC' ;; amigaos*) @@ -39230,8 +40037,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -39247,6 +40054,11 @@ # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; darwin* | rhapsody*) @@ -39317,7 +40129,7 @@ case $host_os in aix*) lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else @@ -39325,10 +40137,29 @@ fi ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + case $cc_basename in + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + esac + ;; + mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static='$wl-static' + ;; + esac ;; hpux9* | hpux10* | hpux11*) @@ -39344,7 +40175,7 @@ ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' + lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) @@ -39355,7 +40186,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. + # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' @@ -39380,6 +40211,12 @@ lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) @@ -39477,7 +40314,7 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi @@ -39506,7 +40343,7 @@ fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; @@ -39538,7 +40375,7 @@ lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -39568,7 +40405,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; @@ -39600,7 +40437,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -39619,13 +40456,13 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } -if test x"$lt_cv_prog_compiler_static_works" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= @@ -39745,8 +40582,8 @@ -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -39758,9 +40595,9 @@ ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -39803,9 +40640,9 @@ # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. + # it will be wrapped by ' (' and ')$', so one must not match beginning or + # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', + # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if @@ -39820,7 +40657,7 @@ # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. - if test "$GCC" != yes; then + if test yes != "$GCC"; then with_gnu_ld=no fi ;; @@ -39828,7 +40665,7 @@ # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; - openbsd*) + openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) @@ -39841,7 +40678,7 @@ # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility @@ -39863,24 +40700,24 @@ esac fi - if test "$lt_use_gnu_ld_interface" = yes; then + if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' + wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -39893,7 +40730,7 @@ case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then + if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 @@ -39912,7 +40749,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -39928,7 +40765,7 @@ allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi @@ -39938,7 +40775,7 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' + export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes @@ -39946,61 +40783,89 @@ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no - if test "$host_os" = linux-dietlibc; then + if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no + && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -40011,42 +40876,47 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; + nagfor*) # NAGFOR 5.3 + tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in + tcc*) + export_dynamic_flag_spec='-rdynamic' + ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -40060,8 +40930,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -40079,8 +40949,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -40092,7 +40962,7 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify @@ -40107,9 +40977,9 @@ # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -40126,15 +40996,15 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac - if test "$ld_shlibs" = no; then + if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= @@ -40150,7 +41020,7 @@ # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then + if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported @@ -40158,34 +41028,57 @@ ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -40204,13 +41097,21 @@ hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes - file_list_spec='${wl}-f,' + file_list_spec='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # traditional, no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct=no + hardcode_direct_absolute=no + ;; + esac - if test "$GCC" = yes; then + if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -40229,36 +41130,42 @@ ;; esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag="$shared_flag "'$wl-G' fi - link_all_deplibs=no + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec='${wl}-bexpall' + export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -40293,7 +41200,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -40301,17 +41208,17 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : @@ -40346,7 +41253,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" + lt_cv_aix_libpath_=/usr/lib:/lib fi fi @@ -40354,21 +41261,33 @@ aix_libpath=$lt_cv_aix_libpath_ fi - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag=' $wl-bernotok' + allow_undefined_flag=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -40377,7 +41296,7 @@ case $host_cpu in powerpc) # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) @@ -40407,16 +41326,17 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes @@ -40425,18 +41345,18 @@ # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # Assume MSVC wrapper @@ -40445,7 +41365,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. @@ -40464,24 +41384,24 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" + allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -40523,33 +41443,33 @@ ;; hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GCC"; then + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' ;; hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test yes,no = "$GCC,$with_gnu_ld"; then + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes @@ -40557,25 +41477,25 @@ ;; hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then + if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) @@ -40587,7 +41507,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -40606,14 +41526,14 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +if test yes = "$lt_cv_prog_compiler__b"; then + archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -40621,8 +41541,8 @@ ;; esac fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in @@ -40633,7 +41553,7 @@ *) hardcode_direct=yes hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' + export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. @@ -40644,8 +41564,8 @@ ;; irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. @@ -40655,8 +41575,8 @@ if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } @@ -40668,24 +41588,35 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + if test yes = "$lt_cv_irix_exported_symbol"; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi + link_all_deplibs=no else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; + linux*) + case $cc_basename in + tcc*) + # Fabrice Bellard et al's Tiny C Compiler + ld_shlibs=yes + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + ;; + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out @@ -40700,7 +41631,7 @@ newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; @@ -40708,27 +41639,19 @@ *nto* | *qnx*) ;; - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' + archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' + export_dynamic_flag_spec='$wl-E' else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no @@ -40739,33 +41662,53 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + shrext_cmds=.dll + archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes=yes ;; osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + if test yes = "$GCC"; then + allow_undefined_flag=' $wl-expect_unresolved $wl\*' + archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -40776,24 +41719,24 @@ solaris*) no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + wlarc='$wl' + archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' + $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' + wlarc='$wl' + archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi @@ -40803,11 +41746,11 @@ solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', + # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + if test yes = "$GCC"; then + whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi @@ -40817,10 +41760,10 @@ ;; sunos4*) - if test "x$host_vendor" = xsequent; then + if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi @@ -40869,43 +41812,43 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' + no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' + no_undefined_flag='$wl-z,text' + allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' + hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' + export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + if test yes = "$GCC"; then + archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; @@ -40920,10 +41863,10 @@ ;; esac - if test x$host_vendor = xsni; then + if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' + export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi @@ -40931,7 +41874,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no +test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -40957,7 +41900,7 @@ # Assume -lc should be added archive_cmds_need_lc=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -41172,14 +42115,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } -if test "$GCC" = yes; then +if test yes = "$GCC"; then case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; + darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; + *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; + mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; + *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in @@ -41195,28 +42138,35 @@ ;; esac # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. + # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` + # ...but if some path component already ends with the multilib dir we assume + # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). + case "$lt_multi_os_dir; $lt_search_path_spec " in + "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) + lt_multi_os_dir= + ;; + esac for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else + if test -d "$lt_sys_path$lt_multi_os_dir"; then + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" + elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; +BEGIN {RS = " "; FS = "/|\n";} { + lt_foo = ""; + lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; + lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } @@ -41230,7 +42180,7 @@ # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; + $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else @@ -41239,7 +42189,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -41256,14 +42206,16 @@ # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -41271,41 +42223,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -41315,18 +42317,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -41334,8 +42336,8 @@ bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -41347,7 +42349,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -41356,8 +42358,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -41373,17 +42375,17 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -41392,8 +42394,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -41420,7 +42422,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -41433,8 +42435,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -41447,7 +42449,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -41460,8 +42462,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -41474,8 +42476,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -41493,12 +42495,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -41528,10 +42531,10 @@ need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -41549,14 +42552,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -41564,8 +42568,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -41574,8 +42578,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -41588,8 +42592,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -41600,7 +42604,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -41608,8 +42612,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -41628,8 +42632,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -41638,13 +42642,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec='-L$libdir' + ;; + # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -41688,7 +42712,12 @@ # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -41720,12 +42749,12 @@ need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -41735,7 +42764,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -41744,58 +42773,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -41806,8 +42845,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -41817,11 +42856,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -41829,8 +42868,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -41851,24 +42890,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -41886,7 +42925,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -41894,8 +42933,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -41905,20 +42944,35 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + + + + @@ -42015,15 +43069,15 @@ hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then + test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && + if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && + test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else @@ -42038,12 +43092,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then +if test relink = "$hardcode_action" || + test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -42053,7 +43107,7 @@ - if test "x$enable_dlopen" != xyes; then + if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown @@ -42063,23 +43117,23 @@ case $host_os in beos*) - lt_cv_dlopen="load_add_on" + lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) - # if libdl is installed we need to link against it + # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : @@ -42117,10 +43171,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else - lt_cv_dlopen="dyld" + lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes @@ -42128,10 +43182,18 @@ ;; + tpf*) + # Don't try to run any link tests for TPF. We know it's impossible + # because TPF is a cross-compiler, and we know how we open DSOs. + lt_cv_dlopen=dlopen + lt_cv_dlopen_libs= + lt_cv_dlopen_self=no + ;; + *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" + lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } @@ -42170,11 +43232,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" + lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } @@ -42213,7 +43275,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } @@ -42252,7 +43314,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" + lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } @@ -42291,7 +43353,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" + lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -42312,21 +43374,21 @@ ;; esac - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else + if test no = "$lt_cv_dlopen"; then enable_dlopen=no + else + enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + save_CPPFLAGS=$CPPFLAGS + test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - save_LIBS="$LIBS" + save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 @@ -42334,7 +43396,7 @@ if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -42381,9 +43443,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -42413,7 +43475,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -42433,14 +43495,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } - if test "x$lt_cv_dlopen_self" = xyes; then + if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : + if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 @@ -42487,9 +43549,9 @@ # endif #endif -/* When -fvisbility=hidden is used, assume the code has been annotated +/* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif @@ -42519,7 +43581,7 @@ (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then + test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -42540,9 +43602,9 @@ $as_echo "$lt_cv_dlopen_self_static" >&6; } fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS=$save_CPPFLAGS + LDFLAGS=$save_LDFLAGS + LIBS=$save_LIBS ;; esac @@ -42586,7 +43648,7 @@ # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) - if test -n "$STRIP" ; then + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -42614,7 +43676,7 @@ - # Report which library types will actually be built + # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 @@ -42622,13 +43684,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no + test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) - test "$enable_shared" = yes && enable_static=no + test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' @@ -42636,8 +43698,12 @@ ;; aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no + if test ia64 != "$host_cpu"; then + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only + yes,*) enable_static=no ;; # shared object in lib.a archive as well + esac fi ;; esac @@ -42647,7 +43713,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes + test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -42661,11 +43727,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -CC="$lt_save_CC" +CC=$lt_save_CC - if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then + if test -n "$CXX" && ( test no != "$CXX" && + ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || + (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -42844,7 +43910,7 @@ # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then +if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" @@ -42905,46 +43971,39 @@ CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + func_cc_basename $compiler +cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately - if test "$GXX" = yes; then + if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi - if test "$GXX" = yes; then + if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test "$GCC" = yes; then +if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw + # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -42958,7 +44017,7 @@ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD="$ac_prog" + test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. @@ -42969,7 +44028,7 @@ with_gnu_ld=unknown ;; esac -elif test "$with_gnu_ld" = yes; then +elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -42980,32 +44039,32 @@ $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" + lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -43041,22 +44100,22 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + if test yes = "$with_gnu_ld"; then + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) - wlarc='${wl}' + wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi @@ -43093,18 +44152,30 @@ ld_shlibs_CXX=no ;; aix[4-9]*) - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' - no_entry_flag="" + no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. + # have runtime linking enabled, and use it for executables. + # For shared libraries, we enable/disable runtime linking + # depending on the kind of the shared library created - + # when "with_aix_soname,aix_use_runtimelinking" is: + # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables + # "aix,yes" lib.so shared, rtl:yes, for executables + # lib.a static archive + # "both,no" lib.so.V(shr.o) shared, rtl:yes + # lib.a(lib.so.V) shared, rtl:no, for executables + # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a(lib.so.V) shared, rtl:no + # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables + # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in @@ -43114,6 +44185,13 @@ ;; esac done + if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then + # With aix-soname=svr4, we create the lib.so.V shared archives only, + # so we don't have lib.a shared libs to link our executables. + # We have to force runtime linking in this case. + aix_use_runtimelinking=yes + LDFLAGS="$LDFLAGS -Wl,-brtl" + fi ;; esac @@ -43132,13 +44210,21 @@ hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - file_list_spec_CXX='${wl}-f,' + file_list_spec_CXX='$wl-f,' + case $with_aix_soname,$aix_use_runtimelinking in + aix,*) ;; # no import file + svr4,* | *,yes) # use import file + # The Import File defines what to hardcode. + hardcode_direct_CXX=no + hardcode_direct_absolute_CXX=no + ;; + esac - if test "$GXX" = yes; then + if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` + collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then @@ -43156,36 +44242,44 @@ fi esac shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag=$shared_flag' $wl-G' fi + # Need to ensure runtime linking is disabled for the traditional + # shared library, or the linker may eventually find shared libraries + # /with/ Import File - we do not want to mix them. + shared_flag_aix='-shared' + shared_flag_svr4='-shared $wl-G' else # not using gcc - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' + if test yes = "$aix_use_runtimelinking"; then + shared_flag='$wl-G' else - shared_flag='${wl}-bM:SRE' + shared_flag='$wl-bM:SRE' fi + shared_flag_aix='$wl-bM:SRE' + shared_flag_svr4='$wl-G' fi fi - export_dynamic_flag_spec_CXX='${wl}-bexpall' + export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes - if test "$aix_use_runtimelinking" = yes; then + if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. - allow_undefined_flag_CXX='-berok' + # The "-G" linker flag allows undefined symbols. + no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -43220,7 +44314,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" + lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi @@ -43228,18 +44322,18 @@ aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + if test ia64 = "$host_cpu"; then + hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then + if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : @@ -43274,7 +44368,7 @@ rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then - lt_cv_aix_libpath__CXX="/usr/lib:/lib" + lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi @@ -43282,22 +44376,34 @@ aix_libpath=$lt_cv_aix_libpath__CXX fi - hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. - no_undefined_flag_CXX=' ${wl}-bernotok' - allow_undefined_flag_CXX=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then + no_undefined_flag_CXX=' $wl-bernotok' + allow_undefined_flag_CXX=' $wl-berok' + if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' + # -brtl affects multiple linker settings, -berok does not and is overridden later + compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' + if test svr4 != "$with_aix_soname"; then + # This is similar to how AIX traditionally builds its shared + # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' + fi + if test aix != "$with_aix_soname"; then + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' + else + # used by -dlpreopen to get the symbols + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' + fi + archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; @@ -43307,7 +44413,7 @@ allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi @@ -43335,57 +44441,58 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" + shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. - archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp "$export_symbols" "$output_objdir/$soname.def"; + echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; + else + $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile=$lt_outputfile.exe + lt_tool_outputfile=$lt_tool_outputfile.exe + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file, use it as + # is; otherwise, prepend EXPORTS... + archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi @@ -43399,27 +44506,27 @@ hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - if test "$lt_cv_ld_force_load" = "yes"; then - whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + if test yes = "$lt_cv_ld_force_load"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes - allow_undefined_flag_CXX="$_lt_dar_allow_undefined" + allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; + ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac - if test "$_lt_dar_can_shared" = "yes"; then + if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all - archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - if test "$lt_cv_apple_cc_single_mod" != "yes"; then - archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" + archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" + module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + if test yes != "$lt_cv_apple_cc_single_mod"; then + archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" + archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else @@ -43428,6 +44535,34 @@ ;; + os2*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_minus_L_CXX=yes + allow_undefined_flag_CXX=unsupported + shrext_cmds=.dll + archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ + $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ + $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ + $ECHO EXPORTS >> $output_objdir/$libname.def~ + prefix_cmds="$SED"~ + if test EXPORTS = "`$SED 1q $export_symbols`"; then + prefix_cmds="$prefix_cmds -e 1d"; + fi~ + prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ + cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ + $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ + emximp -o $lib $output_objdir/$libname.def' + old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' + enable_shared_with_static_runtimes_CXX=yes + ;; + dgux*) case $cc_basename in ec++*) @@ -43463,14 +44598,14 @@ ;; haiku*) - archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default @@ -43482,7 +44617,7 @@ ld_shlibs_CXX=no ;; aCC*) - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -43491,11 +44626,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + if test yes = "$GXX"; then + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -43505,15 +44640,15 @@ ;; hpux10*|hpux11*) - if test $with_gnu_ld = no; then - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + if test no = "$with_gnu_ld"; then + hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) - export_dynamic_flag_spec_CXX='${wl}-E' + export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi @@ -43539,13 +44674,13 @@ aCC*) case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists @@ -43556,20 +44691,20 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -43584,22 +44719,22 @@ interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -43608,17 +44743,17 @@ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + if test yes = "$GXX"; then + if test no = "$with_gnu_ld"; then + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; @@ -43631,8 +44766,8 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. @@ -43641,10 +44776,10 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. @@ -43658,59 +44793,59 @@ # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ + $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + rm -rf $tpldir~ + $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' @@ -43724,18 +44859,18 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' + export_dynamic_flag_spec_CXX='$wl--export-dynamic' + archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) @@ -43743,10 +44878,10 @@ *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on @@ -43804,22 +44939,17 @@ ld_shlibs_CXX=yes ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - - openbsd*) + openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' + export_dynamic_flag_spec_CXX='$wl-E' + whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else @@ -43835,9 +44965,9 @@ # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. - archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using @@ -43855,17 +44985,17 @@ cxx*) case $host in osf3*) - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ + $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac @@ -43880,21 +45010,21 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + if test yes,no = "$GXX,$with_gnu_ld"; then + allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac - hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists @@ -43940,9 +45070,9 @@ # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no @@ -43950,7 +45080,7 @@ solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. + # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; @@ -43967,30 +45097,30 @@ ;; gcx*) # Green Hills C++ Compiler - archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if test yes,no = "$GXX,$with_gnu_ld"; then + no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else - # g++ 2.7 appears to require `-G' NOT `-shared' on this + # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. - archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when @@ -43998,11 +45128,11 @@ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi - hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi @@ -44011,52 +45141,52 @@ ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' + no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not + # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' + no_undefined_flag_CXX='$wl-z,text' + allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' + hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' + export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ - '"$old_archive_cmds_CXX" + '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ - '"$reload_cmds_CXX" + '"$reload_cmds_CXX" ;; *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; @@ -44088,10 +45218,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } - test "$ld_shlibs_CXX" = no && can_build_shared=no + test no = "$ld_shlibs_CXX" && can_build_shared=no - GCC_CXX="$GXX" - LD_CXX="$LD" + GCC_CXX=$GXX + LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change @@ -44135,13 +45265,13 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in + case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. - if test $p = "-L" || - test $p = "-R"; then + if test x-L = "$p" || + test x-R = "$p"; then prev=$p continue fi @@ -44157,16 +45287,16 @@ case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in + if test no = "$pre_test_object_deps_done"; then + case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then - compiler_lib_search_path_CXX="${prev}${p}" + compiler_lib_search_path_CXX=$prev$p else - compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being @@ -44174,9 +45304,9 @@ esac else if test -z "$postdeps_CXX"; then - postdeps_CXX="${prev}${p}" + postdeps_CXX=$prev$p else - postdeps_CXX="${postdeps_CXX} ${prev}${p}" + postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= @@ -44191,15 +45321,15 @@ continue fi - if test "$pre_test_object_deps_done" = no; then + if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then - predep_objects_CXX="$p" + predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then - postdep_objects_CXX="$p" + postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi @@ -44229,51 +45359,6 @@ postdep_objects_CXX= postdeps_CXX= ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - postdeps_CXX='-library=Cstd -library=Crun' - fi - ;; - esac - ;; esac @@ -44282,7 +45367,7 @@ esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then - compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` + compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi @@ -44321,17 +45406,18 @@ # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then + if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi + lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) @@ -44342,8 +45428,8 @@ ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. + # adding the '-m68020' flag to GCC prevents building anything better, + # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac @@ -44358,6 +45444,11 @@ # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + case $host_os in + os2*) + lt_prog_compiler_static_CXX='$wl-static' + ;; + esac ;; darwin* | rhapsody*) # PIC is the default on this platform @@ -44407,7 +45498,7 @@ case $host_os in aix[4-9]*) # All AIX code is PIC. - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else @@ -44447,14 +45538,14 @@ case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' + if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' + lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default @@ -44491,7 +45582,7 @@ lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. + # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' @@ -44636,7 +45727,7 @@ fi case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: + # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; @@ -44668,7 +45759,7 @@ lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins @@ -44698,7 +45789,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; @@ -44724,7 +45815,7 @@ $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" + save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then @@ -44743,13 +45834,13 @@ fi fi $RM -r conftest* - LDFLAGS="$save_LDFLAGS" + LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } -if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then +if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= @@ -44863,8 +45954,8 @@ -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then +hard_links=nottested +if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } @@ -44876,9 +45967,9 @@ ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + if test no = "$hard_links"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -44895,17 +45986,21 @@ case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". + # -C means demangle to GNU nm, but means don't demangle to AIX nm. + # Without the "-l" option, or with the "-B" option, AIX nm treats + # weak defined symbols like other global defined symbols, whereas + # GNU nm marks them as "W". + # While the 'weak' keyword is ignored in the Export File, we need + # it in the Import File for the 'aix-soname' feature, so we have + # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) - export_symbols_cmds_CXX="$ltdll_cmds" + export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in @@ -44928,7 +46023,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } -test "$ld_shlibs_CXX" = no && can_build_shared=no +test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld @@ -44945,7 +46040,7 @@ # Assume -lc should be added archive_cmds_need_lc_CXX=yes - if test "$enable_shared" = yes && test "$GCC" = yes; then + if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. @@ -45073,7 +46168,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext_cmds=".so" +shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -45090,14 +46185,16 @@ # flags to be left without arguments need_version=unknown + + case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' + soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) @@ -45105,41 +46202,91 @@ need_lib_prefix=no need_version=no hardcode_into_libs=yes - if test "$host_cpu" = ia64; then + if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in + # the line '#! .'. This would cause the generated library to + # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then + echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # Using Import Files as archive members, it is possible to support + # filename-based versioning of shared library archives on AIX. While + # this would work for both with and without runtime linking, it will + # prevent static linking of such archives. So we do filename-based + # shared library versioning with .so extension only, which is used + # when both runtime linking and shared linking is enabled. + # Unfortunately, runtime linking may impact performance, so we do + # not want this to be the default eventually. Also, we use the + # versioned .so libs for executables only if there is the -brtl + # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. + # To allow for filename-based versioning support, we need to create + # libNAME.so.V as an archive file, containing: + # *) an Import File, referring to the versioned filename of the + # archive as well as the shared archive member, telling the + # bitwidth (32 or 64) of that shared object, and providing the + # list of exported symbols of that shared object, eventually + # decorated with the 'weak' keyword + # *) the shared object with the F_LOADONLY flag set, to really avoid + # it being seen by the linker. + # At run time we better use the real file rather than another symlink, + # but for link time we create the symlink libNAME.so -> libNAME.so.V + + case $with_aix_soname,$aix_use_runtimelinking in + # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then + aix,yes) # traditional libtool + dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + ;; + aix,no) # traditional AIX only + dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + ;; + svr4,*) # full svr4 only + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,yes) # both, prefer svr4 + dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" + library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' + # unpreferred sharedlib libNAME.a needs extra handling + postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' + postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' + # We do not specify a path in Import Files, so LIBPATH fires. + shlibpath_overrides_runpath=yes + ;; + *,no) # both, prefer aix + dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" + library_names_spec='$libname$release.a $libname.a' + soname_spec='$libname$release$shared_ext$major' + # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling + postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' + postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' + ;; + esac shlibpath_var=LIBPATH fi ;; @@ -45149,18 +46296,18 @@ powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) - library_names_spec='${libname}${shared_ext}' + library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; @@ -45168,8 +46315,8 @@ bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" @@ -45181,7 +46328,7 @@ cygwin* | mingw* | pw32* | cegcc*) version_type=windows - shrext_cmds=".dll" + shrext_cmds=.dll need_version=no need_lib_prefix=no @@ -45190,8 +46337,8 @@ # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ @@ -45207,16 +46354,16 @@ case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' @@ -45225,8 +46372,8 @@ *,cl*) # Native MSVC libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' + soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='$libname.dll.lib' case $build_os in mingw*) @@ -45253,7 +46400,7 @@ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) - sys_lib_search_path_spec="$LIB" + sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` @@ -45266,8 +46413,8 @@ esac # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' @@ -45280,7 +46427,7 @@ *) # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac @@ -45293,8 +46440,8 @@ version_type=darwin need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' + library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' + soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' @@ -45306,8 +46453,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -45325,12 +46472,13 @@ version_type=freebsd-$objformat case $version_type in freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac @@ -45360,10 +46508,10 @@ need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH - shlibpath_overrides_runpath=yes + shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -45381,14 +46529,15 @@ dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' + if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' @@ -45396,8 +46545,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; @@ -45406,8 +46555,8 @@ dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... @@ -45420,8 +46569,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -45432,7 +46581,7 @@ case $host_os in nonstopux*) version_type=nonstopux ;; *) - if test "$lt_cv_prog_gnu_ld" = yes; then + if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix @@ -45440,8 +46589,8 @@ esac need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= @@ -45460,8 +46609,8 @@ esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" + sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; @@ -45470,13 +46619,33 @@ dynamic_linker=no ;; +linux*android*) + version_type=none # Android doesn't support versioned libraries. + need_lib_prefix=no + need_version=no + library_names_spec='$libname$release$shared_ext' + soname_spec='$libname$release$shared_ext' + finish_cmds= + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + dynamic_linker='Android linker' + # Don't embed -rpath directories since the linker doesn't support them. + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no @@ -45520,7 +46689,12 @@ # before this can be enabled. hardcode_into_libs=yes - # Append ld.so.conf contents to the search path + # Ideally, we could use ldconfig to report *all* directores which are + # searched for libraries, however this is still not possible. Aside from not + # being certain /sbin/ldconfig is available, command + # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, + # even though it is searched at run-time. Try to do the best guess by + # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" @@ -45552,12 +46726,12 @@ need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH @@ -45567,7 +46741,7 @@ newsos6) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; @@ -45576,58 +46750,68 @@ version_type=qnx need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; -openbsd*) +openbsd* | bitrig*) version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" + sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then + need_version=no else - shlibpath_overrides_runpath=yes + need_version=yes fi + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' - shrext_cmds=".dll" + version_type=windows + shrext_cmds=.dll + need_version=no need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' + # OS/2 can only load a DLL with a base name of 8 characters or less. + soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; + v=$($ECHO $release$versuffix | tr -d .-); + n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); + $ECHO $n$v`$shared_ext' + library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH + shlibpath_var=BEGINLIBPATH + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + postinstall_cmds='base_file=`basename \$file`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname~ + chmod a+x \$dldir/$dlname~ + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; + fi' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='$libname$release$shared_ext$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) @@ -45638,8 +46822,8 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes @@ -45649,11 +46833,11 @@ sunos4*) version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes @@ -45661,8 +46845,8 @@ sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) @@ -45683,24 +46867,24 @@ ;; sysv4*MP*) - if test -d /usr/nec ;then + if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' - soname_spec='$libname${shared_ext}.$major' + library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' + soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf + version_type=sco need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then + if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' @@ -45718,7 +46902,7 @@ version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes @@ -45726,8 +46910,8 @@ uts4*) version_type=linux # correct to gnu/linux during the next big refactor - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' + soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; @@ -45737,20 +46921,32 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no +test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then +if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then + sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" + +if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then + sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... +configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec + +# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + +# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool +configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH + + + @@ -45793,15 +46989,15 @@ hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || - test "X$hardcode_automatic_CXX" = "Xyes" ; then + test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. - if test "$hardcode_direct_CXX" != no && + if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && - test "$hardcode_minus_L_CXX" != no; then + ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && + test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else @@ -45816,12 +47012,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } -if test "$hardcode_action_CXX" = relink || - test "$inherit_rpath_CXX" = yes; then +if test relink = "$hardcode_action_CXX" || + test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then +elif test yes = "$shlibpath_overrides_runpath" || + test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi @@ -45844,7 +47040,7 @@ lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes +fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -45885,22 +47081,6 @@ fi -# Check whether --enable-fips140-mode was given. -if test "${enable_fips140_mode+set}" = set; then : - enableval=$enable_fips140_mode; enable_fips=$enableval -else - enable_fips=no -fi - - if test "$enable_fips" = "yes"; then - ENABLE_FIPS140_TRUE= - ENABLE_FIPS140_FALSE='#' -else - ENABLE_FIPS140_TRUE='#' - ENABLE_FIPS140_FALSE= -fi - -if test "$enable_fips" = "yes" ;then @@ -46451,6 +47631,23 @@ + +# Check whether --enable-fips140-mode was given. +if test "${enable_fips140_mode+set}" = set; then : + enableval=$enable_fips140_mode; enable_fips=$enableval +else + enable_fips=no +fi + + if test "$enable_fips" = "yes"; then + ENABLE_FIPS140_TRUE= + ENABLE_FIPS140_FALSE='#' +else + ENABLE_FIPS140_TRUE='#' + ENABLE_FIPS140_FALSE= +fi + +if test "$enable_fips" = "yes" ;then if test "x$HAVE_LIBDL" = "xyes";then enable_self_checks=yes @@ -46487,6 +47684,14 @@ $as_echo "#define ENABLE_NON_SUITEB_CURVES 1" >>confdefs.h fi + if test "$enable_non_suiteb" = "yes"; then + ENABLE_NON_SUITEB_CURVES_TRUE= + ENABLE_NON_SUITEB_CURVES_FALSE='#' +else + ENABLE_NON_SUITEB_CURVES_TRUE='#' + ENABLE_NON_SUITEB_CURVES_FALSE= +fi + if test "$enable_self_checks" = "yes"; then ENABLE_SELF_CHECKS_TRUE= @@ -46502,6 +47707,50 @@ fi + +# Check whether --with-arcfour128 was given. +if test "${with_arcfour128+set}" = set; then : + withval=$with_arcfour128; enable_arcfour=$withval +else + enable_arcfour=no +fi + +if test "$enable_arcfour" = "yes" ;then + +$as_echo "#define ENABLE_ARCFOUR128 1" >>confdefs.h + +fi + if test "$enable_arcfour" = "yes"; then + ENABLE_ARCFOUR128_TRUE= + ENABLE_ARCFOUR128_FALSE='#' +else + ENABLE_ARCFOUR128_TRUE='#' + ENABLE_ARCFOUR128_FALSE= +fi + + + +# Check whether --with-ssl3 was given. +if test "${with_ssl3+set}" = set; then : + withval=$with_ssl3; enable_ssl3=$withval +else + enable_ssl3=no +fi + +if test "$enable_ssl3" = "yes" ;then + +$as_echo "#define ENABLE_SSL3 1" >>confdefs.h + +fi + if test "$enable_ssl3" = "yes"; then + ENABLE_SSL3_TRUE= + ENABLE_SSL3_FALSE='#' +else + ENABLE_SSL3_TRUE='#' + ENABLE_SSL3_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build libdane" >&5 $as_echo_n "checking whether to build libdane... " >&6; } # Check whether --enable-libdane was given. @@ -46580,7 +47829,11 @@ if test -f /var/lib/unbound/root.key;then unbound_root_key_file="/var/lib/unbound/root.key" else - unbound_root_key_file="/etc/unbound/root.key" + if test -f /usr/share/dns/root.key;then + unbound_root_key_file="/usr/share/dns/root.key" + else + unbound_root_key_file="/etc/unbound/root.key" + fi fi fi @@ -46698,6 +47951,14 @@ else GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1" fi + if ! $PKG_CONFIG --atleast-version=0.22.0 p11-kit-1; then + with_buggy_p11_kit=yes + fi + if $PKG_CONFIG --atleast-version=0.23.1 p11-kit-1; then + +$as_echo "#define P11_KIT_HAS_PIN_VALUE 1" >>confdefs.h + + fi else with_p11_kit=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: @@ -46721,6 +47982,14 @@ ENABLE_PKCS11_FALSE= fi + if test "$with_buggy_p11_kit" = "yes"; then + HAVE_BUGGY_P11_KIT_TRUE= + HAVE_BUGGY_P11_KIT_FALSE='#' +else + HAVE_BUGGY_P11_KIT_TRUE='#' + HAVE_BUGGY_P11_KIT_FALSE= +fi + # Check whether --with-tpm was given. @@ -46786,6 +48055,37 @@ fi +for l in /usr/lib64 /usr/lib /lib64 /lib /usr/lib/x86_64-linux-gnu/; do + if test -f "${l}/libtspi.so.1";then + default_trousers_lib="${l}/libtspi.so.1" + break + fi +done + + +# Check whether --with-trousers-lib was given. +if test "${with_trousers_lib+set}" = set; then : + withval=$with_trousers_lib; ac_trousers_lib=$withval +else + ac_trousers_lib=$default_trousers_lib +fi + + +if test "$with_tpm" != "no" && test -z "$ac_trousers_lib"; then + as_fn_error $? " + *** + *** unable to find trousers library, please specify with --with-trousers-lib= + *** + " "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define TROUSERS_LIB "$ac_trousers_lib" +_ACEOF + + + ac_header_dirent=no @@ -47034,6 +48334,62 @@ done + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5 +$as_echo_n "checking for working stdnoreturn.h... " >&6; } +if ${gl_cv_header_working_stdnoreturn_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + /* Do not check for 'noreturn' after the return type. + C11 allows it, but it's rarely done that way + and circa-2012 bleeding-edge GCC rejects it when given + -Werror=old-style-declaration. */ + noreturn void foo1 (void) { exit (0); } + _Noreturn void foo2 (void) { exit (0); } + int testit (int argc, char **argv) { + if (argc & 1) + return 0; + (argv[0][0] ? foo1 : foo2) (); + } + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_working_stdnoreturn_h=yes +else + gl_cv_header_working_stdnoreturn_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5 +$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; } + + if test $gl_cv_header_working_stdnoreturn_h = yes; then + STDNORETURN_H='' + else + STDNORETURN_H='stdnoreturn.h' + fi + + + if test -n "$STDNORETURN_H"; then + GL_GENERATE_STDNORETURN_H_TRUE= + GL_GENERATE_STDNORETURN_H_FALSE='#' +else + GL_GENERATE_STDNORETURN_H_TRUE='#' + GL_GENERATE_STDNORETURN_H_FALSE= +fi + + + # ---------------------------------------------------------------------- # check for various programs used during the build. # On OS/X, "wchar.h" needs "runetype.h" to work properly. @@ -47240,32 +48596,32 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char*" >&5 -$as_echo_n "checking size of char*... " >&6; } -if ${ac_cv_sizeof_charp+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 +$as_echo_n "checking size of char *... " >&6; } +if ${ac_cv_sizeof_char_p+:} false; then : $as_echo_n "(cached) " >&6 else - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char*))" "ac_cv_sizeof_charp" "$ac_includes_default"; then : + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"; then : else - if test "$ac_cv_type_charp" = yes; then + if test "$ac_cv_type_char_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute sizeof (char*) +as_fn_error 77 "cannot compute sizeof (char *) See \`config.log' for more details" "$LINENO" 5; } else - ac_cv_sizeof_charp=0 + ac_cv_sizeof_char_p=0 fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_charp" >&5 -$as_echo "$ac_cv_sizeof_charp" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 +$as_echo "$ac_cv_sizeof_char_p" >&6; } cat >>confdefs.h <<_ACEOF -#define SIZEOF_CHARP $ac_cv_sizeof_charp +#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p _ACEOF @@ -48014,14 +49370,14 @@ Xyes|Xno|X ) case "X${libopts_cv_with_libregex_root}" in Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;; - * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;; + * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;; esac esac case "X${libopts_cv_with_libregex_libs}" in Xyes|Xno|X ) case "X${libopts_cv_with_libregex_root}" in Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;; - * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex";; + * ) libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;; esac esac libopts_save_CPPFLAGS="${CPPFLAGS}" @@ -48055,7 +49411,7 @@ #include #include REGEX_HEADER static regex_t re; -void comp_re( char const* pzPat ) { +void comp_re(char const * pzPat) { int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE ); if (res == 0) return; exit( res ); } @@ -48118,8 +49474,8 @@ /* end confdefs.h. */ #include #include -int main (int argc, char** argv) { - char* pz = pathfind( getenv( "PATH" ), "sh", "x" ); +int main (int argc, char ** argv) { + char * pz = pathfind( getenv( "PATH" ), "sh", "x" ); return (pz == 0) ? 1 : 0; } _ACEOF @@ -48191,7 +49547,7 @@ /* end confdefs.h. */ #include #include -int main (int argc, char** argv) { +int main (int argc, char ** argv) { #ifndef PATH_MAX choke me!! #else @@ -48294,8 +49650,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -int main (int argc, char** argv) { -FILE* fp = fopen("conftest.$ac_ext", "rb"); +int main (int argc, char ** argv) { +FILE * fp = fopen("conftest.$ac_ext", "rb"); return (fp == NULL) ? 1 : fclose(fp); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -48340,8 +49696,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -int main (int argc, char** argv) { -FILE* fp = fopen("conftest.$ac_ext", "rt"); +int main (int argc, char ** argv) { +FILE * fp = fopen("conftest.$ac_ext", "rt"); return (fp == NULL) ? 1 : fclose(fp); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : @@ -50043,6 +51399,10 @@ as_fn_error $? "conditional \"ENABLE_NETTLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${USE_NETTLE3_TRUE}" && test -z "${USE_NETTLE3_FALSE}"; then + as_fn_error $? "conditional \"USE_NETTLE3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_MINITASN1_TRUE}" && test -z "${ENABLE_MINITASN1_FALSE}"; then as_fn_error $? "conditional \"ENABLE_MINITASN1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -50107,6 +51467,10 @@ as_fn_error $? "conditional \"ENABLE_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -50279,10 +51643,22 @@ as_fn_error $? "conditional \"ENABLE_FIPS140\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_NON_SUITEB_CURVES_TRUE}" && test -z "${ENABLE_NON_SUITEB_CURVES_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_NON_SUITEB_CURVES\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_SELF_CHECKS_TRUE}" && test -z "${ENABLE_SELF_CHECKS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_SELF_CHECKS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_ARCFOUR128_TRUE}" && test -z "${ENABLE_ARCFOUR128_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_ARCFOUR128\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_SSL3_TRUE}" && test -z "${ENABLE_SSL3_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_SSL3\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_DANE_TRUE}" && test -z "${ENABLE_DANE_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DANE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -50291,10 +51667,18 @@ as_fn_error $? "conditional \"ENABLE_PKCS11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_BUGGY_P11_KIT_TRUE}" && test -z "${HAVE_BUGGY_P11_KIT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_BUGGY_P11_KIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_TROUSERS_TRUE}" && test -z "${ENABLE_TROUSERS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_TROUSERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -50716,7 +52100,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GnuTLS $as_me 3.3.8, which was +This file was extended by GnuTLS $as_me 3.3.30, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -50786,7 +52170,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GnuTLS config.status 3.3.8 +GnuTLS config.status 3.3.30 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -50929,6 +52313,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' @@ -50978,10 +52363,13 @@ GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' @@ -51046,7 +52434,8 @@ finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' +configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' @@ -51151,9 +52540,12 @@ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ +lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +lt_cv_nm_interface \ nm_file_list_spec \ +lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ @@ -51219,7 +52611,7 @@ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -51246,7 +52638,8 @@ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec \ +configure_time_dlsearch_path \ +configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ @@ -51260,7 +52653,7 @@ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -51269,19 +52662,16 @@ done ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' -# See if we are running on zsh, and set the options which allow our +# See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then +if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' @@ -52202,55 +53592,52 @@ done ;; "libtool":C) - # See if we are running on zsh, and set the options which allow our + # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then + if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi - cfgfile="${ofile}T" + cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: +# Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. + +# Provide generalized library-building support services. +# Written by Gordon Matzigkeit, 1996 + +# Copyright (C) 2014 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# GNU Libtool is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of of the License, or +# (at your option) any later version. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of -# the License, or (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program or library that is built +# using GNU Libtool, you may include this file under the same +# distribution terms that you use for the rest of that program. # -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of +# GNU Libtool is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# along with this program. If not, see . # The names of the tagged configurations supported by this script. -available_tags="CXX " +available_tags='CXX ' + +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG @@ -52270,6 +53657,9 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shared archive member basename,for filename based shared library versioning on AIX. +shared_archive_member_spec=$shared_archive_member_spec + # Shell to use when invoking shell scripts. SHELL=$lt_SHELL @@ -52387,18 +53777,27 @@ # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl +# Transform the output of nm into a list of symbols to manually relocate. +global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import + # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix +# The name lister interface. +nm_interface=$lt_lt_cv_nm_interface + # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec -# The root where to search for dependent libraries,and in which our libraries should be installed. +# The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot +# Command to truncate a binary pipe. +lt_truncate_bin=$lt_lt_cv_truncate_bin + # The name of the directory that contains temporary libtool files. objdir=$objdir @@ -52489,8 +53888,11 @@ # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec +# Detected run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path + +# Explicit LT_SYS_LIBRARY_PATH set during ./configure time. +configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen @@ -52583,13 +53985,13 @@ # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute @@ -52655,13 +54057,72 @@ _LT_EOF + cat <<'_LT_EOF' >> "$cfgfile" + +# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE + +# func_munge_path_list VARIABLE PATH +# ----------------------------------- +# VARIABLE is name of variable containing _space_ separated list of +# directories to be munged by the contents of PATH, which is string +# having a format: +# "DIR[:DIR]:" +# string "DIR[ DIR]" will be prepended to VARIABLE +# ":DIR[:DIR]" +# string "DIR[ DIR]" will be appended to VARIABLE +# "DIRP[:DIRP]::[DIRA:]DIRA" +# string "DIRP[ DIRP]" will be prepended to VARIABLE and string +# "DIRA[ DIRA]" will be appended to VARIABLE +# "DIR[:DIR]" +# VARIABLE will be replaced by "DIR[ DIR]" +func_munge_path_list () +{ + case x$2 in + x) + ;; + *:) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" + ;; + x:*) + eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" + ;; + *::*) + eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" + eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" + ;; + *) + eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" + ;; + esac +} + + +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. +func_cc_basename () +{ + for cc_temp in $*""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac + done + func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` +} + + +# ### END FUNCTIONS SHARED WITH CONFIGURE + +_LT_EOF + case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then +if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -52670,7 +54131,7 @@ esac -ltmain="$ac_aux_dir/ltmain.sh" +ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if @@ -52680,165 +54141,6 @@ sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -52925,13 +54227,13 @@ # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes +# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the +# "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX @@ -53049,6 +54351,7 @@ Local libopts: ${enable_local_libopts} Local libtasn1: ${included_libtasn1} Use nettle-mini: ${mini_nettle} + nettle-version: ${nettle_version} " >&5 $as_echo "$as_me: summary of build options: @@ -53062,6 +54365,7 @@ Local libopts: ${enable_local_libopts} Local libtasn1: ${included_libtasn1} Use nettle-mini: ${mini_nettle} + nettle-version: ${nettle_version} " >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: External hardware support: @@ -53080,6 +54384,14 @@ PKCS#11 support: $with_p11_kit TPM support: $with_tpm " >&6;} +if test -n "$ac_trousers_lib";then +{ $as_echo "$as_me:${as_lineno-$LINENO}: + TPM library: $ac_trousers_lib +" >&5 +$as_echo "$as_me: + TPM library: $ac_trousers_lib +" >&6;} +fi { $as_echo "$as_me:${as_lineno-$LINENO}: Optional features: (note that included applications might not compile properly diff -Nru gnutls28-3.3.8/configure.ac gnutls28-3.3.30/configure.ac --- gnutls28-3.3.8/configure.ac 2014-09-18 07:12:01.000000000 -0400 +++ gnutls28-3.3.30/configure.ac 2018-07-16 01:31:52.000000000 -0400 @@ -21,12 +21,12 @@ # USA AC_PREREQ(2.61) -AC_INIT([GnuTLS], [3.3.8], [bugs@gnutls.org]) +AC_INIT([GnuTLS], [3.3.30], [bugs@gnutls.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_HOST -AM_INIT_AUTOMAKE([1.12.2 subdir-objects no-dist-gzip dist-xz dist-lzip -Wall -Wno-override]) +AM_INIT_AUTOMAKE([1.12.2 subdir-objects no-dist-gzip dist-xz -Wall -Wno-override]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS([config.h]) @@ -47,6 +47,8 @@ AC_PROG_SED AC_CHECK_PROG([AUTOGEN], [autogen], [autogen], [/bin/true]) +AC_USE_SYSTEM_EXTENSIONS + if test x"$AUTOGEN" = "x/bin/true"; then AC_MSG_WARN([[ *** @@ -79,6 +81,7 @@ AM_CONDITIONAL(WANT_TEST_SUITE, [test -f tests/suite/mini-eagain2.c]) dnl Detect windows build +use_accel=yes case "$host" in *mingw32* | *mingw64*) have_win=yes @@ -86,6 +89,14 @@ *darwin*) have_macosx=yes ;; + *solaris*) + use_accel=no + AC_MSG_WARN([[ +*** +*** In solaris hardware acceleration is disabled by default due to issues +*** with the assembler. Use --enable-hardware-acceleration to enable it. +*** ]]) + ;; *) have_elf=yes ;; @@ -98,7 +109,7 @@ dnl Hardware Acceleration AC_ARG_ENABLE(hardware-acceleration, AS_HELP_STRING([--disable-hardware-acceleration], [unconditionally disable hardware acceleration]), - use_accel=$enableval, use_accel=yes) + use_accel=$enableval) hw_accel=none @@ -156,7 +167,7 @@ dnl No fork on MinGW, disable some self-tests until we fix them. dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs) -AC_CHECK_FUNCS([fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,) +AC_CHECK_FUNCS([secure_getenv fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,) if test "$ac_cv_func_vasprintf" != "yes";then AC_MSG_CHECKING([for va_copy]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ @@ -198,6 +209,10 @@ gnutls_needs_librt=yes fi +if test "$ac_cv_func_inet_pton" != "yes";then + AC_LIB_HAVE_LINKFLAGS(nsl,, [#include ], [inet_pton(0,0,0);]) +fi + if test "$ac_cv_func_clock_gettime" != "yes";then AC_LIB_HAVE_LINKFLAGS(rt,, [#include ], [clock_gettime (0, 0);]) gnutls_needs_librt=yes @@ -302,12 +317,13 @@ AS_HELP_STRING([--enable-self-checks], [enable self checking functionality]), enable_self_checks=$enableval, enable_self_checks=no) +AC_LIB_HAVE_LINKFLAGS(dl,, [#include ], [dladdr (0, 0);]) + AC_ARG_ENABLE(fips140-mode, AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode (implies self checks)]), enable_fips=$enableval, enable_fips=no) AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes") if [ test "$enable_fips" = "yes" ];then - AC_LIB_HAVE_LINKFLAGS(dl,, [#include ], [dladdr (0, 0);]) if test "x$HAVE_LIBDL" = "xyes";then enable_self_checks=yes @@ -330,12 +346,29 @@ if [ test "$enable_non_suiteb" = "yes" ];then AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves]) fi +AM_CONDITIONAL(ENABLE_NON_SUITEB_CURVES, test "$enable_non_suiteb" = "yes") AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes") if [ test "$enable_self_checks" = "yes" ];then AC_DEFINE([ENABLE_SELF_CHECKS], 1, [Self checks are included in the library]) fi +AC_ARG_WITH(arcfour128, + AS_HELP_STRING([--with-arcfour128], [include ARCFOUR128 in priority strings]), + enable_arcfour=$withval, enable_arcfour=no) +if [ test "$enable_arcfour" = "yes" ];then + AC_DEFINE([ENABLE_ARCFOUR128], 1, [Enable ARCFOUR128]) +fi +AM_CONDITIONAL(ENABLE_ARCFOUR128, test "$enable_arcfour" = "yes") + +AC_ARG_WITH(ssl3, + AS_HELP_STRING([--with-ssl3], [include SSL3.0 in priority strings]), + enable_ssl3=$withval, enable_ssl3=no) +if [ test "$enable_ssl3" = "yes" ];then + AC_DEFINE([ENABLE_SSL3], 1, [Enable SSL3.0]) +fi +AM_CONDITIONAL(ENABLE_SSL3, test "$enable_ssl3" = "yes") + AC_MSG_CHECKING([whether to build libdane]) AC_ARG_ENABLE(libdane, AS_HELP_STRING([--disable-libdane], @@ -375,7 +408,11 @@ if test -f /var/lib/unbound/root.key;then unbound_root_key_file="/var/lib/unbound/root.key" else - unbound_root_key_file="/etc/unbound/root.key" + if test -f /usr/share/dns/root.key;then + unbound_root_key_file="/usr/share/dns/root.key" + else + unbound_root_key_file="/etc/unbound/root.key" + fi fi fi ) @@ -407,6 +444,12 @@ else GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1" fi + if ! $PKG_CONFIG --atleast-version=0.22.0 p11-kit-1; then + with_buggy_p11_kit=yes + fi + if $PKG_CONFIG --atleast-version=0.23.1 p11-kit-1; then + AC_DEFINE([P11_KIT_HAS_PIN_VALUE], 1, [p11-kit supports p11_kit_uri_get_pin_value()]) + fi else with_p11_kit=no AC_MSG_WARN([[ @@ -418,6 +461,7 @@ fi AM_CONDITIONAL(ENABLE_PKCS11, test "$with_p11_kit" != "no") +AM_CONDITIONAL(HAVE_BUGGY_P11_KIT, test "$with_buggy_p11_kit" = "yes") AC_ARG_WITH(tpm, AS_HELP_STRING([--without-tpm], @@ -447,6 +491,28 @@ AM_CONDITIONAL(ENABLE_TROUSERS, test "$with_tpm" != "no") +for l in /usr/lib64 /usr/lib /lib64 /lib /usr/lib/x86_64-linux-gnu/; do + if test -f "${l}/libtspi.so.1";then + default_trousers_lib="${l}/libtspi.so.1" + break + fi +done + +AC_ARG_WITH(trousers-lib, AS_HELP_STRING([--with-trousers-lib=LIB], + [set the location of the trousers library]), + ac_trousers_lib=$withval, ac_trousers_lib=$default_trousers_lib) + +if test "$with_tpm" != "no" && test -z "$ac_trousers_lib"; then + AC_MSG_ERROR([[ + *** + *** unable to find trousers library, please specify with --with-trousers-lib= + *** + ]]) +fi + +AC_DEFINE_UNQUOTED(TROUSERS_LIB, ["$ac_trousers_lib"], [the location of the trousers library]) +AC_SUBST(TROUSERS_LIB) + LIBOPTS_CHECK([src/libopts]) if test "$NEED_LIBOPTS_DIR" = "true";then dnl replace libopts-generated files with distributed backups, if present @@ -819,6 +885,7 @@ Local libopts: ${enable_local_libopts} Local libtasn1: ${included_libtasn1} Use nettle-mini: ${mini_nettle} + nettle-version: ${nettle_version} ]) AC_MSG_NOTICE([External hardware support: @@ -829,6 +896,11 @@ PKCS#11 support: $with_p11_kit TPM support: $with_tpm ]) +if test -n "$ac_trousers_lib";then +AC_MSG_NOTICE([ + TPM library: $ac_trousers_lib +]) +fi AC_MSG_NOTICE([Optional features: (note that included applications might not compile properly diff -Nru gnutls28-3.3.8/debian/changelog gnutls28-3.3.30/debian/changelog --- gnutls28-3.3.8/debian/changelog 2017-06-24 11:50:29.000000000 -0400 +++ gnutls28-3.3.30/debian/changelog 2018-10-22 14:33:06.000000000 -0400 @@ -1,3 +1,48 @@ +gnutls28 (3.3.30-1+deb8u) UNRELEASED; urgency=medium + + * Backport 3.3.30 from upstream to address CVE-2018-10844, + CVE-2018-10845 and CVE-2018-10846. + * Add net-tools dependency for test suite which expects the netstat + command. + * Removed patches already present upstream: + * 35_recheck_urandom_fd.diff + * 36_less_refresh-rnd-state.diff + * 37_X9.63_sanity_check.diff + * 38_testforsanitycheck.diff + * 39_check-whether-the-two-signatur.patch + * 40_no_more_ssl3.diff + * 45_eliminated-double-free.diff + * 46_Better-fix-for-the-double-free.diff + * 47_GNUTLS-SA-2015-3.patch + * 50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch + * 51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch + * 51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch + * 51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch + * 52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch + * 53_nettle-use-rsa_-_key_prepare-on-key-import.patch + * 55_00_pkcs12-fixed-the-calculation-of-p_size.patch + * 55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch + * 55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch + * 55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch + * 55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch + * 55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch + * 55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch + * 55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch + * 55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch + * 55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch + * 55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch + * 55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch + * 55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch + * 55_13_cdk_pkt_read-enforce-packet-limits.patch + * 55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch + * 55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch + * 56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch + * 56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch + * 56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch + * 57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch + + -- Antoine Beaupré Mon, 22 Oct 2018 14:33:06 -0400 + gnutls28 (3.3.8-6+deb8u7) jessie; urgency=medium * 57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch from diff -Nru gnutls28-3.3.8/debian/control gnutls28-3.3.30/debian/control --- gnutls28-3.3.8/debian/control 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/control 2018-10-22 14:33:06.000000000 -0400 @@ -10,7 +10,7 @@ libtasn1-6-dev (>= 3.9), autotools-dev, guile-2.0-dev [!ia64 !m68k], datefudge, libp11-kit-dev (>= 0.20.7), pkg-config, chrpath, libidn11-dev, autogen (>= 1:5.16-0), bison, dh-autoreconf, libgmp-dev (>= 2:6), - libopts25-dev + libopts25-dev, net-tools # The b-d on libgmp-dev is not technically necessary, since nettle brings # it along. However we want to enforce that gnutls is only built if the # dual-licensed GMP is available, otherwise the resulting binary diff -Nru gnutls28-3.3.8/debian/libgnutls-deb0-28.symbols gnutls28-3.3.30/debian/libgnutls-deb0-28.symbols --- gnutls28-3.3.8/debian/libgnutls-deb0-28.symbols 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/libgnutls-deb0-28.symbols 2018-10-22 14:33:06.000000000 -0400 @@ -9,6 +9,7 @@ GNUTLS_DEBIAN_0_FIPS140@GNUTLS_DEBIAN_0_FIPS140 3.3.0 (regex|optional)"@GNUTLS_DEBIAN_0_PRIVATE$" 3.3.8-~0 _gnutls_encode_ber_rs_raw@GNUTLS_DEBIAN_0_FIPS140 3.3.0 + _gnutls_global_init_skip@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_alert_get@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_alert_get_name@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_alert_get_strname@GNUTLS_DEBIAN_0_3_0_0 3.3.0 @@ -348,7 +349,9 @@ gnutls_pk_to_sign@GNUTLS_DEBIAN_0_3_0_0 3.3.0 gnutls_pkcs11_add_provider@GNUTLS_DEBIAN_0_2_12 3.3.0 gnutls_pkcs11_copy_secret_key@GNUTLS_DEBIAN_0_2_12 3.3.8 + gnutls_pkcs11_copy_x509_crt2@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_pkcs11_copy_x509_crt@GNUTLS_DEBIAN_0_2_12 3.3.8 + gnutls_pkcs11_copy_x509_privkey2@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_pkcs11_copy_x509_privkey@GNUTLS_DEBIAN_0_2_12 3.3.8 gnutls_pkcs11_crt_is_known@GNUTLS_DEBIAN_0_3_1_0 3.3.0 gnutls_pkcs11_deinit@GNUTLS_DEBIAN_0_2_12 3.3.0 @@ -370,11 +373,13 @@ gnutls_pkcs11_obj_init@GNUTLS_DEBIAN_0_2_12 3.3.0 gnutls_pkcs11_obj_list_import_url2@GNUTLS_DEBIAN_0_3_1_0 3.3.8 gnutls_pkcs11_obj_list_import_url@GNUTLS_DEBIAN_0_2_12 3.3.8 + gnutls_pkcs11_obj_set_info@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_pkcs11_obj_set_pin_function@GNUTLS_DEBIAN_0_3_1_0 3.3.0 gnutls_pkcs11_privkey_deinit@GNUTLS_DEBIAN_0_2_12 3.3.0 gnutls_pkcs11_privkey_export_pubkey@GNUTLS_DEBIAN_0_3_1_0 3.3.7 gnutls_pkcs11_privkey_export_url@GNUTLS_DEBIAN_0_2_12 3.3.0 gnutls_pkcs11_privkey_generate2@GNUTLS_DEBIAN_0_3_1_0 3.3.8 + gnutls_pkcs11_privkey_generate3@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_pkcs11_privkey_generate@GNUTLS_DEBIAN_0_3_0_0 3.3.0 gnutls_pkcs11_privkey_get_info@GNUTLS_DEBIAN_0_2_12 3.3.0 gnutls_pkcs11_privkey_get_pk_algorithm@GNUTLS_DEBIAN_0_2_12 3.3.0 @@ -867,6 +872,7 @@ gnutls_x509_crt_set_issuer_alt_name@GNUTLS_DEBIAN_0_3_1_0 3.3.0 gnutls_x509_crt_set_issuer_dn@GNUTLS_DEBIAN_0_3_1_0 3.3.0 gnutls_x509_crt_set_issuer_dn_by_oid@GNUTLS_DEBIAN_0_1_4 3.3.0 + gnutls_x509_crt_set_issuer_unique_id@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_x509_crt_set_key@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_set_key_purpose_oid@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_set_key_usage@GNUTLS_DEBIAN_0_1_4 3.3.0 @@ -881,6 +887,7 @@ gnutls_x509_crt_set_subject_alt_name@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_set_subject_alternative_name@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_set_subject_key_id@GNUTLS_DEBIAN_0_1_4 3.3.0 + gnutls_x509_crt_set_subject_unique_id@GNUTLS_DEBIAN_0_3_1_0 3.3.30-1+deb8u gnutls_x509_crt_set_version@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_sign2@GNUTLS_DEBIAN_0_1_4 3.3.0 gnutls_x509_crt_sign@GNUTLS_DEBIAN_0_1_4 3.3.0 diff -Nru gnutls28-3.3.8/debian/patches/20_debian_specific_soname.diff gnutls28-3.3.30/debian/patches/20_debian_specific_soname.diff --- gnutls28-3.3.8/debian/patches/20_debian_specific_soname.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/20_debian_specific_soname.diff 2018-10-22 14:33:06.000000000 -0400 @@ -9,8 +9,10 @@ Forwarded: http://lists.gnutls.org/pipermail/gnutls-devel/2014-May/006938.html Last-Update: 2014-09-18 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am +Index: b/lib/Makefile.am +=================================================================== +--- a/lib/Makefile.am 2018-10-22 14:44:03.986028336 -0400 ++++ b/lib/Makefile.am 2018-10-22 14:44:03.986028336 -0400 @@ -123,6 +123,7 @@ libgnutls_la_SOURCES = $(HFILES) $(COBJE gnutls.asn pkix.asn libgnutls.map @@ -19,8 +21,10 @@ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) libgnutls_la_LIBADD = ../gl/libgnu.la x509/libgnutls_x509.la \ ---- a/lib/libgnutls.map -+++ b/lib/libgnutls.map +Index: b/lib/libgnutls.map +=================================================================== +--- a/lib/libgnutls.map 2018-10-22 14:44:03.986028336 -0400 ++++ b/lib/libgnutls.map 2018-10-22 14:44:36.382538024 -0400 @@ -18,7 +18,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see @@ -87,10 +91,10 @@ global: gnutls_pkcs11_get_pin_function; gnutls_pkcs11_obj_list_import_url2; -@@ -1024,9 +1024,9 @@ GNUTLS_3_1_0 { - gnutls_x509_ext_deinit; - gnutls_x509_ext_print; - gnutls_x509_othername_to_virtual; +@@ -1031,9 +1031,9 @@ GNUTLS_3_1_0 { + gnutls_pkcs11_copy_x509_privkey2; + gnutls_pkcs11_privkey_generate3; + gnutls_pkcs11_obj_set_info; -} GNUTLS_3_0_0; +} GNUTLS_DEBIAN_0_3_0_0; @@ -99,8 +103,8 @@ gnutls_cipher_self_test; gnutls_pk_self_test; gnutls_mac_self_test; -@@ -1045,7 +1045,7 @@ GNUTLS_FIPS140 { - _rsa_generate_fips186_4_keypair; +@@ -1056,7 +1056,7 @@ GNUTLS_FIPS140 { + _gnutls_ecdh_compute_key; }; -GNUTLS_PRIVATE { diff -Nru gnutls28-3.3.8/debian/patches/35_recheck_urandom_fd.diff gnutls28-3.3.30/debian/patches/35_recheck_urandom_fd.diff --- gnutls28-3.3.8/debian/patches/35_recheck_urandom_fd.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/35_recheck_urandom_fd.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,366 +0,0 @@ -Description: When gnutls_global_init() is called manually from the application - check the urandom fd for validity. - . - That addresses the issue where a server closes all open file descriptors - and then calls gnutls_global_init(). - . - This patch cherrypicks the following changes from 3.3.10: - 692a140b56027937ac517484b8a95fcae16a8f73 - 3d112d4d2c32fecc80b7beff14717a2713052de5 - ca1d1efdf6767a00ccefd4e0c7d573d27e563592 - ecd9d7cfe7fb93945fb5605979e690da1791a63a - 684b825f5f78cc7ad1f61be232fd20ee0bc5b56f - c999b03d66bbde418f533ade319178451ae27e79 - 25d7fab329afd72979fc9aa2a258438ae498da01 - e8ffb7944037a45e6f2436a3906ce37e5ea97e3e - c6b5716491f93881cde540b9fc3b8c00bc85278c - 1424a2fd977f6b6373c9ca7f76b715acedb21902 -Author: Andreas Metzler -Bug-Debian: https://bugs.debian.org/768841 - -diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi -index 2dd5c85..b4932ca 100644 ---- a/doc/cha-gtls-app.texi -+++ b/doc/cha-gtls-app.texi -@@ -271,8 +271,7 @@ library. - @node Initialization - @subsection Initialization - --GnuTLS must be initialized before it can be used. The library is --initialized on load; prior to 3.3.0 was initialized by calling @funcref{gnutls_global_init}. -+The GnuTLS library is initialized on load; prior to 3.3.0 was initialized by calling @funcref{gnutls_global_init}. - The initialization typically enables CPU-specific acceleration, performs any required - precalculations needed, opens any required system devices (e.g., /dev/urandom on Linux) - and initializes subsystems that could be used later. -@@ -280,6 +279,11 @@ and initializes subsystems that could be used later. - The resources allocated by the initialization process will be released - on library deinitialization, or explictly by calling @funcref{gnutls_global_deinit}. - -+Note that during initialization file descriptors may be kept open by -+GnuTLS (e.g. /dev/urandom) on library load. Applications closing all unknown file -+descriptors must immediately call @funcref{gnutls_global_init}, after that, to -+ensure they don't disrupt GnuTLS' operation. -+ - @c In order to take advantage of the internationalization features in - @c GnuTLS, such as translated error messages, the application must set - @c the current locale using @code{setlocale} before initializing GnuTLS. -diff --git a/lib/crypto-backend.h b/lib/crypto-backend.h -index 7f4e1b6..09a7d92 100644 ---- a/lib/crypto-backend.h -+++ b/lib/crypto-backend.h -@@ -77,6 +77,7 @@ typedef struct { - - typedef struct gnutls_crypto_rnd { - int (*init) (void **ctx); -+ int (*check) (void **ctx); - int (*rnd) (void *ctx, int level, void *data, size_t datasize); - void (*rnd_refresh) (void *ctx); - void (*deinit) (void *ctx); -diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c -index b9ca0cb..2786626 100644 ---- a/lib/gnutls_global.c -+++ b/lib/gnutls_global.c -@@ -207,6 +207,16 @@ int gnutls_global_init(void) - - _gnutls_init++; - if (_gnutls_init > 1) { -+ if (_gnutls_init == 2 && _gnutls_init_ret == 0) { -+ /* some applications may close the urandom fd -+ * before calling gnutls_global_init(). in that -+ * case reopen it */ -+ ret = _gnutls_rnd_check(); -+ if (ret < 0) { -+ gnutls_assert(); -+ goto out; -+ } -+ } - ret = _gnutls_init_ret; - goto out; - } -diff --git a/lib/nettle/rnd-common.c b/lib/nettle/rnd-common.c -index 0a015d5..116a131 100644 ---- a/lib/nettle/rnd-common.c -+++ b/lib/nettle/rnd-common.c -@@ -37,6 +37,10 @@ - #include - #include - -+#include -+#include -+#include -+ - /* gnulib wants to claim strerror even if it cannot provide it. WTF */ - #undef strerror - -@@ -94,6 +98,11 @@ int _rnd_get_system_entropy_win32(void* rnd, size_t size) - - get_entropy_func _rnd_get_system_entropy = _rnd_get_system_entropy_win32; - -+int _rnd_system_entropy_check(void) -+{ -+ return 0; -+} -+ - int _rnd_system_entropy_init(void) - { - int old; -@@ -127,7 +136,8 @@ void _rnd_system_entropy_deinit(void) - #include - #include "egd.h" - --static int device_fd = -1; -+static int _gnutls_urandom_fd = -1; -+static mode_t _gnutls_urandom_fd_mode = 0; - - static int _rnd_get_system_entropy_urandom(void* _rnd, size_t size) - { -@@ -137,7 +147,7 @@ static int _rnd_get_system_entropy_urandom(void* _rnd, size_t size) - for (done = 0; done < size;) { - int res; - do { -- res = read(device_fd, rnd + done, size - done); -+ res = read(_gnutls_urandom_fd, rnd + done, size - done); - } while (res < 0 && errno == EINTR); - - if (res <= 0) { -@@ -168,7 +178,7 @@ int _rnd_get_system_entropy_egd(void* _rnd, size_t size) - - for (done = 0; done < size;) { - res = -- _rndegd_read(&device_fd, rnd + done, size - done); -+ _rndegd_read(&_gnutls_urandom_fd, rnd + done, size - done); - if (res <= 0) { - if (res < 0) { - _gnutls_debug_log("Failed to read egd.\n"); -@@ -186,31 +196,53 @@ int _rnd_get_system_entropy_egd(void* _rnd, size_t size) - - get_entropy_func _rnd_get_system_entropy = NULL; - -+int _rnd_system_entropy_check(void) -+{ -+ int ret; -+ struct stat st; -+ -+ ret = fstat(_gnutls_urandom_fd, &st); -+ if (ret < 0 || st.st_mode != _gnutls_urandom_fd_mode) { -+ return _rnd_system_entropy_init(); -+ } -+ return 0; -+} -+ - int _rnd_system_entropy_init(void) - { --int old; -- -- device_fd = open("/dev/urandom", O_RDONLY); -- if (device_fd < 0) { -+ int old; -+ struct stat st; -+ -+ _gnutls_urandom_fd = open("/dev/urandom", O_RDONLY); -+ if (_gnutls_urandom_fd < 0) { - _gnutls_debug_log("Cannot open urandom!\n"); - goto fallback; - } - -- old = fcntl(device_fd, F_GETFD); -+ old = fcntl(_gnutls_urandom_fd, F_GETFD); - if (old != -1) -- fcntl(device_fd, F_SETFD, old | FD_CLOEXEC); -+ fcntl(_gnutls_urandom_fd, F_SETFD, old | FD_CLOEXEC); -+ -+ if (fstat(_gnutls_urandom_fd, &st) >= 0) { -+ _gnutls_urandom_fd_mode = st.st_mode; -+ } - - _rnd_get_system_entropy = _rnd_get_system_entropy_urandom; - - return 0; - fallback: -- device_fd = _rndegd_connect_socket(); -- if (device_fd < 0) { -+ _gnutls_urandom_fd = _rndegd_connect_socket(); -+ if (_gnutls_urandom_fd < 0) { - _gnutls_debug_log("Cannot open egd socket!\n"); - return - gnutls_assert_val - (GNUTLS_E_RANDOM_DEVICE_ERROR); - } -+ -+ if (fstat(_gnutls_urandom_fd, &st) >= 0) { -+ _gnutls_urandom_fd_mode = st.st_mode; -+ } -+ - _rnd_get_system_entropy = _rnd_get_system_entropy_egd; - - return 0; -@@ -218,9 +250,9 @@ fallback: - - void _rnd_system_entropy_deinit(void) - { -- if (device_fd >= 0) { -- close(device_fd); -- device_fd = -1; -+ if (_gnutls_urandom_fd >= 0) { -+ close(_gnutls_urandom_fd); -+ _gnutls_urandom_fd = -1; - } - } - #endif -diff --git a/lib/nettle/rnd-common.h b/lib/nettle/rnd-common.h -index a43f7be..c795f81 100644 ---- a/lib/nettle/rnd-common.h -+++ b/lib/nettle/rnd-common.h -@@ -50,6 +50,7 @@ __attribute__((packed)) - void _rnd_get_event(struct event_st *e); - - int _rnd_system_entropy_init(void); -+int _rnd_system_entropy_check(void); - void _rnd_system_entropy_deinit(void); - - typedef int (*get_entropy_func)(void* rnd, size_t size); -diff --git a/lib/nettle/rnd.c b/lib/nettle/rnd.c -index e8b0f40..d8c3c40 100644 ---- a/lib/nettle/rnd.c -+++ b/lib/nettle/rnd.c -@@ -255,6 +255,15 @@ static int wrap_nettle_rnd_init(void **ctx) - return 0; - } - -+/* This is called when gnutls_global_init() is called for second time. -+ * It must check whether any resources are still available. -+ * The particular problem it solves is to verify that the urandom fd is still -+ * open (for applications that for some reason closed all fds */ -+static int wrap_nettle_rnd_check(void **ctx) -+{ -+ return _rnd_system_entropy_check(); -+} -+ - static int - wrap_nettle_rnd_nonce(void *_ctx, void *data, size_t datasize) - { -@@ -363,6 +372,7 @@ int crypto_rnd_prio = INT_MAX; - - gnutls_crypto_rnd_st _gnutls_rnd_ops = { - .init = wrap_nettle_rnd_init, -+ .check = wrap_nettle_rnd_check, - .deinit = wrap_nettle_rnd_deinit, - .rnd = wrap_nettle_rnd, - .rnd_refresh = wrap_nettle_rnd_refresh, -diff --git a/lib/random.h b/lib/random.h -index 0aa1545..ee04549 100644 ---- a/lib/random.h -+++ b/lib/random.h -@@ -48,4 +48,13 @@ inline static void _gnutls_rnd_refresh(void) - void _gnutls_rnd_deinit(void); - int _gnutls_rnd_init(void); - -+inline static int _gnutls_rnd_check(void) -+{ -+ return _gnutls_rnd_ops.check(gnutls_rnd_ctx); -+} -+ -+#ifndef _WIN32 -+extern int _gnutls_urandom_fd; -+#endif -+ - #endif -diff --git a/tests/Makefile.am b/tests/Makefile.am -index 522c01a..95d6541 100644 ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -84,7 +84,7 @@ ctests = mini-record-2 simple gc set_pkcs12_cred certder certuniqueid \ - mini-cert-status mini-rsa-psk global-init sec-params \ - fips-test mini-global-load name-constraints x509-extensions \ - long-session-id mini-x509-callbacks-intr \ -- crlverify -+ crlverify init_fds - - if ENABLE_OCSP - ctests += ocsp -diff --git a/tests/init_fds.c b/tests/init_fds.c -new file mode 100644 -index 0000000..bf7a5de ---- /dev/null -+++ b/tests/init_fds.c -@@ -0,0 +1,80 @@ -+/* -+ * Copyright (C) 2014 Nikos Mavrogiannopoulos -+ * -+ * Author: Nikos Mavrogiannopoulos -+ * -+ * This file is part of GnuTLS. -+ * -+ * GnuTLS is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * GnuTLS is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with GnuTLS; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include "utils.h" -+ -+/* See . */ -+ -+void doit(void) -+{ -+#ifndef _WIN32 -+ int res; -+ unsigned i; -+ int serial = 0; -+ char buf[128]; -+ -+ res = read(3, buf, 16); -+ if (res == 16) -+ serial = 1; -+ -+ /* close all descriptors */ -+ for (i=3;i<1024;i++) -+ close(i); -+ -+ res = gnutls_global_init(); -+ if (res != 0) -+ fail("global_init\n"); -+ -+ if (serial != 0) { -+ res = read(3, buf, 16); -+ if (res != 16) { -+ fail("could not open fd, or OS doesn't assign fds in a serial way (%d)\n", res); -+ } -+ } -+ -+ res = gnutls_global_init(); -+ if (res != 0) -+ fail("global_init2\n"); -+ -+ gnutls_rnd_refresh(); -+ -+ res = gnutls_rnd(GNUTLS_RND_RANDOM, buf, sizeof(buf)); -+ if (res != 0) -+ fail("gnutls_rnd\n"); -+ -+ gnutls_global_deinit(); -+ -+ if (debug) -+ success("init-close success\n"); -+#else -+ return; -+#endif -+} diff -Nru gnutls28-3.3.8/debian/patches/36_less_refresh-rnd-state.diff gnutls28-3.3.30/debian/patches/36_less_refresh-rnd-state.diff --- gnutls28-3.3.8/debian/patches/36_less_refresh-rnd-state.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/36_less_refresh-rnd-state.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,26 +0,0 @@ -From e5623c6197d7ae804f0c1ea3dd19d55103450f29 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Tue, 28 Oct 2014 10:43:04 +0100 -Subject: [PATCH] do not explicitly refresh rnd state on session deinit - -It is already being refreshed during the session lifetime. ---- - lib/gnutls_state.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c -index 0cf8cb3..6f4a711 100644 ---- a/lib/gnutls_state.c -+++ b/lib/gnutls_state.c -@@ -442,8 +442,6 @@ void gnutls_deinit(gnutls_session_t session) - if (session == NULL) - return; - -- _gnutls_rnd_refresh(); -- - /* remove auth info firstly */ - _gnutls_free_auth_info(session); - --- -2.1.1 - diff -Nru gnutls28-3.3.8/debian/patches/37_X9.63_sanity_check.diff gnutls28-3.3.30/debian/patches/37_X9.63_sanity_check.diff --- gnutls28-3.3.8/debian/patches/37_X9.63_sanity_check.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/37_X9.63_sanity_check.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,42 +0,0 @@ -From e821e1908686657a45c1b735f6d077b7a8493e2b Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Fri, 31 Oct 2014 10:00:32 +0100 -Subject: [PATCH 1/2] when exporting curve coordinates to X9.63 format, perform - additional sanity checks on input - -Reported by Sean Burford. ---- - lib/gnutls_ecc.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/lib/gnutls_ecc.c b/lib/gnutls_ecc.c -index 847f0d2..aa6399b 100644 ---- a/lib/gnutls_ecc.c -+++ b/lib/gnutls_ecc.c -@@ -53,6 +53,11 @@ _gnutls_ecc_ansi_x963_export(gnutls_ecc_curve_t curve, bigint_t x, - - /* pad and store x */ - byte_size = (_gnutls_mpi_get_nbits(x) + 7) / 8; -+ if (numlen < byte_size) { -+ ret = gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); -+ goto cleanup; -+ } -+ - size = out->size - (1 + (numlen - byte_size)); - ret = - _gnutls_mpi_print(x, &out->data[1 + (numlen - byte_size)], -@@ -63,6 +68,11 @@ _gnutls_ecc_ansi_x963_export(gnutls_ecc_curve_t curve, bigint_t x, - } - - byte_size = (_gnutls_mpi_get_nbits(y) + 7) / 8; -+ if (numlen < byte_size) { -+ ret = gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); -+ goto cleanup; -+ } -+ - size = out->size - (1 + (numlen + numlen - byte_size)); - ret = - _gnutls_mpi_print(y, --- -2.1.1 - diff -Nru gnutls28-3.3.8/debian/patches/38_testforsanitycheck.diff gnutls28-3.3.30/debian/patches/38_testforsanitycheck.diff --- gnutls28-3.3.8/debian/patches/38_testforsanitycheck.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/38_testforsanitycheck.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,82 +0,0 @@ -Description: Added check with the invalid crq sent by Sean Burford - . - This is 0964ed7b45ef593f1e118abb0e742e093a5f7987 converted to quilt format. -Author: Nikos Mavrogiannopoulos -Origin: upstream -Forwarded: not-needed - ---- gnutls28-3.3.8.orig/configure.ac -+++ gnutls28-3.3.8/configure.ac -@@ -330,6 +330,7 @@ AC_ARG_ENABLE(non-suiteb-curves, - if [ test "$enable_non_suiteb" = "yes" ];then - AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves]) - fi -+AM_CONDITIONAL(ENABLE_NON_SUITEB_CURVES, test "$enable_non_suiteb" = "yes") - - AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes") - if [ test "$enable_self_checks" = "yes" ];then ---- gnutls28-3.3.8.orig/tests/cert-tests/Makefile.am -+++ gnutls28-3.3.8/tests/cert-tests/Makefile.am -@@ -27,12 +27,16 @@ EXTRA_DIST = ca-no-pathlen.pem no-ca-or- - template-overflow.tmpl template-overflow2.pem template-overflow2.tmpl \ - template-date.tmpl template-date.pem template-dn-err.tmpl \ - template-nc.tmpl template-nc.pem xmpp-othername.pem \ -- suppressions.valgrind -+ suppressions.valgrind csr-invalid.der - --dist_check_SCRIPTS = pathlen aki template-test pem-decoding dane -+dist_check_SCRIPTS = pathlen aki template-test pem-decoding dane crq - - TESTS = pathlen aki pem-decoding - -+if ENABLE_NON_SUITEB_CURVES -+TESTS += crq -+endif -+ - if !WINDOWS - TESTS += template-test - endif ---- /dev/null -+++ gnutls28-3.3.8/tests/cert-tests/crq -@@ -0,0 +1,41 @@ -+#!/bin/sh -+ -+# Copyright (C) 2014 Red Hat, Inc. -+# -+# Author: Nikos Mavrogiannopoulos -+# -+# This file is part of GnuTLS. -+# -+# GnuTLS is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by the -+# Free Software Foundation; either version 3 of the License, or (at -+# your option) any later version. -+# -+# GnuTLS is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with GnuTLS; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ -+#set -e -+ -+srcdir=${srcdir:-.} -+CERTTOOL=${CERTTOOL:-../../src/certtool$EXEEXT} -+DIFF=${DIFF:-diff} -+if ! test -z "${VALGRIND}";then -+VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND} --error-exitcode=15" -+fi -+ -+$VALGRIND $CERTTOOL --inder --crq-info --infile $srcdir/csr-invalid.der >/dev/null 2>&1 -+rc=$? -+ -+# We're done. -+if test "$rc" != "1"; then -+ echo "Invalid crq decoding failed" -+ exit $rc -+fi -+ -+exit 0 diff -Nru gnutls28-3.3.8/debian/patches/39_check-whether-the-two-signatur.patch gnutls28-3.3.30/debian/patches/39_check-whether-the-two-signatur.patch --- gnutls28-3.3.8/debian/patches/39_check-whether-the-two-signatur.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/39_check-whether-the-two-signatur.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,46 +0,0 @@ -From 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 19 Jan 2015 09:29:31 +0100 -Subject: [PATCH] on certificate import check whether the two signature - algorithms match - . - Manually unfuzzed for 3.3.8. - ---- - lib/x509/x509.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - ---- a/lib/x509/x509.c -+++ b/lib/x509/x509.c -@@ -186,6 +186,7 @@ gnutls_x509_crt_import(gnutls_x509_crt_t - gnutls_x509_crt_fmt_t format) - { - int result = 0; -+ int s2; - - if (cert == NULL) { - gnutls_assert(); -@@ -246,6 +247,23 @@ gnutls_x509_crt_import(gnutls_x509_crt_t - goto cleanup; - } - -+ result = _gnutls_x509_get_signature_algorithm(cert->cert, -+ "signatureAlgorithm.algorithm"); -+ if (result < 0) { -+ gnutls_assert(); -+ goto cleanup; -+ } -+ -+ s2 = _gnutls_x509_get_signature_algorithm(cert->cert, -+ "tbsCertificate.signature.algorithm"); -+ if (result != s2) { -+ _gnutls_debug_log("signatureAlgorithm.algorithm differs from tbsCertificate.signature.algorithm: %s, %s\n", -+ gnutls_sign_get_name(result), gnutls_sign_get_name(s2)); -+ gnutls_assert(); -+ result = GNUTLS_E_CERTIFICATE_ERROR; -+ goto cleanup; -+ } -+ - result = _gnutls_x509_get_raw_field2(cert->cert, &cert->der, - "tbsCertificate.issuer.rdnSequence", - &cert->raw_issuer_dn); diff -Nru gnutls28-3.3.8/debian/patches/40_no_more_ssl3.diff gnutls28-3.3.30/debian/patches/40_no_more_ssl3.diff --- gnutls28-3.3.8/debian/patches/40_no_more_ssl3.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/40_no_more_ssl3.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,64 +0,0 @@ -Description: Remove SSL 3.0 from default priorities list. - . - This cherry-picks 0e75ac18627f8e92a2186cc7769df4851415ae4f (code change) - and ee83078f806d5ca6eccdbfd84371179589a37570 (doc update) from upstream - master branch. - . - Requested by Debian security for consistency with OpenSSL in jessie. -Author: Nikos Mavrogiannopoulos -Origin: upstream -Bug-Debian: https://bugs.debian.org/769904 -Last-Update: 2014-11-19 - ---- gnutls28-3.3.10.orig/doc/cha-gtls-app.texi -+++ gnutls28-3.3.10/doc/cha-gtls-app.texi -@@ -992,7 +992,7 @@ algorithms to be enabled. - @end float - - Unless the initial keyword is "NONE" the defaults (in preference --order) are for TLS protocols TLS 1.2, TLS1.1, TLS1.0, SSL3.0; for -+order) are for TLS protocols TLS 1.2, TLS1.1, TLS1.0; for - compression NULL; for certificate types X.509. - In key exchange algorithms when in NORMAL or SECURE levels the - perfect forward secrecy algorithms take precedence of the other -@@ -1054,8 +1054,8 @@ GCM ciphers only). All algorithms from N - COMP-NULL, COMP-DEFLATE. Catch all is COMP-ALL. - - @item TLS versions @tab --VERS-SSL3.0, VERS-TLS1.0, VERS-TLS1.1, --VERS-TLS1.2, VERS-DTLS1.2, VERS-DTLS1.0. -+VERS-TLS1.0, VERS-TLS1.1, VERS-TLS1.2, -+VERS-DTLS1.0, VERS-DTLS1.2. - Catch all is VERS-TLS-ALL and VERS-DTLS-ALL. - - @item Signature algorithms @tab -@@ -1199,8 +1199,8 @@ Specifying RSA with AES-128-CBC: - Specifying the defaults except ARCFOUR-128: - "NORMAL:-ARCFOUR-128" - --Enabling the 128-bit secure ciphers, while disabling SSL 3.0 and enabling compression: -- "SECURE128:-VERS-SSL3.0:+COMP-DEFLATE" -+Enabling the 128-bit secure ciphers, while disabling TLS 1.0 and enabling compression: -+ "SECURE128:-VERS-TLS1.0:+COMP-DEFLATE" - - Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS versions - except TLS 1.2: -@@ -1593,7 +1593,7 @@ options that are known to cause compatib - NORMAL:%COMPAT - @end verbatim - --For broken peers that do not tolerate TLS version numbers over TLS 1.0 -+For very old broken peers that do not tolerate TLS version numbers over TLS 1.0 - another priority string is: - @verbatim - NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT ---- gnutls28-3.3.10.orig/lib/gnutls_priority.c -+++ gnutls28-3.3.10/lib/gnutls_priority.c -@@ -273,7 +273,6 @@ static const int protocol_priority[] = { - GNUTLS_TLS1_2, - GNUTLS_TLS1_1, - GNUTLS_TLS1_0, -- GNUTLS_SSL3, - GNUTLS_DTLS1_2, - GNUTLS_DTLS1_0, - 0 diff -Nru gnutls28-3.3.8/debian/patches/45_eliminated-double-free.diff gnutls28-3.3.30/debian/patches/45_eliminated-double-free.diff --- gnutls28-3.3.8/debian/patches/45_eliminated-double-free.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/45_eliminated-double-free.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,28 +0,0 @@ -From d6972be33264ecc49a86cd0958209cd7363af1e9 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 23 Mar 2015 22:55:29 +0100 -Subject: [PATCH] eliminated double-free in the parsing of dist points -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reported by Robert ÅšwiÄ™cki. ---- - lib/x509/x509_ext.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c -index c8d5867..6f09438 100644 ---- a/lib/x509/x509_ext.c -+++ b/lib/x509/x509_ext.c -@@ -2360,7 +2360,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - - if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { - gnutls_assert(); -- gnutls_free(san.data); - goto cleanup; - } - --- -2.1.4 - diff -Nru gnutls28-3.3.8/debian/patches/46_Better-fix-for-the-double-free.diff gnutls28-3.3.30/debian/patches/46_Better-fix-for-the-double-free.diff --- gnutls28-3.3.8/debian/patches/46_Better-fix-for-the-double-free.diff 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/46_Better-fix-for-the-double-free.diff 1969-12-31 19:00:00.000000000 -0500 @@ -1,61 +0,0 @@ -From 053ae65403216acdb0a4e78b25ad66ee9f444f02 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sat, 28 Mar 2015 22:41:03 +0100 -Subject: [PATCH] Better fix for the double free in dist point parsing - ---- - lib/x509/x509_ext.c | 10 ++++++---- - 1 file changed, 6 insertions(+), 4 deletions(-) - -diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c -index 2e69ed0..f974b02 100644 ---- a/lib/x509/x509_ext.c -+++ b/lib/x509/x509_ext.c -@@ -2287,7 +2287,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - int len, ret; - uint8_t reasons[2]; - unsigned i, type, rflags, j; -- gnutls_datum_t san; -+ gnutls_datum_t san = {NULL, 0}; - - result = asn1_create_element - (_gnutls_get_pkix(), "PKIX1.CRLDistributionPoints", &c2); -@@ -2310,9 +2310,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - - i = 0; - do { -- san.data = NULL; -- san.size = 0; -- - snprintf(name, sizeof(name), "?%u.reasons", (unsigned)i + 1); - - len = sizeof(reasons); -@@ -2337,6 +2334,9 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - - j = 0; - do { -+ san.data = NULL; -+ san.size = 0; -+ - ret = - _gnutls_parse_general_name2(c2, name, j, &san, - &type, 0); -@@ -2351,6 +2351,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - ret = crl_dist_points_set(cdp, type, &san, rflags); - if (ret < 0) - break; -+ san.data = NULL; /* it is now in cdp */ - - j++; - } while (ret >= 0); -@@ -2360,6 +2361,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, - - if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { - gnutls_assert(); -+ gnutls_free(san.data); - goto cleanup; - } - --- -2.1.4 - diff -Nru gnutls28-3.3.8/debian/patches/47_GNUTLS-SA-2015-3.patch gnutls28-3.3.30/debian/patches/47_GNUTLS-SA-2015-3.patch --- gnutls28-3.3.8/debian/patches/47_GNUTLS-SA-2015-3.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/47_GNUTLS-SA-2015-3.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,24 +0,0 @@ -From 272854367efc130fbd4f1a51840d80c630214e12 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 20 Jul 2015 21:49:28 +0200 -Subject: [PATCH] Reset the output value on error in _gnutls_x509_dn_to_string() - ---- - lib/x509/common.c | 1 + - 1 file changed, 1 insertion(+), 0 deletions(-) - -diff --git a/lib/x509/common.c b/lib/x509/common.c -index 94b6bbc..9a4b96f 100644 ---- a/lib/x509/common.c -+++ b/lib/x509/common.c -@@ -469,6 +469,7 @@ _gnutls_x509_dn_to_string(const char *oid, void *value, - if (ret < 0) { - gnutls_assert(); - gnutls_free(str->data); -+ str->data = NULL; - return ret; - } - str->size = size; --- -libgit2 0.22.2 - diff -Nru gnutls28-3.3.8/debian/patches/50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch gnutls28-3.3.30/debian/patches/50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch --- gnutls28-3.3.8/debian/patches/50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,59 +0,0 @@ -From 023156ae2504c1911f8f2e66a0ebde316931671c Mon Sep 17 00:00:00 2001 -From: Matthias-Christian Ott -Date: Tue, 30 Dec 2014 11:57:36 +0200 -Subject: [PATCH 1/2] Handle zero length plaintext for VIA PadLock functions - -If the plaintext is shorter than the block size of the used cipher, -_gnutls_auth_cipher_encrypt2_tag calls _gnutls_cipher_encrypt2 with -textlen = 0. padlock_ecb_encrypt and padlock_cbc_encrypt assume that the -plaintext length (last parameter) is greater than zero and segfault -otherwise. The assembler code for both functions is automatically -generated and imported from OpenSSL, so to ease maintenance the length -should be validated in the functions that call padlock_ecb_encrypt or -padlock_cbc_encrypt. ---- - lib/accelerated/x86/aes-gcm-padlock.c | 3 ++- - lib/accelerated/x86/aes-padlock.c | 6 ++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/accelerated/x86/aes-gcm-padlock.c b/lib/accelerated/x86/aes-gcm-padlock.c -index e1ad566..9e92292 100644 ---- a/lib/accelerated/x86/aes-gcm-padlock.c -+++ b/lib/accelerated/x86/aes-gcm-padlock.c -@@ -54,7 +54,8 @@ static void padlock_aes_encrypt(void *_ctx, - - pce = ALIGN16(&ctx->expanded_key); - -- padlock_ecb_encrypt(dst, src, pce, length); -+ if (length > 0) -+ padlock_ecb_encrypt(dst, src, pce, length); - } - - static void padlock_aes_set_encrypt_key(struct padlock_ctx *_ctx, -diff --git a/lib/accelerated/x86/aes-padlock.c b/lib/accelerated/x86/aes-padlock.c -index bccbd10..8ed10d8 100644 ---- a/lib/accelerated/x86/aes-padlock.c -+++ b/lib/accelerated/x86/aes-padlock.c -@@ -132,7 +132,8 @@ padlock_aes_cbc_encrypt(void *_ctx, const void *src, size_t src_size, - - pce = ALIGN16(&ctx->expanded_key); - -- padlock_cbc_encrypt(dst, src, pce, src_size); -+ if (src_size > 0) -+ padlock_cbc_encrypt(dst, src, pce, src_size); - - return 0; - } -@@ -147,7 +148,8 @@ padlock_aes_cbc_decrypt(void *_ctx, const void *src, size_t src_size, - - pcd = ALIGN16(&ctx->expanded_key); - -- padlock_cbc_encrypt(dst, src, pcd, src_size); -+ if (src_size > 0) -+ padlock_cbc_encrypt(dst, src, pcd, src_size); - - return 0; - } --- -2.1.4 - diff -Nru gnutls28-3.3.8/debian/patches/51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch gnutls28-3.3.30/debian/patches/51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch --- gnutls28-3.3.8/debian/patches/51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,47 +0,0 @@ -From 1e013f4c660fa79c2398dbcfd4f0e054c724c5ec Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sat, 25 Apr 2015 19:14:07 +0200 -Subject: [PATCH 1/3] _gnutls_session_sign_algo_enabled: do not consider any - values from the extension data to decide acceptable algorithms - ---- - lib/ext/signature.c | 18 +----------------- - 1 file changed, 1 insertion(+), 17 deletions(-) - -diff --git a/lib/ext/signature.c b/lib/ext/signature.c -index fb971f5..6f3066e 100644 ---- a/lib/ext/signature.c -+++ b/lib/ext/signature.c -@@ -313,28 +313,12 @@ _gnutls_session_sign_algo_enabled(gnutls_session_t session, - gnutls_sign_algorithm_t sig) - { - unsigned i; -- int ret; - const version_entry_st *ver = get_version(session); -- sig_ext_st *priv; -- extension_priv_data_t epriv; - - if (unlikely(ver == NULL)) - return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); - -- ret = -- _gnutls_ext_get_session_data(session, -- GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS, -- &epriv); -- if (ret < 0) { -- gnutls_assert(); -- return 0; -- } -- priv = epriv.ptr; -- -- if (!_gnutls_version_has_selectable_sighash(ver) -- || priv->sign_algorithms_size == 0) -- /* none set, allow all */ -- { -+ if (!_gnutls_version_has_selectable_sighash(ver)) { - return 0; - } - --- -2.1.4 - diff -Nru gnutls28-3.3.8/debian/patches/51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch gnutls28-3.3.30/debian/patches/51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch --- gnutls28-3.3.8/debian/patches/51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,37 +0,0 @@ -From a8076fa599f0a37f8e12e30eeadd50a0ea3c67b7 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sat, 25 Apr 2015 19:34:34 +0200 -Subject: [PATCH 2/3] before falling back to SHA1 as signature algorithm in TLS - 1.2 check if it is enabled - ---- - lib/ext/signature.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/lib/ext/signature.c b/lib/ext/signature.c -index 6f3066e..5ecc76a 100644 ---- a/lib/ext/signature.c -+++ b/lib/ext/signature.c -@@ -282,7 +282,10 @@ _gnutls_session_get_sign_algo(gnutls_session_t session, - || priv->sign_algorithms_size == 0) - /* none set, allow SHA-1 only */ - { -- return gnutls_pk_to_sign(cert_algo, GNUTLS_DIG_SHA1); -+ ret = gnutls_pk_to_sign(cert_algo, GNUTLS_DIG_SHA1); -+ if (_gnutls_session_sign_algo_enabled(session, ret) < 0) -+ goto fail; -+ return ret; - } - - for (i = 0; i < priv->sign_algorithms_size; i++) { -@@ -301,6 +304,7 @@ _gnutls_session_get_sign_algo(gnutls_session_t session, - } - } - -+ fail: - return GNUTLS_SIGN_UNKNOWN; - } - --- -2.1.4 - diff -Nru gnutls28-3.3.8/debian/patches/51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch gnutls28-3.3.30/debian/patches/51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch --- gnutls28-3.3.8/debian/patches/51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,395 +0,0 @@ -From 3d333e59621f6cf9381c846c405b23d79020d031 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sat, 25 Apr 2015 20:00:04 +0200 -Subject: [PATCH 3/3] tests: added reproducer for the MD5 acceptance issue - -Reported by Karthikeyan Bhargavan. -http://lists.gnutls.org/pipermail/gnutls-devel/2015-April/007572.html - -Conflicts: - tests/Makefile.am ---- - tests/Makefile.am | 2 +- - tests/sign-md5-rep.c | 365 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 366 insertions(+), 1 deletion(-) - create mode 100644 tests/sign-md5-rep.c - ---- a/tests/Makefile.am -+++ b/tests/Makefile.am -@@ -84,7 +84,7 @@ ctests = mini-record-2 simple gc set_pkc - mini-cert-status mini-rsa-psk global-init sec-params \ - fips-test mini-global-load name-constraints x509-extensions \ - long-session-id mini-x509-callbacks-intr \ -- crlverify init_fds -+ crlverify init_fds sign-md5-rep - - if ENABLE_OCSP - ctests += ocsp ---- /dev/null -+++ b/tests/sign-md5-rep.c -@@ -0,0 +1,365 @@ -+/* -+ * Copyright (C) 2015 Nikos Mavrogiannopoulos -+ * -+ * Author: Nikos Mavrogiannopoulos -+ * -+ * This file is part of GnuTLS. -+ * -+ * GnuTLS is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 3 of the License, or -+ * (at your option) any later version. -+ * -+ * GnuTLS is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with GnuTLS; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include -+#endif -+ -+#include -+#include -+ -+#if defined(_WIN32) -+ -+int main() -+{ -+ exit(77); -+} -+ -+#else -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "utils.h" -+ -+static void terminate(void); -+ -+/* This program tests whether EtM is negotiated as expected. -+ */ -+ -+static void server_log_func(int level, const char *str) -+{ -+ fprintf(stderr, "server|<%d>| %s", level, str); -+} -+ -+static void client_log_func(int level, const char *str) -+{ -+ fprintf(stderr, "client|<%d>| %s", level, str); -+} -+ -+static unsigned char server_cert_pem[] = -+ "-----BEGIN CERTIFICATE-----\n" -+ "MIICVjCCAcGgAwIBAgIERiYdMTALBgkqhkiG9w0BAQUwGTEXMBUGA1UEAxMOR251\n" -+ "VExTIHRlc3QgQ0EwHhcNMDcwNDE4MTMyOTIxWhcNMDgwNDE3MTMyOTIxWjA3MRsw\n" -+ "GQYDVQQKExJHbnVUTFMgdGVzdCBzZXJ2ZXIxGDAWBgNVBAMTD3Rlc3QuZ251dGxz\n" -+ "Lm9yZzCBnDALBgkqhkiG9w0BAQEDgYwAMIGIAoGA17pcr6MM8C6pJ1aqU46o63+B\n" -+ "dUxrmL5K6rce+EvDasTaDQC46kwTHzYWk95y78akXrJutsoKiFV1kJbtple8DDt2\n" -+ "DZcevensf9Op7PuFZKBroEjOd35znDET/z3IrqVgbtm2jFqab7a+n2q9p/CgMyf1\n" -+ "tx2S5Zacc1LWn9bIjrECAwEAAaOBkzCBkDAMBgNVHRMBAf8EAjAAMBoGA1UdEQQT\n" -+ "MBGCD3Rlc3QuZ251dGxzLm9yZzATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHQ8B\n" -+ "Af8EBQMDB6AAMB0GA1UdDgQWBBTrx0Vu5fglyoyNgw106YbU3VW0dTAfBgNVHSME\n" -+ "GDAWgBTpPBz7rZJu5gakViyi4cBTJ8jylTALBgkqhkiG9w0BAQUDgYEAaFEPTt+7\n" -+ "bzvBuOf7+QmeQcn29kT6Bsyh1RHJXf8KTk5QRfwp6ogbp94JQWcNQ/S7YDFHglD1\n" -+ "AwUNBRXwd3riUsMnsxgeSDxYBfJYbDLeohNBsqaPDJb7XailWbMQKfAbFQ8cnOxg\n" -+ "rOKLUQRWJ0K3HyXRMhbqjdLIaQiCvQLuizo=\n" "-----END CERTIFICATE-----\n"; -+ -+const gnutls_datum_t server_cert = { server_cert_pem, -+ sizeof(server_cert_pem) -+}; -+ -+static unsigned char server_key_pem[] = -+ "-----BEGIN RSA PRIVATE KEY-----\n" -+ "MIICXAIBAAKBgQDXulyvowzwLqknVqpTjqjrf4F1TGuYvkrqtx74S8NqxNoNALjq\n" -+ "TBMfNhaT3nLvxqResm62ygqIVXWQlu2mV7wMO3YNlx696ex/06ns+4VkoGugSM53\n" -+ "fnOcMRP/PciupWBu2baMWppvtr6far2n8KAzJ/W3HZLllpxzUtaf1siOsQIDAQAB\n" -+ "AoGAYAFyKkAYC/PYF8e7+X+tsVCHXppp8AoP8TEZuUqOZz/AArVlle/ROrypg5kl\n" -+ "8YunrvUdzH9R/KZ7saNZlAPLjZyFG9beL/am6Ai7q7Ma5HMqjGU8kTEGwD7K+lbG\n" -+ "iomokKMOl+kkbY/2sI5Czmbm+/PqLXOjtVc5RAsdbgvtmvkCQQDdV5QuU8jap8Hs\n" -+ "Eodv/tLJ2z4+SKCV2k/7FXSKWe0vlrq0cl2qZfoTUYRnKRBcWxc9o92DxK44wgPi\n" -+ "oMQS+O7fAkEA+YG+K9e60sj1K4NYbMPAbYILbZxORDecvP8lcphvwkOVUqbmxOGh\n" -+ "XRmTZUuhBrJhJKKf6u7gf3KWlPl6ShKEbwJASC118cF6nurTjuLf7YKARDjNTEws\n" -+ "qZEeQbdWYINAmCMj0RH2P0mvybrsXSOD5UoDAyO7aWuqkHGcCLv6FGG+qwJAOVqq\n" -+ "tXdUucl6GjOKKw5geIvRRrQMhb/m5scb+5iw8A4LEEHPgGiBaF5NtJZLALgWfo5n\n" -+ "hmC8+G8F0F78znQtPwJBANexu+Tg5KfOnzSILJMo3oXiXhf5PqXIDmbN0BKyCKAQ\n" -+ "LfkcEcUbVfmDaHpvzwY9VEaoMOKVLitETXdNSxVpvWM=\n" -+ "-----END RSA PRIVATE KEY-----\n"; -+ -+const gnutls_datum_t server_key = { server_key_pem, -+ sizeof(server_key_pem) -+}; -+ -+ -+static int handshake_callback(gnutls_session_t session, unsigned int htype, -+ unsigned post, unsigned int incoming, const gnutls_datum_t *msg) -+{ -+ gnutls_priority_set_direct(session, "NORMAL:-KX-ALL:+ECDHE-RSA", NULL); -+ return 0; -+} -+ -+ -+/* A very basic TLS client, with anonymous authentication. -+ */ -+ -+#define MAX_BUF 1024 -+ -+static void client(int fd) -+{ -+ int ret; -+ char buffer[MAX_BUF + 1]; -+ gnutls_certificate_credentials_t x509_cred; -+ gnutls_session_t session; -+ /* Need to enable anonymous KX specifically. */ -+ -+ global_init(); -+ -+ if (debug) { -+ gnutls_global_set_log_function(client_log_func); -+ gnutls_global_set_log_level(7); -+ } -+ -+ gnutls_certificate_allocate_credentials(&x509_cred); -+ -+ /* Initialize TLS session -+ */ -+ gnutls_init(&session, GNUTLS_CLIENT); -+ -+ /* Use default priorities */ -+ gnutls_priority_set_direct(session, "NORMAL:-KX-ALL:+ECDHE-RSA:-SIGN-ALL:+SIGN-RSA-MD5", NULL); -+ -+ /* put the anonymous credentials to the current session -+ */ -+ gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred); -+ -+ gnutls_transport_set_int(session, fd); -+ gnutls_handshake_set_hook_function(session, GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE, -+ GNUTLS_HOOK_PRE, -+ handshake_callback); -+ -+ /* Perform the TLS handshake -+ */ -+ do { -+ ret = gnutls_handshake(session); -+ } -+ while (ret < 0 && gnutls_error_is_fatal(ret) == 0); -+ -+ if (ret == GNUTLS_E_UNSUPPORTED_SIGNATURE_ALGORITHM) { -+ /* success */ -+ goto end; -+ } -+ -+ if (ret < 0) { -+ fail("client: Handshake failed: %s\n", gnutls_strerror(ret)); -+ exit(1); -+ } else { -+ if (debug) -+ success("client: Handshake was completed\n"); -+ } -+ -+ if (gnutls_sign_algorithm_get(session) == GNUTLS_SIGN_RSA_MD5) { -+ fail("client: MD5 was negotiated\n"); -+ exit(1); -+ } -+ success("client: %s was negotiated\n", gnutls_sign_get_name(gnutls_sign_algorithm_get(session))); -+ -+ if (debug) -+ success("client: TLS version is: %s\n", -+ gnutls_protocol_get_name -+ (gnutls_protocol_get_version(session))); -+ -+ do { -+ do { -+ ret = gnutls_record_recv(session, buffer, MAX_BUF); -+ } while (ret == GNUTLS_E_AGAIN -+ || ret == GNUTLS_E_INTERRUPTED); -+ } while (ret > 0); -+ -+ if (ret == 0) { -+ if (debug) -+ success -+ ("client: Peer has closed the TLS connection\n"); -+ goto end; -+ } else if (ret < 0) { -+ if (ret != 0) { -+ fail("client: Error: %s\n", gnutls_strerror(ret)); -+ exit(1); -+ } -+ } -+ -+ gnutls_bye(session, GNUTLS_SHUT_WR); -+ -+ end: -+ -+ close(fd); -+ -+ gnutls_deinit(session); -+ -+ gnutls_certificate_free_credentials(x509_cred); -+ -+ gnutls_global_deinit(); -+} -+ -+ -+/* These are global */ -+pid_t child; -+ -+static void terminate(void) -+{ -+ kill(child, SIGTERM); -+ exit(1); -+} -+ -+static void server(int fd) -+{ -+ int ret; -+ char buffer[MAX_BUF + 1]; -+ gnutls_session_t session; -+ gnutls_certificate_credentials_t x509_cred; -+ unsigned to_send = sizeof(buffer)/4; -+ -+ /* this must be called once in the program -+ */ -+ global_init(); -+ memset(buffer, 0, sizeof(buffer)); -+ -+ if (debug) { -+ gnutls_global_set_log_function(server_log_func); -+ gnutls_global_set_log_level(4711); -+ } -+ -+ gnutls_certificate_allocate_credentials(&x509_cred); -+ gnutls_certificate_set_x509_key_mem(x509_cred, &server_cert, -+ &server_key, -+ GNUTLS_X509_FMT_PEM); -+ -+ gnutls_init(&session, GNUTLS_SERVER); -+ -+ /* avoid calling all the priority functions, since the defaults -+ * are adequate. -+ */ -+ gnutls_priority_set_direct(session, "NORMAL:-KX-ALL:+ECDHE-RSA:-SIGN-ALL:+SIGN-RSA-MD5", NULL); -+ -+ gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred); -+ -+ gnutls_transport_set_int(session, fd); -+ -+ do { -+ ret = gnutls_handshake(session); -+ } while (ret < 0 && gnutls_error_is_fatal(ret) == 0); -+ if (ret < 0) { -+ close(fd); -+ gnutls_deinit(session); -+ fail("server: Handshake has failed (%s)\n\n", -+ gnutls_strerror(ret)); -+ terminate(); -+ } -+ -+ -+ if (debug) { -+ success("server: Handshake was completed\n"); -+ success("server: %s was negotiated\n", gnutls_sign_get_name(gnutls_sign_algorithm_get(session))); -+ } -+ -+ if (debug) -+ success("server: TLS version is: %s\n", -+ gnutls_protocol_get_name -+ (gnutls_protocol_get_version(session))); -+ -+ do { -+ do { -+ ret = -+ gnutls_record_send(session, buffer, -+ sizeof(buffer)); -+ } while (ret == GNUTLS_E_AGAIN -+ || ret == GNUTLS_E_INTERRUPTED); -+ -+ if (ret < 0) { -+ fail("Error sending %d byte packet: %s\n", to_send, -+ gnutls_strerror(ret)); -+ terminate(); -+ } -+ to_send++; -+ } -+ while (to_send < 64); -+ -+ to_send = -1; -+ /* do not wait for the peer to close the connection. -+ */ -+ gnutls_bye(session, GNUTLS_SHUT_WR); -+ -+ close(fd); -+ gnutls_deinit(session); -+ -+ gnutls_certificate_free_credentials(x509_cred); -+ -+ gnutls_global_deinit(); -+ -+ if (debug) -+ success("server: finished\n"); -+} -+ -+static void ch_handler(int sig) -+{ -+ int status; -+ wait(&status); -+ if (WEXITSTATUS(status) != 0 || -+ (WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV)) { -+ if (WIFSIGNALED(status)) -+ fail("Child died with sigsegv\n"); -+ else -+ fail("Child died with status %d\n", -+ WEXITSTATUS(status)); -+ terminate(); -+ } -+ return; -+} -+ -+void doit(void) -+{ -+ int fd[2]; -+ int ret; -+ -+ signal(SIGCHLD, ch_handler); -+ -+ ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); -+ if (ret < 0) { -+ perror("socketpair"); -+ exit(1); -+ } -+ -+ child = fork(); -+ if (child < 0) { -+ perror("fork"); -+ fail("fork"); -+ exit(1); -+ } -+ -+ if (child) { -+ /* parent */ -+ close(fd[1]); -+ client(fd[0]); -+ kill(child, SIGTERM); -+ } else { -+ close(fd[0]); -+ server(fd[1]); -+ exit(0); -+ } -+} -+ -+#endif /* _WIN32 */ diff -Nru gnutls28-3.3.8/debian/patches/52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch gnutls28-3.3.30/debian/patches/52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch --- gnutls28-3.3.8/debian/patches/52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,24 +0,0 @@ -From 964632f37dfdfb914ebc5e49db4fa29af35b1de9 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sat, 27 Aug 2016 17:00:22 +0200 -Subject: [PATCH] ocsp: corrected the comparison of the serial size in OCSP - response - -Previously the OCSP certificate check wouldn't verify the serial length -and could succeed in cases it shouldn't. - -Reported by Stefan Buehler. ---- - lib/x509/ocsp.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/lib/x509/ocsp.c -+++ b/lib/x509/ocsp.c -@@ -1251,6 +1251,7 @@ gnutls_ocsp_resp_check_crt(gnutls_ocsp_r - gnutls_assert(); - goto cleanup; - } -+ cserial.size = t; - - if (rserial.size != cserial.size - || memcmp(cserial.data, rserial.data, rserial.size) != 0) { diff -Nru gnutls28-3.3.8/debian/patches/53_nettle-use-rsa_-_key_prepare-on-key-import.patch gnutls28-3.3.30/debian/patches/53_nettle-use-rsa_-_key_prepare-on-key-import.patch --- gnutls28-3.3.8/debian/patches/53_nettle-use-rsa_-_key_prepare-on-key-import.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/53_nettle-use-rsa_-_key_prepare-on-key-import.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,152 +0,0 @@ -From 186dc9c2012003587a38d7f4d03edd8da5fe989f Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Sun, 7 Aug 2016 12:06:39 +0200 -Subject: [PATCH] nettle: use rsa_*_key_prepare on key import - -Previously we calculated the size of the key directly, but -by using the rsa_*_key_prepare we benefit from any checks that -may be introduced in the future. Specifically any checks for invalid -public keys (e.g., keys that may crash the underlying gmp functions). - -This patch avoids calling rsa_private_key_prepare every time we construct -a nettle private key struct, because this function requires a bigint -multiplication. We call that function once on private key import. ---- - lib/nettle/pk.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---------- - 1 file changed, 52 insertions(+), 10 deletions(-) - -diff --git a/lib/nettle/pk.c b/lib/nettle/pk.c -index 2fab308..b41ebfb 100644 ---- a/lib/nettle/pk.c -+++ b/lib/nettle/pk.c -@@ -98,18 +98,24 @@ _rsa_params_to_privkey(const gnutls_pk_params_st * pk_params, - memcpy(priv->c, pk_params->params[5], SIZEOF_MPZT); - memcpy(priv->a, pk_params->params[6], SIZEOF_MPZT); - memcpy(priv->b, pk_params->params[7], SIZEOF_MPZT); -+ /* we do not rsa_private_key_prepare() because it involves a multiplication. -+ * we call it once when we import the parameters */ - priv->size = - nettle_mpz_sizeinbase_256_u(TOMPZ - (pk_params->params[RSA_MODULUS])); - } - --static void -+/* returns a negative value on invalid pubkey */ -+static int - _rsa_params_to_pubkey(const gnutls_pk_params_st * pk_params, - struct rsa_public_key *pub) - { - memcpy(pub->n, pk_params->params[RSA_MODULUS], SIZEOF_MPZT); - memcpy(pub->e, pk_params->params[RSA_PUB], SIZEOF_MPZT); -- pub->size = nettle_mpz_sizeinbase_256_u(pub->n); -+ if (rsa_public_key_prepare(pub) == 0) -+ return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); -+ -+ return 0; - } - - static int -@@ -340,7 +346,13 @@ _wrap_nettle_pk_encrypt(gnutls_pk_algorithm_t algo, - { - struct rsa_public_key pub; - -- _rsa_params_to_pubkey(pk_params, &pub); -+ ret = _rsa_params_to_pubkey(pk_params, &pub); -+ if (ret < 0) { -+ ret = -+ gnutls_assert_val -+ (GNUTLS_E_ENCRYPTION_FAILED); -+ goto cleanup; -+ } - - ret = - rsa_encrypt(&pub, NULL, rnd_func, -@@ -398,7 +410,12 @@ _wrap_nettle_pk_decrypt(gnutls_pk_algorithm_t algo, - bigint_t c; - - _rsa_params_to_privkey(pk_params, &priv); -- _rsa_params_to_pubkey(pk_params, &pub); -+ ret = _rsa_params_to_pubkey(pk_params, &pub); -+ if (ret < 0) -+ return -+ gnutls_assert_val -+ (GNUTLS_E_DECRYPTION_FAILED); -+ - - if (ciphertext->size != pub.size) - return -@@ -570,7 +587,11 @@ _wrap_nettle_pk_sign(gnutls_pk_algorithm_t algo, - mpz_t s; - - _rsa_params_to_privkey(pk_params, &priv); -- _rsa_params_to_pubkey(pk_params, &pub); -+ ret = _rsa_params_to_pubkey(pk_params, &pub); -+ if (ret < 0) -+ return -+ gnutls_assert_val -+ (GNUTLS_E_PK_SIGN_FAILED); - - mpz_init(s); - -@@ -707,7 +728,11 @@ _wrap_nettle_pk_verify(gnutls_pk_algorithm_t algo, - { - struct rsa_public_key pub; - -- _rsa_params_to_pubkey(pk_params, &pub); -+ ret = _rsa_params_to_pubkey(pk_params, &pub); -+ if (ret < 0) -+ return -+ gnutls_assert_val -+ (GNUTLS_E_PK_SIG_VERIFY_FAILED); - - if (signature->size != pub.size) - return -@@ -1774,7 +1799,12 @@ wrap_nettle_pk_fixup(gnutls_pk_algorithm_t algo, - { - int ret; - -- if (direction == GNUTLS_IMPORT && algo == GNUTLS_PK_RSA) { -+ if (direction != GNUTLS_IMPORT) -+ return 0; -+ -+ if (algo == GNUTLS_PK_RSA) { -+ struct rsa_private_key priv; -+ - /* do not trust the generated values. Some old private keys - * generated by us have mess on the values. Those were very - * old but it seemed some of the shipped example private -@@ -1788,9 +1818,14 @@ wrap_nettle_pk_fixup(gnutls_pk_algorithm_t algo, - if (ret < 0) - return gnutls_assert_val(ret); - } -- mpz_invert(TOMPZ(params->params[RSA_COEF]), -- TOMPZ(params->params[RSA_PRIME2]), -- TOMPZ(params->params[RSA_PRIME1])); -+ -+ if (mpz_cmp_ui(TOMPZ(params->params[RSA_PRIME1]), 0) == 0) -+ return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER); -+ -+ if (mpz_invert(TOMPZ(params->params[RSA_COEF]), -+ TOMPZ(params->params[RSA_PRIME2]), -+ TOMPZ(params->params[RSA_PRIME1])) == 0) -+ return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER); - - /* calculate exp1 [6] and exp2 [7] */ - zrelease_mpi_key(¶ms->params[RSA_E1]); -@@ -1801,6 +1836,13 @@ wrap_nettle_pk_fixup(gnutls_pk_algorithm_t algo, - return gnutls_assert_val(ret); - - params->params_nr = RSA_PRIVATE_PARAMS; -+ -+ /* perform nettle's internal checks */ -+ _rsa_params_to_privkey(params, &priv); -+ ret = rsa_private_key_prepare(&priv); -+ if (ret == 0) { -+ return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER); -+ } - } - - return 0; --- -2.8.1 - diff -Nru gnutls28-3.3.8/debian/patches/55_00_pkcs12-fixed-the-calculation-of-p_size.patch gnutls28-3.3.30/debian/patches/55_00_pkcs12-fixed-the-calculation-of-p_size.patch --- gnutls28-3.3.8/debian/patches/55_00_pkcs12-fixed-the-calculation-of-p_size.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_00_pkcs12-fixed-the-calculation-of-p_size.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,26 +0,0 @@ -From 3979cbcb425b4088c822b0a75c78f5f1eef32291 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 28 Nov 2016 11:47:40 +0100 -Subject: [PATCH] pkcs12: fixed the calculation of p_size - -That affects passwords which exceed 32 characters. ---- - lib/x509/pkcs12_encr.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c -index 85cd3f228..d8fd49f82 100644 ---- a/lib/x509/pkcs12_encr.c -+++ b/lib/x509/pkcs12_encr.c -@@ -105,7 +105,7 @@ _gnutls_pkcs12_string_to_key(const mac_entry_st * me, - } - - /* Store salt and password in BUF_I */ -- p_size = ((pwlen / 64) * 64) + 64; -+ p_size = (((2*pwlen) / 64) * 64) + 64; - - if (p_size > sizeof(buf_i) - 64) - return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch gnutls28-3.3.30/debian/patches/55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch --- gnutls28-3.3.8/debian/patches/55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,76 +0,0 @@ -From bbfd47d4bb6935b3eddae227deb9f340e2c1a69d Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Thu, 15 Dec 2016 15:02:18 +0100 -Subject: [PATCH] gnutls_x509_ext_import_proxy: fix issue reading the policy - language - -If the language was set but the policy wasn't, that could lead to -a double free, as the value returned to the user was freed. ---- - lib/x509/x509_ext.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c -index f974b0279..ed0ad1d14 100644 ---- a/lib/x509/x509_ext.c -+++ b/lib/x509/x509_ext.c -@@ -1414,7 +1414,8 @@ int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen, - { - ASN1_TYPE c2 = ASN1_TYPE_EMPTY; - int result; -- gnutls_datum_t value = { NULL, 0 }; -+ gnutls_datum_t value1 = { NULL, 0 }; -+ gnutls_datum_t value2 = { NULL, 0 }; - - if ((result = asn1_create_element - (_gnutls_get_pkix(), "PKIX1.ProxyCertInfo", -@@ -1444,20 +1445,18 @@ int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen, - } - - result = _gnutls_x509_read_value(c2, "proxyPolicy.policyLanguage", -- &value); -+ &value1); - if (result < 0) { - gnutls_assert(); - goto cleanup; - } - - if (policyLanguage) { -- *policyLanguage = (char *)value.data; -- } else { -- gnutls_free(value.data); -- value.data = NULL; -+ *policyLanguage = (char *)value1.data; -+ value1.data = NULL; - } - -- result = _gnutls_x509_read_value(c2, "proxyPolicy.policy", &value); -+ result = _gnutls_x509_read_value(c2, "proxyPolicy.policy", &value2); - if (result == GNUTLS_E_ASN1_ELEMENT_NOT_FOUND) { - if (policy) - *policy = NULL; -@@ -1468,16 +1467,17 @@ int gnutls_x509_ext_import_proxy(const gnutls_datum_t * ext, int *pathlen, - goto cleanup; - } else { - if (policy) { -- *policy = (char *)value.data; -- value.data = NULL; -+ *policy = (char *)value2.data; -+ value2.data = NULL; - } - if (sizeof_policy) -- *sizeof_policy = value.size; -+ *sizeof_policy = value2.size; - } - - result = 0; - cleanup: -- gnutls_free(value.data); -+ gnutls_free(value1.data); -+ gnutls_free(value2.data); - asn1_delete_structure(&c2); - - return result; --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch gnutls28-3.3.30/debian/patches/55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch --- gnutls28-3.3.8/debian/patches/55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,39 +0,0 @@ -From 097a347d7bad44c8d187363d45465d5db7eaf723 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 4 Jan 2017 09:46:26 +0100 -Subject: [PATCH] auth rsa: eliminated memory leak on pkcs-1 formatting attack - path - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/auth/rsa.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/lib/auth/rsa.c b/lib/auth/rsa.c -index 128e7b4b8..140f17043 100644 ---- a/lib/auth/rsa.c -+++ b/lib/auth/rsa.c -@@ -112,7 +112,7 @@ static int - proc_rsa_client_kx(gnutls_session_t session, uint8_t * data, - size_t _data_size) - { -- gnutls_datum_t plaintext; -+ gnutls_datum_t plaintext = {NULL, 0}; - gnutls_datum_t ciphertext; - int ret, dsize; - int randomize_key = 0; -@@ -150,6 +150,11 @@ proc_rsa_client_kx(gnutls_session_t session, uint8_t * data, - _gnutls_audit_log(session, - "auth_rsa: Possible PKCS #1 format attack\n"); - randomize_key = 1; -+ -+ if (ret >= 0) { -+ gnutls_free(plaintext.data); -+ plaintext.data = NULL; -+ } - } else { - /* If the secret was properly formatted, then - * check the version number. --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch gnutls28-3.3.30/debian/patches/55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch --- gnutls28-3.3.8/debian/patches/55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,26 +0,0 @@ -From 03d1e6089230bad79b78ce6e8ea2b872cbaf37e2 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 29 Feb 2016 09:48:12 +0100 -Subject: [PATCH 1/8] opencdk: Fixes to prevent undefined behavior (found with - libubsan) - ---- - lib/opencdk/misc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/opencdk/misc.c b/lib/opencdk/misc.c -index 0d4ee8912..35172e5dd 100644 ---- a/lib/opencdk/misc.c -+++ b/lib/opencdk/misc.c -@@ -41,7 +41,7 @@ u32 _cdk_buftou32(const byte * buf) - - if (!buf) - return 0; -- u = buf[0] << 24; -+ u = ((u32)buf[0]) << 24; - u |= buf[1] << 16; - u |= buf[2] << 8; - u |= buf[3]; --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch gnutls28-3.3.30/debian/patches/55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch --- gnutls28-3.3.8/debian/patches/55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,70 +0,0 @@ -From 16862f233f4600a4c1c827be8b1a18b6f80e0ce4 Mon Sep 17 00:00:00 2001 -From: Alex Gaynor -Date: Mon, 26 Dec 2016 13:15:25 -0500 -Subject: [PATCH 2/8] Do not infinite loop if an EOF occurs while skipping a - PGP packet - -Signed-off-by: Alex Gaynor ---- - lib/opencdk/read-packet.c | 21 ++++++++++++++++----- - 1 file changed, 16 insertions(+), 5 deletions(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index becd6cb76..67ea938f7 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -42,8 +42,13 @@ - static int - stream_read(cdk_stream_t s, void *buf, size_t buflen, size_t * r_nread) - { -- *r_nread = cdk_stream_read(s, buf, buflen); -- return *r_nread > 0 ? 0 : _cdk_stream_get_errno(s); -+ int res = cdk_stream_read(s, buf, buflen); -+ if (res > 0) { -+ *r_nread = res; -+ return 0; -+ } else { -+ return (cdk_stream_eof(s) ? EOF : _cdk_stream_get_errno(s)); -+ } - } - - -@@ -875,18 +880,22 @@ read_new_length(cdk_stream_t inp, - - - /* Skip the current packet body. */ --static void skip_packet(cdk_stream_t inp, size_t pktlen) -+static cdk_error_t skip_packet(cdk_stream_t inp, size_t pktlen) - { - byte buf[BUFSIZE]; - size_t nread, buflen = DIM(buf); - - while (pktlen > 0) { -- stream_read(inp, buf, pktlen > buflen ? buflen : pktlen, -+ cdk_error_t rc; -+ rc = stream_read(inp, buf, pktlen > buflen ? buflen : pktlen, - &nread); -+ if (rc) -+ return rc; - pktlen -= nread; - } - - assert(pktlen == 0); -+ return 0; - } - - -@@ -1087,7 +1096,9 @@ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) - - default: - /* Skip all packets we don't understand */ -- skip_packet(inp, pktlen); -+ rc = skip_packet(inp, pktlen); -+ if (rc) -+ return gnutls_assert_val(rc); - break; - } - --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch gnutls28-3.3.30/debian/patches/55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch --- gnutls28-3.3.8/debian/patches/55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,28 +0,0 @@ -From 9ca2dccfb51c487b6dc14c64b73a1668d0801086 Mon Sep 17 00:00:00 2001 -From: Alex Gaynor -Date: Fri, 30 Dec 2016 21:17:22 -0500 -Subject: [PATCH 3/8] Attempt to fix a leak in OpenPGP cert parsing. - ---- - lib/opencdk/read-packet.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index 67ea938f7..f1d165053 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -510,8 +510,10 @@ read_attribute(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr, - p++; - len--; - -- if (len >= pktlen) -+ if (len >= pktlen) { -+ cdk_free(buf); - return CDK_Inv_Packet; -+ } - attr->attrib_img = cdk_calloc(1, len); - if (!attr->attrib_img) { - cdk_free(buf); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch gnutls28-3.3.30/debian/patches/55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch --- gnutls28-3.3.8/debian/patches/55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,29 +0,0 @@ -From affb3d659681af1dca04448e25f27c7e22eda0c7 Mon Sep 17 00:00:00 2001 -From: Alex Gaynor -Date: Sun, 1 Jan 2017 09:15:09 -0500 -Subject: [PATCH 4/8] Corrected a leak in OpenPGP sub-packet parsing. - -Signed-off-by: Alex Gaynor ---- - lib/opencdk/read-packet.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index f1d165053..8cba25c47 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -596,8 +596,10 @@ read_subpkt(cdk_stream_t inp, cdk_subpkt_t * r_ctx, size_t * r_nbytes) - node->size--; - rc = stream_read(inp, node->d, node->size, &nread); - n += nread; -- if (rc) -+ if (rc) { -+ cdk_subpkt_free(node); - return rc; -+ } - *r_nbytes = n; - if (!*r_ctx) - *r_ctx = node; --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch gnutls28-3.3.30/debian/patches/55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch --- gnutls28-3.3.8/debian/patches/55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,98 +0,0 @@ -From 6231a4a087f9fdbd5f5f274e80c7a71e3e45b9c8 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 4 Jan 2017 14:42:03 +0100 -Subject: [PATCH 5/8] opencdk: read_attribute: added more precise checks when - reading stream - -That addresses heap read overflows found using oss-fuzz: - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=338 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=346 - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/read-packet.c | 40 +++++++++++++++++++++++++++++----------- - 1 file changed, 29 insertions(+), 11 deletions(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index 8cba25c47..e8ff24ffe 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -483,46 +483,64 @@ read_attribute(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr, - return CDK_Out_Of_Core; - rc = stream_read(inp, buf, pktlen, &nread); - if (rc) { -- cdk_free(buf); -- return CDK_Inv_Packet; -+ gnutls_assert(); -+ rc = CDK_Inv_Packet; -+ goto error; - } -+ - p = buf; - len = *p++; - pktlen--; -+ - if (len == 255) { -+ if (pktlen < 4) { -+ gnutls_assert(); -+ rc = CDK_Inv_Packet; -+ goto error; -+ } -+ - len = _cdk_buftou32(p); - p += 4; - pktlen -= 4; - } else if (len >= 192) { - if (pktlen < 2) { -- cdk_free(buf); -- return CDK_Inv_Packet; -+ gnutls_assert(); -+ rc = CDK_Inv_Packet; -+ goto error; - } -+ - len = ((len - 192) << 8) + *p + 192; - p++; - pktlen--; - } - -- if (*p != 1) { /* Currently only 1, meaning an image, is defined. */ -- cdk_free(buf); -- return CDK_Inv_Packet; -+ if (!len || *p != 1) { /* Currently only 1, meaning an image, is defined. */ -+ rc = CDK_Inv_Packet; -+ goto error; - } -+ - p++; - len--; - - if (len >= pktlen) { -- cdk_free(buf); -- return CDK_Inv_Packet; -+ rc = CDK_Inv_Packet; -+ goto error; - } -+ - attr->attrib_img = cdk_calloc(1, len); - if (!attr->attrib_img) { -- cdk_free(buf); -- return CDK_Out_Of_Core; -+ rc = CDK_Out_Of_Core; -+ goto error; - } -+ - attr->attrib_len = len; - memcpy(attr->attrib_img, p, len); - cdk_free(buf); - return rc; -+ -+ error: -+ cdk_free(buf); -+ return rc; - } - - --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch gnutls28-3.3.30/debian/patches/55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch --- gnutls28-3.3.8/debian/patches/55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,42 +0,0 @@ -From 7dec871f82e205107a81281e3286f0aa9caa93b3 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 4 Jan 2017 14:56:50 +0100 -Subject: [PATCH 6/8] opencdk: cdk_pk_get_keyid: fix stack overflow - -Issue found using oss-fuzz: - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=340 - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/pubkey.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/lib/opencdk/pubkey.c b/lib/opencdk/pubkey.c -index 6e753bd25..da43129f9 100644 ---- a/lib/opencdk/pubkey.c -+++ b/lib/opencdk/pubkey.c -@@ -518,6 +518,7 @@ u32 cdk_pk_get_keyid(cdk_pubkey_t pk, u32 * keyid) - { - u32 lowbits = 0; - byte buf[24]; -+ int rc; - - if (pk && (!pk->keyid[0] || !pk->keyid[1])) { - if (pk->version < 4 && is_RSA(pk->pubkey_algo)) { -@@ -525,7 +526,12 @@ u32 cdk_pk_get_keyid(cdk_pubkey_t pk, u32 * keyid) - size_t n; - - n = MAX_MPI_BYTES; -- _gnutls_mpi_print(pk->mpi[0], p, &n); -+ rc = _gnutls_mpi_print(pk->mpi[0], p, &n); -+ if (rc < 0 || n < 8) { -+ keyid[0] = keyid[1] = (u32)-1; -+ return (u32)-1; -+ } -+ - pk->keyid[0] = - p[n - 8] << 24 | p[n - 7] << 16 | p[n - - 6] << 8 | --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch gnutls28-3.3.30/debian/patches/55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch --- gnutls28-3.3.8/debian/patches/55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,139 +0,0 @@ -From 785af1ab577f899d2e54172ff120f404709bf172 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 4 Jan 2017 15:22:13 +0100 -Subject: [PATCH 7/8] opencdk: added error checking in the stream reading - functions - -This addresses an out of memory error. Issue found using oss-fuzz: - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=337 - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/read-packet.c | 40 +++++++++++++++++++++++++++++++++++----- - 1 file changed, 35 insertions(+), 5 deletions(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index e8ff24ffe..7a474ff54 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -43,6 +43,7 @@ static int - stream_read(cdk_stream_t s, void *buf, size_t buflen, size_t * r_nread) - { - int res = cdk_stream_read(s, buf, buflen); -+ - if (res > 0) { - *r_nread = res; - return 0; -@@ -56,13 +57,13 @@ stream_read(cdk_stream_t s, void *buf, size_t buflen, size_t * r_nread) - static u32 read_32(cdk_stream_t s) - { - byte buf[4]; -- size_t nread; -+ size_t nread = 0; - - assert(s != NULL); - - stream_read(s, buf, 4, &nread); - if (nread != 4) -- return (u32) - 1; -+ return (u32) -1; - return buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; - } - -@@ -71,7 +72,7 @@ static u32 read_32(cdk_stream_t s) - static u16 read_16(cdk_stream_t s) - { - byte buf[2]; -- size_t nread; -+ size_t nread = 0; - - assert(s != NULL); - -@@ -573,7 +574,7 @@ read_user_id(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t user_id) - static cdk_error_t - read_subpkt(cdk_stream_t inp, cdk_subpkt_t * r_ctx, size_t * r_nbytes) - { -- byte c, c1; -+ int c, c1; - size_t size, nread, n; - cdk_subpkt_t node; - cdk_error_t rc; -@@ -588,11 +589,18 @@ read_subpkt(cdk_stream_t inp, cdk_subpkt_t * r_ctx, size_t * r_nbytes) - *r_nbytes = 0; - c = cdk_stream_getc(inp); - n++; -+ - if (c == 255) { - size = read_32(inp); -+ if (size == (u32)-1) -+ return CDK_Inv_Packet; -+ - n += 4; - } else if (c >= 192 && c < 255) { - c1 = cdk_stream_getc(inp); -+ if (c1 == EOF) -+ return CDK_Inv_Packet; -+ - n++; - if (c1 == 0) - return 0; -@@ -859,17 +867,29 @@ static void - read_old_length(cdk_stream_t inp, int ctb, size_t * r_len, size_t * r_size) - { - int llen = ctb & 0x03; -+ int c; - - if (llen == 0) { -- *r_len = cdk_stream_getc(inp); -+ c = cdk_stream_getc(inp); -+ if (c == EOF) -+ goto fail; -+ -+ *r_len = c; - (*r_size)++; - } else if (llen == 1) { - *r_len = read_16(inp); -+ if (*r_len == (u16)-1) -+ goto fail; - (*r_size) += 2; - } else if (llen == 2) { - *r_len = read_32(inp); -+ if (*r_len == (u32)-1) { -+ goto fail; -+ } -+ - (*r_size) += 4; - } else { -+ fail: - *r_len = 0; - *r_size = 0; - } -@@ -884,15 +904,25 @@ read_new_length(cdk_stream_t inp, - int c, c1; - - c = cdk_stream_getc(inp); -+ if (c == EOF) -+ return; -+ - (*r_size)++; - if (c < 192) - *r_len = c; - else if (c >= 192 && c <= 223) { - c1 = cdk_stream_getc(inp); -+ if (c1 == EOF) -+ return; -+ - (*r_size)++; - *r_len = ((c - 192) << 8) + c1 + 192; - } else if (c == 255) { - *r_len = read_32(inp); -+ if (*r_len == (u32)-1) { -+ return; -+ } -+ - (*r_size) += 4; - } else { - *r_len = 1 << (c & 0x1f); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch gnutls28-3.3.30/debian/patches/55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch --- gnutls28-3.3.8/debian/patches/55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,35 +0,0 @@ -From d16ccb7ee8b890c4e9fe5a9e062c0d525c44340c Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Tue, 17 Jan 2017 13:34:33 +0100 -Subject: [PATCH] opencdk: improved error code checking in the stream reading - functions - -This ammends 49be4f7b82eba2363bb8d4090950dad976a77a3a - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/read-packet.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index 7a474ff54..8a8d87a1f 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -918,11 +918,12 @@ read_new_length(cdk_stream_t inp, - (*r_size)++; - *r_len = ((c - 192) << 8) + c1 + 192; - } else if (c == 255) { -- *r_len = read_32(inp); -- if (*r_len == (u32)-1) { -+ c1 = read_32(inp); -+ if (c1 == (u32)-1) { - return; - } - -+ *r_len = c1; - (*r_size) += 4; - } else { - *r_len = 1 << (c & 0x1f); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch gnutls28-3.3.30/debian/patches/55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch --- gnutls28-3.3.8/debian/patches/55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,26 +0,0 @@ -From 5888e3cc63611396adb90d3ad1dc42a0bdb5850b Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 20 Feb 2017 11:14:49 +0100 -Subject: [PATCH] opencdk/read-packet.c: corrected typo in type cast - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/read-packet.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index d95845d56..a2631fed1 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -919,7 +919,7 @@ read_new_length(cdk_stream_t inp, - *r_len = ((c - 192) << 8) + c1 + 192; - } else if (c == 255) { - c1 = read_32(inp); -- if (c1 == (u32)-1) { -+ if (c1 == -1) { - return; - } - --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch gnutls28-3.3.30/debian/patches/55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch --- gnutls28-3.3.8/debian/patches/55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,31 +0,0 @@ -From 0715c72c482931b962294f9388f28fbb2a707d80 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Fri, 3 Feb 2017 23:41:51 +0100 -Subject: [PATCH] gnutls_pkcs11_obj_list_import_url2: Always return an - initialized pointer - -When returning success, but no elements, gnutls_pkcs11_obj_list_import_url4, -could have returned zero number of elements with a pointer that was uninitialized. -Ensure that an initialized (i.e., null in that case), pointer is always returned. -Reported by Jeremy Harris. - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/pkcs11.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/pkcs11.c b/lib/pkcs11.c -index d99dedff6..f5cf99d65 100644 ---- a/lib/pkcs11.c -+++ b/lib/pkcs11.c -@@ -3019,6 +3019,7 @@ gnutls_pkcs11_obj_list_import_url2(gnutls_pkcs11_obj_t ** p_list, - if (ret < 0) { - gnutls_assert(); - if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { -+ *p_list = NULL; - *n_list = 0; - ret = 0; - } --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_13_cdk_pkt_read-enforce-packet-limits.patch gnutls28-3.3.30/debian/patches/55_13_cdk_pkt_read-enforce-packet-limits.patch --- gnutls28-3.3.8/debian/patches/55_13_cdk_pkt_read-enforce-packet-limits.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_13_cdk_pkt_read-enforce-packet-limits.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,55 +0,0 @@ -From 09a2f72584bb52ba87a97ee291729d6609229626 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Mon, 20 Feb 2017 11:13:08 +0100 -Subject: [PATCH] cdk_pkt_read: enforce packet limits - -That ensures that there are no overflows in the subsequent -calculations. - -Resolves the oss-fuzz found bug: -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=420 - -Relates: #159 - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/read-packet.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index 8a8d87a1f..d95845d56 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -951,6 +951,7 @@ static cdk_error_t skip_packet(cdk_stream_t inp, size_t pktlen) - return 0; - } - -+#define MAX_PACKET_LEN (1<<24) - - /** - * cdk_pkt_read: -@@ -1003,6 +1004,13 @@ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) - else - read_old_length(inp, ctb, &pktlen, &pktsize); - -+ /* enforce limits to ensure that the following calculations -+ * do not overflow */ -+ if (pktlen >= MAX_PACKET_LEN || pktsize >= MAX_PACKET_LEN) { -+ _cdk_log_info("cdk_pkt_read: too long packet\n"); -+ return gnutls_assert_val(CDK_Inv_Packet); -+ } -+ - pkt->pkttype = pkttype; - pkt->pktlen = pktlen; - pkt->pktsize = pktsize + pktlen; -@@ -1027,6 +1035,7 @@ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) - break; - - case CDK_PKT_USER_ID: -+ - pkt->pkt.user_id = cdk_calloc(1, sizeof *pkt->pkt.user_id - + pkt->pktlen + 1); - if (!pkt->pkt.user_id) --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch gnutls28-3.3.30/debian/patches/55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch --- gnutls28-3.3.8/debian/patches/55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,243 +0,0 @@ -From 9fe2b08714ac25a079f58790fd577b156bf5bf93 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 1 Mar 2017 07:54:04 +0100 -Subject: [PATCH] opencdk: do not parse any secret keys in packet when reading - a certificate - -This reduces the attack surface on the parsers, and prevents any bugs -in the secret key parser to be exploitable by inserting secret key -sub-packets into an openpgp certificate. - -This addresses: - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=354 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=360 - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/opencdk/kbnode.c | 6 ++++-- - lib/opencdk/keydb.c | 14 +++++++------- - lib/opencdk/literal.c | 2 +- - lib/opencdk/opencdk.h | 7 ++++--- - lib/opencdk/read-packet.c | 10 +++++++++- - lib/openpgp/gnutls_openpgp.c | 2 +- - lib/openpgp/pgp.c | 2 +- - lib/openpgp/privkey.c | 2 +- - 8 files changed, 28 insertions(+), 17 deletions(-) - -diff --git a/lib/opencdk/kbnode.c b/lib/opencdk/kbnode.c -index c28cb349b..f865b16ca 100644 ---- a/lib/opencdk/kbnode.c -+++ b/lib/opencdk/kbnode.c -@@ -369,12 +369,14 @@ cdk_packet_t cdk_kbnode_get_packet(cdk_kbnode_t node) - * @armor: whether base64 or not - * @buf: the buffer which stores the key sequence - * @buflen: the length of the buffer -+ * @public: non-zero if reading a public key - * - * Tries to read a key node from the memory buffer @buf. - **/ - cdk_error_t - cdk_kbnode_read_from_mem(cdk_kbnode_t * ret_node, -- int armor, const byte * buf, size_t buflen) -+ int armor, const byte * buf, size_t buflen, -+ unsigned public) - { - cdk_stream_t inp; - cdk_error_t rc; -@@ -393,7 +395,7 @@ cdk_kbnode_read_from_mem(cdk_kbnode_t * ret_node, - if (armor) - cdk_stream_set_armor_flag(inp, 0); - -- rc = cdk_keydb_get_keyblock(inp, ret_node); -+ rc = cdk_keydb_get_keyblock(inp, ret_node, public); - if (rc) - gnutls_assert(); - cdk_stream_close(inp); -diff --git a/lib/opencdk/keydb.c b/lib/opencdk/keydb.c -index 64eebf034..9112d9ab5 100644 ---- a/lib/opencdk/keydb.c -+++ b/lib/opencdk/keydb.c -@@ -108,7 +108,7 @@ static cdk_error_t keydb_idx_build(const char *file) - while (!cdk_stream_eof(inp)) { - off_t pos = cdk_stream_tell(inp); - -- rc = cdk_pkt_read(inp, pkt); -+ rc = cdk_pkt_read(inp, pkt, 1); - if (rc) { - _cdk_log_debug - ("index build failed packet off=%lu\n", -@@ -816,7 +816,7 @@ cdk_keydb_search(cdk_keydb_search_t st, cdk_keydb_hd_t hd, - - pos = cdk_stream_tell(kr); - -- rc = cdk_keydb_get_keyblock(kr, &knode); -+ rc = cdk_keydb_get_keyblock(kr, &knode, 1); - - if (rc) { - if (rc == CDK_EOF) -@@ -1679,7 +1679,7 @@ add_key_usage(cdk_kbnode_t knode, u32 keyid[2], unsigned int usage) - } - - cdk_error_t --cdk_keydb_get_keyblock(cdk_stream_t inp, cdk_kbnode_t * r_knode) -+cdk_keydb_get_keyblock(cdk_stream_t inp, cdk_kbnode_t * r_knode, unsigned public) - { - cdk_packet_t pkt; - cdk_kbnode_t knode, node; -@@ -1706,7 +1706,7 @@ cdk_keydb_get_keyblock(cdk_stream_t inp, cdk_kbnode_t * r_knode) - while (!cdk_stream_eof(inp)) { - cdk_pkt_new(&pkt); - old_off = cdk_stream_tell(inp); -- rc = cdk_pkt_read(inp, pkt); -+ rc = cdk_pkt_read(inp, pkt, public); - if (rc) { - cdk_pkt_release(pkt); - if (rc == CDK_EOF) -@@ -2126,7 +2126,7 @@ cdk_error_t cdk_keydb_check_sk(cdk_keydb_hd_t hd, u32 * keyid) - return rc; - } - cdk_pkt_new(&pkt); -- while (!cdk_pkt_read(db, pkt)) { -+ while (!cdk_pkt_read(db, pkt, 0)) { - if (pkt->pkttype != CDK_PKT_SECRET_KEY && - pkt->pkttype != CDK_PKT_SECRET_SUBKEY) { - cdk_pkt_free(pkt); -@@ -2241,14 +2241,14 @@ cdk_error_t cdk_listkey_next(cdk_listkey_t ctx, cdk_kbnode_t * ret_key) - } - - if (ctx->type && ctx->u.patt[0] == '*') -- return cdk_keydb_get_keyblock(ctx->inp, ret_key); -+ return cdk_keydb_get_keyblock(ctx->inp, ret_key, 1); - else if (ctx->type) { - cdk_kbnode_t node; - struct cdk_keydb_search_s ks; - cdk_error_t rc; - - for (;;) { -- rc = cdk_keydb_get_keyblock(ctx->inp, &node); -+ rc = cdk_keydb_get_keyblock(ctx->inp, &node, 1); - if (rc) { - gnutls_assert(); - return rc; -diff --git a/lib/opencdk/literal.c b/lib/opencdk/literal.c -index 7b4baec82..69967742a 100644 ---- a/lib/opencdk/literal.c -+++ b/lib/opencdk/literal.c -@@ -67,7 +67,7 @@ static cdk_error_t literal_decode(void *data, FILE * in, FILE * out) - return rc; - - cdk_pkt_new(&pkt); -- rc = cdk_pkt_read(si, pkt); -+ rc = cdk_pkt_read(si, pkt, 1); - if (rc || pkt->pkttype != CDK_PKT_LITERAL) { - cdk_pkt_release(pkt); - cdk_stream_close(si); -diff --git a/lib/opencdk/opencdk.h b/lib/opencdk/opencdk.h -index c06b74984..d95cc32b6 100644 ---- a/lib/opencdk/opencdk.h -+++ b/lib/opencdk/opencdk.h -@@ -553,7 +553,7 @@ extern "C" { - void cdk_pkt_release(cdk_packet_t pkt); - - /* Read or write the given output from or to the stream. */ -- cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt); -+ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt, unsigned public); - cdk_error_t cdk_pkt_write(cdk_stream_t out, cdk_packet_t pkt); - - /* Sub packet routines */ -@@ -814,7 +814,8 @@ extern "C" { - /* Try to read the next key block from the given input stream. - The key will be returned in @RET_KEY on success. */ - cdk_error_t cdk_keydb_get_keyblock(cdk_stream_t inp, -- cdk_kbnode_t * ret_key); -+ cdk_kbnode_t * ret_key, -+ unsigned public); - - /* Rebuild the key db index if possible. */ - cdk_error_t cdk_keydb_idx_rebuild(cdk_keydb_hd_t db, -@@ -848,7 +849,7 @@ extern "C" { - cdk_error_t cdk_kbnode_read_from_mem(cdk_kbnode_t * ret_node, - int armor, - const unsigned char *buf, -- size_t buflen); -+ size_t buflen, unsigned public); - cdk_error_t cdk_kbnode_write_to_mem(cdk_kbnode_t node, - unsigned char *buf, - size_t * r_nbytes); -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index a2631fed1..e202a10b0 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -960,7 +960,7 @@ static cdk_error_t skip_packet(cdk_stream_t inp, size_t pktlen) - * - * Parse the next packet on the @inp stream and return its contents in @pkt. - **/ --cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) -+cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt, unsigned public) - { - int ctb, is_newctb; - int pkttype; -@@ -1068,6 +1068,10 @@ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) - break; - - case CDK_PKT_SECRET_KEY: -+ if (public) { -+ /* read secret key when expecting public */ -+ return gnutls_assert_val(CDK_Inv_Packet); -+ } - pkt->pkt.secret_key = - cdk_calloc(1, sizeof *pkt->pkt.secret_key); - if (!pkt->pkt.secret_key) -@@ -1083,6 +1087,10 @@ cdk_error_t cdk_pkt_read(cdk_stream_t inp, cdk_packet_t pkt) - break; - - case CDK_PKT_SECRET_SUBKEY: -+ if (public) { -+ /* read secret key when expecting public */ -+ return gnutls_assert_val(CDK_Inv_Packet); -+ } - pkt->pkt.secret_key = - cdk_calloc(1, sizeof *pkt->pkt.secret_key); - if (!pkt->pkt.secret_key) -diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c -index 7c05e1fbf..192737f83 100644 ---- a/lib/openpgp/gnutls_openpgp.c -+++ b/lib/openpgp/gnutls_openpgp.c -@@ -479,7 +479,7 @@ int gnutls_openpgp_count_key_names(const gnutls_datum_t * cert) - return 0; - } - -- if (cdk_kbnode_read_from_mem(&knode, 0, cert->data, cert->size)) { -+ if (cdk_kbnode_read_from_mem(&knode, 0, cert->data, cert->size, 1)) { - gnutls_assert(); - return 0; - } -diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c -index d5ef2722b..77e57ab41 100644 ---- a/lib/openpgp/pgp.c -+++ b/lib/openpgp/pgp.c -@@ -99,7 +99,7 @@ gnutls_openpgp_crt_import(gnutls_openpgp_crt_t key, - armor = 1; - - rc = cdk_kbnode_read_from_mem(&key->knode, armor, data->data, -- data->size); -+ data->size, 1); - if (rc) { - rc = _gnutls_map_cdk_rc(rc); - gnutls_assert(); -diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c -index 6aa6fb543..81ec3ab3d 100644 ---- a/lib/openpgp/privkey.c -+++ b/lib/openpgp/privkey.c -@@ -186,7 +186,7 @@ gnutls_openpgp_privkey_import(gnutls_openpgp_privkey_t key, - armor = 1; - - rc = cdk_kbnode_read_from_mem(&key->knode, armor, data->data, -- data->size); -+ data->size, 0); - if (rc != 0) { - rc = _gnutls_map_cdk_rc(rc); - gnutls_assert(); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch gnutls28-3.3.30/debian/patches/55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch --- gnutls28-3.3.8/debian/patches/55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,50 +0,0 @@ -From efa1251cc197239a36eca48fd204afae41b05994 Mon Sep 17 00:00:00 2001 -From: Alex Gaynor -Date: Sun, 5 Mar 2017 02:21:30 +0000 -Subject: [PATCH] Enforce the max packet length for OpenPGP subpackets as well - -This addresses: - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392 - -Signed-off-by: Alex Gaynor ---- - lib/opencdk/read-packet.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c -index e202a10b0..56bbccc70 100644 ---- a/lib/opencdk/read-packet.c -+++ b/lib/opencdk/read-packet.c -@@ -571,6 +571,9 @@ read_user_id(cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t user_id) - } - - -+#define MAX_PACKET_LEN (1<<24) -+ -+ - static cdk_error_t - read_subpkt(cdk_stream_t inp, cdk_subpkt_t * r_ctx, size_t * r_nbytes) - { -@@ -610,6 +613,10 @@ read_subpkt(cdk_stream_t inp, cdk_subpkt_t * r_ctx, size_t * r_nbytes) - else - return CDK_Inv_Packet; - -+ if (size >= MAX_PACKET_LEN) { -+ return CDK_Inv_Packet; -+ } -+ - node = cdk_subpkt_new(size); - if (!node) - return CDK_Out_Of_Core; -@@ -951,8 +958,6 @@ static cdk_error_t skip_packet(cdk_stream_t inp, size_t pktlen) - return 0; - } - --#define MAX_PACKET_LEN (1<<24) -- - /** - * cdk_pkt_read: - * @inp: the input stream --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch --- gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,71 +0,0 @@ -From 9d95c912b5843e664c8210887a6719f02a9028be Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 24 May 2017 10:46:03 +0200 -Subject: [PATCH 1/3] ext/status_request: ensure response IDs are properly - deinitialized - -That is, do not attempt to loop through the array if there is no array -allocated. - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/ext/status_request.c | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c -index 8cefc617e..1340dbbb5 100644 ---- a/lib/ext/status_request.c -+++ b/lib/ext/status_request.c -@@ -68,7 +68,10 @@ typedef struct { - - static void deinit_responder_id(status_request_ext_st *priv) - { --unsigned i; -+ unsigned i; -+ -+ if (priv->responder_id == NULL) -+ return; - - for (i = 0; i < priv->responder_id_size; i++) - gnutls_free(priv->responder_id[i].data); -@@ -134,6 +137,7 @@ server_recv(gnutls_session_t session, - { - size_t i; - ssize_t data_size = size; -+ unsigned responder_ids = 0; - - /* minimum message is type (1) + responder_id_list (2) + - request_extension (2) = 5 */ -@@ -152,23 +156,24 @@ server_recv(gnutls_session_t session, - DECR_LEN(data_size, 1); - data++; - -- priv->responder_id_size = _gnutls_read_uint16(data); -+ responder_ids = _gnutls_read_uint16(data); - - DECR_LEN(data_size, 2); - data += 2; - -- if (data_size <= (ssize_t) (priv->responder_id_size * 2)) -+ if (data_size <= (ssize_t) (responder_ids * 2)) - return - gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER); - -- if (priv->responder_id != NULL) -- deinit_responder_id(priv); -+ deinit_responder_id(priv); - -- priv->responder_id = gnutls_calloc(1, priv->responder_id_size -+ priv->responder_id = gnutls_calloc(1, responder_ids - * sizeof(*priv->responder_id)); - if (priv->responder_id == NULL) - return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); - -+ priv->responder_id_size = responder_ids; -+ - for (i = 0; i < priv->responder_id_size; i++) { - size_t l; - --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch --- gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,132 +0,0 @@ -From 023a20d21b762918d3e1ab25a207ecf874ba21a9 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 24 May 2017 11:38:16 +0200 -Subject: [PATCH 2/3] ext/status_request: Removed the parsing of responder IDs - from client extension - -These values were never used by gnutls, nor were accessible to applications, -and as such there is not reason to parse them. - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/ext/status_request.c | 67 ++++++++++++------------------------------------ - 1 file changed, 16 insertions(+), 51 deletions(-) - -diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c -index 1340dbbb5..c7c065e5e 100644 ---- a/lib/ext/status_request.c -+++ b/lib/ext/status_request.c -@@ -1,5 +1,6 @@ - /* -- * Copyright (C) 2012 Free Software Foundation, Inc. -+ * Copyright (C) 2012-2017 Free Software Foundation, Inc. -+ * Copyright (C) 2017 Red Hat, Inc. - * - * Author: Simon Josefsson, Nikos Mavrogiannopoulos - * -@@ -66,21 +67,6 @@ typedef struct { - opaque Extensions<0..2^16-1>; - */ - --static void deinit_responder_id(status_request_ext_st *priv) --{ -- unsigned i; -- -- if (priv->responder_id == NULL) -- return; -- -- for (i = 0; i < priv->responder_id_size; i++) -- gnutls_free(priv->responder_id[i].data); -- -- gnutls_free(priv->responder_id); -- priv->responder_id = NULL; -- priv->responder_id_size = 0; --} -- - - static int - client_send(gnutls_session_t session, -@@ -135,9 +121,8 @@ server_recv(gnutls_session_t session, - status_request_ext_st * priv, - const uint8_t * data, size_t size) - { -- size_t i; - ssize_t data_size = size; -- unsigned responder_ids = 0; -+ unsigned rid_bytes = 0; - - /* minimum message is type (1) + responder_id_list (2) + - request_extension (2) = 5 */ -@@ -156,44 +141,17 @@ server_recv(gnutls_session_t session, - DECR_LEN(data_size, 1); - data++; - -- responder_ids = _gnutls_read_uint16(data); -+ rid_bytes = _gnutls_read_uint16(data); - - DECR_LEN(data_size, 2); -- data += 2; -+ /*data += 2;*/ - -- if (data_size <= (ssize_t) (responder_ids * 2)) -+ /* sanity check only, we don't use any of the data below */ -+ -+ if (data_size < (ssize_t)rid_bytes) - return - gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER); - -- deinit_responder_id(priv); -- -- priv->responder_id = gnutls_calloc(1, responder_ids -- * sizeof(*priv->responder_id)); -- if (priv->responder_id == NULL) -- return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); -- -- priv->responder_id_size = responder_ids; -- -- for (i = 0; i < priv->responder_id_size; i++) { -- size_t l; -- -- DECR_LEN(data_size, 2); -- -- l = _gnutls_read_uint16(data); -- data += 2; -- -- DECR_LEN(data_size, l); -- -- priv->responder_id[i].data = gnutls_malloc(l); -- if (priv->responder_id[i].data == NULL) -- return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR); -- -- memcpy(priv->responder_id[i].data, data, l); -- priv->responder_id[i].size = l; -- -- data += l; -- } -- - return 0; - } - -@@ -477,11 +435,18 @@ gnutls_certificate_set_ocsp_status_request_file - static void _gnutls_status_request_deinit_data(extension_priv_data_t epriv) - { - status_request_ext_st *priv = epriv.ptr; -+ unsigned i; - - if (priv == NULL) - return; - -- deinit_responder_id(priv); -+ if (priv->responder_id != NULL) { -+ for (i = 0; i < priv->responder_id_size; i++) -+ gnutls_free(priv->responder_id[i].data); -+ -+ gnutls_free(priv->responder_id); -+ } -+ - gnutls_free(priv->request_extensions.data); - gnutls_free(priv->response.data); - gnutls_free(priv); --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch --- gnutls28-3.3.8/debian/patches/56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch 2017-06-24 11:41:48.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,40 +0,0 @@ -From 3ade67eb6859a5a074f981480e5663ea92a59380 Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Wed, 24 May 2017 11:48:24 +0200 -Subject: [PATCH 3/3] gnutls_ocsp_status_request_enable_client: documented - requirements for parameters - -That is, the fact that extensions and responder_id parameters must be -allocated, and are assigned to the session. - -Signed-off-by: Nikos Mavrogiannopoulos ---- - lib/ext/status_request.c | 12 +++++++++--- - 1 file changed, 9 insertions(+), 3 deletions(-) - -diff --git a/lib/ext/status_request.c b/lib/ext/status_request.c -index c7c065e5e..a1f3521c8 100644 ---- a/lib/ext/status_request.c -+++ b/lib/ext/status_request.c -@@ -266,9 +266,15 @@ _gnutls_status_request_recv_params(gnutls_session_t session, - * - * This function is to be used by clients to request OCSP response - * from the server, using the "status_request" TLS extension. Only -- * OCSP status type is supported. A typical server has a single -- * OCSP response cached, so @responder_id and @extensions -- * should be null. -+ * OCSP status type is supported. -+ * -+ * The @responder_id array, its containing elements as well as -+ * the data of @extensions, must be allocated using gnutls_malloc(). They -+ * will be deinitialized on session cleanup. -+ * -+ * Due to the difficult semantics of the @responder_id and @extensions -+ * parameters, it is recommended to only call this function with these -+ * parameters set to %NULL. - * - * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, - * otherwise a negative error code is returned. --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch gnutls28-3.3.30/debian/patches/57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch --- gnutls28-3.3.8/debian/patches/57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch 2017-06-24 11:49:20.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch 1969-12-31 19:00:00.000000000 -0500 @@ -1,56 +0,0 @@ -From 5006914fda50f25807451a03616cdf2e7be0268f Mon Sep 17 00:00:00 2001 -From: Nikos Mavrogiannopoulos -Date: Fri, 15 Jul 2016 14:58:07 +0200 -Subject: [PATCH] urandom: use st_ino and st_rdev to determine device - uniqueness - ---- - lib/nettle/rnd-common.c | 11 +++++++---- - 1 file changed, 7 insertions(+), 4 deletions(-) - -diff --git a/lib/nettle/rnd-common.c b/lib/nettle/rnd-common.c -index 47d2b0edd..33a71d351 100644 ---- a/lib/nettle/rnd-common.c -+++ b/lib/nettle/rnd-common.c -@@ -137,7 +137,8 @@ void _rnd_system_entropy_deinit(void) - #include "egd.h" - - static int _gnutls_urandom_fd = -1; --static mode_t _gnutls_urandom_fd_mode = 0; -+static ino_t _gnutls_urandom_fd_ino = 0; -+static dev_t _gnutls_urandom_fd_rdev = 0; - - static int _rnd_get_system_entropy_urandom(void* _rnd, size_t size) - { -@@ -202,7 +203,7 @@ int _rnd_system_entropy_check(void) - struct stat st; - - ret = fstat(_gnutls_urandom_fd, &st); -- if (ret < 0 || st.st_mode != _gnutls_urandom_fd_mode) { -+ if (ret < 0 || st.st_ino != _gnutls_urandom_fd_ino || st.st_rdev != _gnutls_urandom_fd_rdev) { - return _rnd_system_entropy_init(); - } - return 0; -@@ -224,7 +225,8 @@ int _rnd_system_entropy_init(void) - fcntl(_gnutls_urandom_fd, F_SETFD, old | FD_CLOEXEC); - - if (fstat(_gnutls_urandom_fd, &st) >= 0) { -- _gnutls_urandom_fd_mode = st.st_mode; -+ _gnutls_urandom_fd_ino = st.st_ino; -+ _gnutls_urandom_fd_rdev = st.st_rdev; - } - - _rnd_get_system_entropy = _rnd_get_system_entropy_urandom; -@@ -240,7 +242,8 @@ fallback: - } - - if (fstat(_gnutls_urandom_fd, &st) >= 0) { -- _gnutls_urandom_fd_mode = st.st_mode; -+ _gnutls_urandom_fd_ino = st.st_ino; -+ _gnutls_urandom_fd_rdev = st.st_rdev; - } - - _rnd_get_system_entropy = _rnd_get_system_entropy_egd; --- -2.11.0 - diff -Nru gnutls28-3.3.8/debian/patches/series gnutls28-3.3.30/debian/patches/series --- gnutls28-3.3.8/debian/patches/series 2017-06-24 11:50:33.000000000 -0400 +++ gnutls28-3.3.30/debian/patches/series 2018-10-22 14:33:06.000000000 -0400 @@ -1,39 +1,4 @@ 14_version_gettextcat.diff 20_debian_specific_soname.diff 30_guile-snarf.diff -35_recheck_urandom_fd.diff -36_less_refresh-rnd-state.diff -37_X9.63_sanity_check.diff -38_testforsanitycheck.diff -39_check-whether-the-two-signatur.patch -40_no_more_ssl3.diff -45_eliminated-double-free.diff -46_Better-fix-for-the-double-free.diff -47_GNUTLS-SA-2015-3.patch -50_Handle-zero-length-plaintext-for-VIA-PadLock-functio.patch -51_0001__gnutls_session_sign_algo_enabled-do-not-consider-an.patch -51_0002_before-falling-back-to-SHA1-as-signature-algorithm-i.patch -51_0003_tests-added-reproducer-for-the-MD5-acceptance-issue.patch -52_CVE-2016-7444_ocsp-corrected-the-comparison-of-the-serial-size-in-.patch -53_nettle-use-rsa_-_key_prepare-on-key-import.patch -55_00_pkcs12-fixed-the-calculation-of-p_size.patch -55_01_gnutls_x509_ext_import_proxy-fix-issue-reading-the-p.patch -55_02_auth-rsa-eliminated-memory-leak-on-pkcs-1-formatting.patch -55_03_opencdk-Fixes-to-prevent-undefined-behavior-found-wi.patch -55_04_Do-not-infinite-loop-if-an-EOF-occurs-while-skipping.patch -55_05_Attempt-to-fix-a-leak-in-OpenPGP-cert-parsing.patch -55_06_Corrected-a-leak-in-OpenPGP-sub-packet-parsing.patch -55_07_opencdk-read_attribute-added-more-precise-checks-whe.patch -55_08_opencdk-cdk_pk_get_keyid-fix-stack-overflow.patch -55_09_opencdk-added-error-checking-in-the-stream-reading-f.patch -55_10_opencdk-improved-error-code-checking-in-the-stream-r.patch -55_11_opencdk-read-packet.c-corrected-typo-in-type-cast.patch -55_12_gnutls_pkcs11_obj_list_import_url2-Always-return-an-.patch -55_13_cdk_pkt_read-enforce-packet-limits.patch 55_14_opencdk-read_attribute-account-buffer-size.patch -55_15_opencdk-do-not-parse-any-secret-keys-in-packet-when-.patch -55_16_Enforce-the-max-packet-length-for-OpenPGP-subpackets.patch -56_CVE-2017-7507_1-ext-status_request-ensure-response-IDs-are-pro.patch -56_CVE-2017-7507_2-ext-status_request-Removed-the-parsing-of-resp.patch -56_CVE-2017-7507_3-gnutls_ocsp_status_request_enable_client-docum.patch -57_urandom-use-st_ino-and-st_rdev-to-determine-device-u.patch diff -Nru gnutls28-3.3.8/debian/upstream/signing-key.asc gnutls28-3.3.30/debian/upstream/signing-key.asc --- gnutls28-3.3.8/debian/upstream/signing-key.asc 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/debian/upstream/signing-key.asc 2018-10-22 14:33:06.000000000 -0400 @@ -0,0 +1,131 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGRBEgd5bQBDCDc8Z7h2Damx3Xm+kMFXMKHqVUdPOqvcFT0c1gnQ9LPw3JiswvB +dM3SBRb2LxtEAnXt0Bw8WBbcCF9s05h8xjCSLDmBwQ1EBEeTvUN18TgeM6t4rNTZ +NrXl5wRmvkAzdO+EOHWx2gDRApLbdkkBK21+M6HPhtqRiMWK6zd5bPmiiAKNRv0G +aC71qUpdNSrWVzB02s8+LUivwH+kUksMX2nXps7b6RPhQyFl6FSv0LsHDd3yxRrB +JIikUAsSnQbDSPws+Srq1VFLhaARiPF2tg7ag1n4qbbZiK3XOSjK3X+b2XkdZrWY +7orBke/J1cMv/9XnqtsE1P1EYcuPk34yxjz/E5+0vf8DlzQ86c2DHRCpr81XV3qD +tNeouQFLDI1kkpG6QTY3S2SPMUht8V8JxhqBzbjWZmKGUf1ISYI2p9FqtXF4rL2D +u1QLPQGLwqYaUvnGCYFxEMpnDcYheF6zOUtow527WgrJcATDXW/HCzidwi2+o/cU +bdCeYOiN28IMCOIBJZjLABEBAAG0KU5pa29zIE1hdnJvZ2lhbm5vcG91bG9zIDxu +bWF2QGdudXRscy5vcmc+iQHDBBMBAgApAhsDBQklmAYABgsJCAcDAgQVAggDBBYC +AwECHgECF4AFAkjOsAcCGQEACgkQKe5YuZaGUXH5IgwbBS80+nEmYoVB/53P8Ewm +3qOIOkn0OQSXHeIsE+lhxxe2nCjl2wou3ydwjenYELk7x7WiNsD2R+x0zLmp+RnH +N5Mfik5X4pTwlE/511H4VSbG32MPp9KUnjqqmGB3zEIhybDPABUBb2ZZzRn6UK+s +Wx0hFdgrFcxQScoKxV2x/AALNSJXsYLbM3Xubfb7Uc+LPLgOQqCt1eDD6wGvYkx3 +kJ+rYbZXE32IiFbwhH++MuApPJv/DnSnhLmQdwuqLn+L1z4jAJ7Lv2tZ9tq9ZGYE +lil0pdzelPvoh1njSGFmG9+2R7tiHD/ZpWxbRPfUZ8aVeX7jUeLfO3KZbNY0lwgO +fMrWWlHq2219Jabvc5nVv2dp3DKQCcz0HAtW2vumjBTN1na8dDSWXzlvLzXs4+Aw +4X0fSP+K6SJlVSscmCDLxWIMC9+yrdxWDafOsRWPgrFIRk2YIdeU7Bah7qAIrqGV +19/NRPHmwuNOwW169Voo74EfnrMBb6THxvOVdd/ToGou9zYYQLQ3Tmlrb3MgTWF2 +cm9naWFubm9wb3Vsb3MgPG4ubWF2cm9naWFubm9wb3Vsb3NAZ21haWwuY29tPokB +wAQTAQIAJgUCSB3m1QIbAwUJJZgGAAYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJ +ECnuWLmWhlFxC+MMHiboc7xtuJFKBhF3tStS5KZE1yhY/dbaZ63K1Kr26BGwWGCX +eWUcQySBZMRfOxBM9lc+rubto1c9ryz+JsP6pkBsVJG8khKun8T5zWAK3gBCb+cP +fYXlEixUqmD0nSkrusKszIuUP4+Ib76MmsbeKe6TgqtzcQeP3Ysml8SdWBolHRqP +C5Uc1339A6uSvFDuOUtySX1laaq5PKb8YKWwfs1w+erBztg7ScbVf+X0cma9LJoc +aLhSfOMLxOqHhq+zUDa5R9ejQ4LAs7rVuqey3WUjICfse2J1U0Eh9BcoN3eNbP5b +DJmTQZGDNEF9FZKGmLKbFWLctZSC1cvQVMQr+kWke8huGmK82rVE9N66U7W474Fv +vxVjO9DHdwhf3qBGipql0j3M7wGUTN72WPWBmxFUGVZWRHnwhme49i06a4igZfc0 +VpMGTisgo95cTMIYL+J4cMcSfb2ZmguTz1WsKr7tY0p1JiOI9wwulFia8FwlLFjp +jGczmt+IFJbmG5Xe5i5lDz20K05pa29zIE1hdnJvZ2lhbm5vcG91bG9zIDxubWF2 +QGh1c2htYWlsLmNvbT6JAcIEEwECACgFAlEr1B4CGwMFCSWYBgAGCwkIBwMCBhUI +AgkKCwQWAgMBAh4BAheAAAoJECnuWLmWhlFxgkgMII6qnB3KwgO4rNQyOf1dE1Ui +s4iJOuDULc9zYiP1lxDHROx7v4F3d5UTmxUL1v1D/1k+ln4rlyoJjHUImCZEzHC1 +Bf7rk0fy74E2gO7ilCTao9jrxn4VQOmigujpyAQfN05mzKxNoz2nJQWruGTndIqR +s+CESgNam5KZ1SOEIeM3JQ+gF5UO9JvRRTxLazXdjZAnAubQ4Hhy84n0Tag5YeYp +1dy6CF7OsSBj/oNrxdLK+vAYR77rX9npis8lpAiFSKasBGWk/Ar7xFBVV1vaZm1N +wXSp+EPH8q6hFWmbTrWvfI1aPJOVT9jGqsljjV8uPKGxzi1s+5IzUATrOp592AfG +C3AGEqVHaHdCngHlbpUsqbXK5OMItMax/yBAdduFPWIXNCIXlCj9350fsu1KCH9s +qn2rd8A0wPlj4AW7w1JFGTS5GcGv/45QEkURle2iOZSm6I8Zm88JaWnBoY4M2T3V +OuwhWSiljRHO3kpJQWnTs62Qv64kShhNESaTmnAa4M6BCFG5AQ0ESB3mLQEIAL/2 +d8i5S1CekbeV2q6ZHpexpYFgI78GNJCO/fU2/6r/m7zZE/288P9J1Db0OXxY+Ibc +puLAezy+jWB4aBZoy2rC5c/wfEwK9dqLUkJJE8ObbAMgkRZO++Vy9MoCw3Fcx8yb +0SBPDn9erkkSNDuRKN3ImAbwVSDH45OHB5UkRCt8Y3bMuov2n4PuSF6oxjcSKd1o +TiQ+A1gUlAMNpLW9zK5141wcoInVLn65Y8lLXlCqC45yX7g83bp7Nbve4+6DptfE +LokoJ8JNYGUkFrkqMlAXPckGh9u+7J5T2fzSt2g6KTx+Se/eb9bnknIELc6S6/y3 +u3KjPuJL99Iause080sAEQEAAYkCyAQYAQIADwUCSB3mLQIbAgUJEswDAAEpCRAp +7li5loZRccBdIAQZAQIABgUCSB3mLgAKCRCdXqr2kBO4QjFICACGZoj7z2x5tkL3 +iYXUa064QWzy2kJsHD9EmE7oAAA+OXNK9jWbVNYeWoJKsI+2Eln4dvhPNx/481sZ +3RidTaSyUUwvgxju1fV+MaL7FTxnbEcXDuNH4Tj7tAzV849UhwZZ9dbBCS9OrviE +fdaFIFuFgoRCZNvNryhFRzCMPqL2ofjgJgNfLtUJg9bLL7XaWfC6vQ0S1JsnlFbp +m6G++sGy7PRwC4eJd03vB2kn2Vhru2BlRboZYkw1wmlNFB99hSyUkp9/KjZgSwP1 +Vj1KVjNxJnT5oULFGb96J75Q3Ea5KQ4n3RSaSDVCVW5dp21W2VtOV2buTzQgO+Jk +BDM6ThODwsQMIIHbBBCs/gCLPrhrh9CSug4tZuy7KZ2xTjP61B51ivMXVZ8+mjpZ +HDjVQWlte0yX/duFH+ZMlneTYtyZA87vuKuvk2cBYS2HSLM3OfIxE185zax0Pmhi +ER2gDrEkXPrQ+C9vm5x4wh9lDXWhjZRpBXk3yzROuDLDUgN2U1ZDtnHr5/PK2c9X +SRBXnPe+4bb+I3cM8UH88+eWH9/tQEzrEAaDvNe3pQpYZqcU7tKGfbpNZQft190S +myK0xIpWPY5C+yZUW33rUM3rcY3d3atOJx/8T/Am99zvz16utkuUt7ePyXalEydc +UDoi2ML6ZrERL706Qmjj3/rRs7+nzhDwoXHNBP/sM/5n5ngvxJYUyAVxWpm/gMv2 +epwtxOq/dD8VFZg72o+OnY/SR7Wm+xJjofT5RVu+PHTH1st/hJJGNHz+GMyXE/+r +p/SouhajKkNmxfPtJHm+mCoW3rqLqLZNpE4wSV3t26noJsTHZWT4N7lBFRYD+TUq +NQ4r8ywEKAQcXJ5BptaJAsgEGAECAA8FAkgd5i4CGwIFCRLMAwABKQkQKe5YuZaG +UXHAXSAEGQECAAYFAkgd5i4ACgkQnV6q9pATuEIxSAgAhmaI+89sebZC94mF1GtO +uEFs8tpCbBw/RJhO6AAAPjlzSvY1m1TWHlqCSrCPthJZ+Hb4Tzcf+PNbGd0YnU2k +slFML4MY7tX1fjGi+xU8Z2xHFw7jR+E4+7QM1fOPVIcGWfXWwQkvTq74hH3WhSBb +hYKEQmTbza8oRUcwjD6i9qH44CYDXy7VCYPWyy+12lnwur0NEtSbJ5RW6ZuhvvrB +suz0cAuHiXdN7wdpJ9lYa7tgZUW6GWJMNcJpTRQffYUslJKffyo2YEsD9VY9SlYz +cSZ0+aFCxRm/eie+UNxGuSkOJ90Umkg1QlVuXadtVtlbTldm7k80IDviZAQzOk4T +g1RPDB9jXo31FlX0DeogAEksPjx2VUk1gQv9vD+x+HVmESsX0tWgh4G2rSkia7d/ +XclmEmHDws3y+T0YnvymQpPPfsl9iRZACTJCXIXSl1f3GOMRn5XkFQQ4BwQ6Tm7O +L+65so1cRrJ9Y1NR4+/OlVrEYwFEIphipzx7MwMwaUinMMKjv3VS5BMkRbbqVUDg +yu5i3pH9U2UjzYNjwn9+HJu6lyrT8a4MjQakYZ+qDpIofnf6uOqAIOWRR2fyuOMg +zF/7UjIIR5N5StpisXwgzfgNAIVTdqWKly/zT38XJqju2cJ1zYnyLIbsHYfE6A47 +rfUep9ja3RMBMRA8hm+N5ny3cUCTFrVNX3S488YbzNRP6X/BRH+8K22oaVdAHoWY +rpnblWZB/OzQnL2R89JwdAG0KnilSRAPEz3UeSus2uGlQJ+TwCshisV3sUS4uyFh +HHvtzgInfOwCCAeLZuc16crGYQD2h0VXsAdjT2RtAj1iVmUBLHPH8F+WPSJmtSaN +lS/Fe9qobJKiuQENBEgd5mkBCADHDPwGFZSRYZncDpMQfdpr9EYnUqLfN8Nixiut +9TdaAIn9GDatlykj08x65r/5LonRxJcbvfHwvvBnRfa4q/5kKAzTtY4AUGVIaNP0 +Dkrq9PBUwD9F3N9ouPStCfg4RoTzUruILQ0rQ2h89sGdpO4Gp4yJqNjj1+SfK6i/ +mLgGG8ibpA/B1bDdMHsDJVxbE6jT2RuaT5FuxrMus4lq4NYSuPhIEUQ1uQsKF/lX +3E9DtyOi9LLkCui2+F35XzX/6/JG4MU40Z7jmPe3aqR3GT2Vxk5HnVN2yI/hn2FP +qoGtnR2FR6k1lrdMKcFG2StcaJW7ukY2Yt0/SHpad5hJP7nJABEBAAGJAakEGAEC +AA8FAkgd5mkCGwwFCRLMAwAACgkQKe5YuZaGUXF4JAwgrepkeOv9HYK+vr0bloTg +J/kWUeXZvhbFX0eMxCFaktaYIglWE5WPqcyf1U3IXa0YxKoFa6t6mYeRzUI7kTTz +QLbiG2KjnLXBqDzMHZP/s9T2UUuq3RSBnf2aedbfAu9HDpts9VHyv1oJnpkOY2Oj +M/1OYOlE3s45pE9wBZWxRVnVBbcE3hb42yr5kBKLEzlaDqhcxj2wpZu+ALmoYOs3 +gmtXout0GVMZlxTWFQldh9FmWXhsd/9EQ9p1bczt1hapalhQSKgwzRpkZtsM/8WE +9nC3aF4iTmU/DzIt/rCFJ7+saAc3KFQMRPWEgpJ/XWx9OZmDes8U3LvfJ/RWzb0J +Nw7at3axQzoaEOS5Hcyon60VuG2SB8AuIq8L3CGOHwnruKnZLPBCrqo8JavRsBI0 +r5RIB9Kg7M2QVc2Zs1R/UNxrZ/07vjzDEV5TmvSOWDVKug+yLclkeDj6Q1wL39vl +vtgGu+KOYsyHHIFLLFg2v5gRlEG+TJvwmy+mLoYj82eDq0dfoLkBDQRaeUDpAQgA +sNl4EliTztpzahvKFW5UGbdFZ0IfumlCCyuIKW6Tl8k5IqCmupVab74CgQarThH6 +I0zLGj+rFWOsl8ioak+VhoTt5HfoTzIveIU5mrLcL+hgSLfmsofNJG/zUNcTDy+o +JPFCEMEbFbzArwYTkJbtK7lC9bc0nCVZPVwWkFLjK2FB0gObZlfVzrHMh07O3OZn +DEmt4DPHuUxy5jttD2XyOQvc5xZFhQZCMuO81dc+wuoDhu37vGuV0pDHEknLNjQd +Y0JHgzNJYDRdaeI8q6jF5XH1067ftyzFuhMoFH2aNe3pm6Ns9IfQo51AYZYvwjYz +BfHnK+BA+wRyQoPcA/jMuQARAQABiQL2BBgBCAAmFiEEH0JBiQXYIGqnVMzcKe5Y +uZaGUXEFAlp5QOkCGwIFCRLMAwABQAkQKe5YuZaGUXHAdCAEGQEIAB0WIQRZ+7Vc +p/OoqwxQN3PYHEiH8WeaZQUCWnlA6QAKCRDYHEiH8WeaZTZrB/4ofixTAgSc3vlT +SDsTu5v9oP3FvHYcJ0KqAr4hS5qxviulTXdCkqL4/KhvsqVXgKLj64nD1y+VRuR5 +soVZ1u7JQTVd9jjERlI1NH4cvpukTq+5G5bF/+7iBPAHSGaTcVndZHXxn69Q7bnl +iz7+rTnkYtuldk5g032W11wnwatCrKC2Z+QYqbhC/sMGVbxSGP1tkWqXoCJ5Mh8B +dit8+4qafd+wHbOOLNLHGYUKBoeRUwR07N8YhH7eJxfVV0sBLDLngtO5T06VjQsV +eUJuLqhtoU/oz5ellCIvzipRzgRNWyUNcuIS5Wi1C6tO+Eatw94+eSbLom5M57Ey +GyJiRo3t2BUMIIW8xNuGy/YTGRFT7l2c71SWHjY50DbNl+JCjyAOitLtEGLtHJJt +xv9AmmlHJ+CLDw0Ctm2j3xgk2KbkeHQKpai8d8Fee4rzsVU9WanUX8hg7yv3IXEd +FpIJaNMKkeedmCrTMPrhz1TthyJSBbLN8tKrLdv5IPOvGQIrJdsaVByZFDuxbNSK +qonVvVYDxA+xM76E+8AuRlBcYtzyblXIwIUa+kkGdhBQGp0hBdAqYKq4iFWRVlqy +44M7Xt8RUk1yu9u2+c+BcitOnlqYOImOp2THhjNGeLi7GDqtwizGNSEz1p76vOUE +rvcwR7DNyVcyuYrD/HVV4Qp16Njy0hnHA67NB23CB7IN5tyJ8GsRHb/wPd/78tJe +deJUJ5LO6FdbvNV2SdFzKYfUVGmWcAPM5sgB02UG6/Hphag092gfOnqeArAWg3pk +6NWysWC6pBZWRNMvExnRf3kHIAn4j3suUohuPhr7nKIEoUtIbB6IorGj9shVi91h +IcYiM9mFvkUJ5cp81a+5AQ0EWnlBCgEIALVO9ZzEdre381rsxAr9JLM1uCrb00t1 +PrYlfrG1uaYCnx1MpRE+kRZsr94WhZccN6hzjdU50LnKx5ZKZkrqQ9oQf9cl+ZzN +Iasc8+bopJyXy7cVvOMZlojsqxQLHDD/w9IZTLnnGtSjpF0jpAg+g9dPimEhG9o9 ++fhQxxzAzh22aIbqFKW2CwV6NsNbQ5i6UmIWWkz+CQ0Me5xJXz7G7EdBtNeGEQ6b +i1AthaxW1fMGLqujL6dSS4QVYMOdqXYSgnboI6CZJqJgvDYSuQJrmOWtHziUP7cM +HQVirePvsnc/vpZ5lNoGml0kMlEsDwwo3nPvxQdXNGSezt3rXlq0Ot0AEQEAAYkB +wAQYAQgAJhYhBB9CQYkF2CBqp1TM3CnuWLmWhlFxBQJaeUEKAhsMBQkSzAMAAAoJ +ECnuWLmWhlFxRecMHix2Ljo9c4jinJwyzWXad5EWbI1pck1I9wrq69HXJiW18O1l +uWWF+fBOHFWCEh/ucceH0V65ES4G4TdHF0R7QRA8jbSJ25KjKhvWghBou6JLYDvR +cY/Aogqt57BBnsFlMIxVsT8OiI5zWsW6kaDTACVbRTlKWXzcACg68eYVE0oi+Pfd +fcmtw0gu6TRDMwFuQ3xHxET+WrxOqmRY2DFQ8VRSHpGaAieKQiKLU3mVnLD9zXiY +8U7ZgO1MWVKtyVFcxgor0kYBakMihKw05uBg6ubkGj2l1kmmHrfEjakyG7C4BW3J +W9XngEbOGb7P1cICe7lOuZw/BQxvYdv/Q6w4cKBXAKFFOu2kWPIQ0xdCQt0ENguD +S1W721k2MYJs+u4fNjhqMO+SDMEdwwMeEx2FwjqXlukICekdhEE8tEzy/0VhsYT3 +tP2D9K7XDhmdmM+iKZ7Ql6IIHyk8Kd+W3EWGQ2clDsYJWHvC6y7KAH2onmxM2h6V +DGm82/j5F/jhskwdrGfOLnE= +=uIvQ +-----END PGP PUBLIC KEY BLOCK----- Les fichiers binaires /tmp/X3NkL29QKs/gnutls28-3.3.8/debian/upstream-signing-key.pgp et /tmp/Dfr1QRQLd6/gnutls28-3.3.30/debian/upstream-signing-key.pgp sont différents diff -Nru gnutls28-3.3.8/doc/abstract-api.texi gnutls28-3.3.30/doc/abstract-api.texi --- gnutls28-3.3.8/doc/abstract-api.texi 2014-08-09 10:37:41.000000000 -0400 +++ gnutls28-3.3.30/doc/abstract-api.texi 2018-02-16 02:11:27.000000000 -0500 @@ -21,10 +21,13 @@ entity certificate (e.g., also an intermediate CA cert) then put the certificate chain in @code{pcert_list} . -Note that the @code{pcert_list} and @code{key} will become part of the credentials +Note that the @code{key} and the elements of @code{pcert_list} will become part of the credentials structure and must not be deallocated. They will be automatically deallocated when the @code{res} structure is deinitialized. +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @strong{Since:} 3.0 @@ -45,7 +48,7 @@ const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_pcert_st** pcert, unsigned int *pcert_length, gnutls_privkey_t * pkey); - @code{req_ca_cert} is only used in X.509 certificates. + @code{req_ca_dn} is only used in X.509 certificates. Contains a list with the CA names that the server considers trusted. Normally we should send a certificate that is signed by one of these CAs. These names are DER encoded. To get a more @@ -54,7 +57,7 @@ @code{pk_algos} contains a list with server's acceptable signature algorithms. The certificate returned should support the server's given algorithms. - @code{pcert} should contain a single certificate and public or a list of them. + @code{pcert} should contain a single certificate and public key or a list of them. @code{pcert_length} is the size of the previous list. @@ -62,6 +65,8 @@ If the callback function is provided then gnutls will call it, in the handshake, after the certificate request message has been received. +All the provided by the callback values will not be released or +modified by gnutls. In server side pk_algos and req_ca_dn are NULL. @@ -1451,7 +1456,7 @@ @var{format}: Indicate the format to use -@var{out}: Newly allocated datum with (0) terminated string. +@var{out}: Newly allocated datum with null terminated string. This function will pretty print public key information, suitable for display to a human. diff -Nru gnutls28-3.3.8/doc/algorithms.texi gnutls28-3.3.30/doc/algorithms.texi --- gnutls28-3.3.8/doc/algorithms.texi 2014-08-09 10:07:01.000000000 -0400 +++ gnutls28-3.3.30/doc/algorithms.texi 2018-02-16 02:11:18.000000000 -0500 @@ -9,7 +9,7 @@ @tab SSL3.0 @item TLS_@-RSA_@-NULL_@-SHA256 @tab 0x00 0x3B -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-ARCFOUR_@-128_@-SHA1 @tab 0x00 0x05 @tab SSL3.0 @@ -27,10 +27,10 @@ @tab SSL3.0 @item TLS_@-RSA_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0x00 0xBA -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-CAMELLIA_@-256_@-CBC_@-SHA256 @tab 0x00 0xC0 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-CAMELLIA_@-128_@-CBC_@-SHA1 @tab 0x00 0x41 @tab SSL3.0 @@ -39,10 +39,10 @@ @tab SSL3.0 @item TLS_@-RSA_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0x3C -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-AES_@-256_@-CBC_@-SHA256 @tab 0x00 0x3D -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-AES_@-128_@-GCM_@-SHA256 @tab 0x00 0x9C @tab TLS1.2 @@ -75,10 +75,10 @@ @tab SSL3.0 @item TLS_@-DHE_@-DSS_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0x00 0xBD -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-DSS_@-CAMELLIA_@-256_@-CBC_@-SHA256 @tab 0x00 0xC3 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-DSS_@-CAMELLIA_@-128_@-CBC_@-SHA1 @tab 0x00 0x44 @tab SSL3.0 @@ -87,10 +87,10 @@ @tab SSL3.0 @item TLS_@-DHE_@-DSS_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0x40 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-DSS_@-AES_@-256_@-CBC_@-SHA256 @tab 0x00 0x6A -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-DSS_@-AES_@-128_@-GCM_@-SHA256 @tab 0x00 0xA2 @tab TLS1.2 @@ -114,10 +114,10 @@ @tab SSL3.0 @item TLS_@-DHE_@-RSA_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0x00 0xBE -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-RSA_@-CAMELLIA_@-256_@-CBC_@-SHA256 @tab 0x00 0xC4 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-RSA_@-CAMELLIA_@-128_@-CBC_@-SHA1 @tab 0x00 0x45 @tab SSL3.0 @@ -126,10 +126,10 @@ @tab SSL3.0 @item TLS_@-DHE_@-RSA_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0x67 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-RSA_@-AES_@-256_@-CBC_@-SHA256 @tab 0x00 0x6B -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-RSA_@-AES_@-128_@-GCM_@-SHA256 @tab 0x00 0x9E @tab TLS1.2 @@ -156,16 +156,16 @@ @tab SSL3.0 @item TLS_@-ECDHE_@-RSA_@-AES_@-256_@-CBC_@-SHA384 @tab 0xC0 0x28 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-RSA_@-ARCFOUR_@-128_@-SHA1 @tab 0xC0 0x11 @tab SSL3.0 @item TLS_@-ECDHE_@-RSA_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x76 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-RSA_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x77 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-ECDSA_@-NULL_@-SHA1 @tab 0xC0 0x06 @tab SSL3.0 @@ -183,16 +183,16 @@ @tab SSL3.0 @item TLS_@-ECDHE_@-ECDSA_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x72 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-ECDSA_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x73 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-ECDSA_@-AES_@-128_@-CBC_@-SHA256 @tab 0xC0 0x23 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-RSA_@-AES_@-128_@-CBC_@-SHA256 @tab 0xC0 0x27 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-ECDSA_@-CAMELLIA_@-128_@-GCM_@-SHA256 @tab 0xC0 0x86 @tab TLS1.2 @@ -213,7 +213,7 @@ @tab TLS1.2 @item TLS_@-ECDHE_@-ECDSA_@-AES_@-256_@-CBC_@-SHA384 @tab 0xC0 0x24 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-RSA_@-CAMELLIA_@-128_@-GCM_@-SHA256 @tab 0xC0 0x8A @tab TLS1.2 @@ -243,10 +243,10 @@ @tab SSL3.0 @item TLS_@-ECDHE_@-PSK_@-AES_@-128_@-CBC_@-SHA256 @tab 0xC0 0x37 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-PSK_@-AES_@-256_@-CBC_@-SHA384 @tab 0xC0 0x38 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-PSK_@-ARCFOUR_@-128_@-SHA1 @tab 0xC0 0x33 @tab SSL3.0 @@ -255,16 +255,16 @@ @tab SSL3.0 @item TLS_@-ECDHE_@-PSK_@-NULL_@-SHA256 @tab 0xC0 0x3A -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-PSK_@-NULL_@-SHA384 @tab 0xC0 0x3B @tab TLS1.0 @item TLS_@-ECDHE_@-PSK_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x9A -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-PSK_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x9B -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-ECDHE_@-PSK_@-SALSA20_@-256_@-SHA1 @tab 0xE4 0x19 @tab SSL3.0 @@ -285,7 +285,7 @@ @tab SSL3.0 @item TLS_@-PSK_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0xAE -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-PSK_@-AES_@-256_@-GCM_@-SHA384 @tab 0x00 0xA9 @tab TLS1.2 @@ -303,13 +303,13 @@ @tab SSL3.0 @item TLS_@-PSK_@-NULL_@-SHA256 @tab 0x00 0xB0 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-PSK_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x94 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-PSK_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x95 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-PSK_@-SALSA20_@-256_@-SHA1 @tab 0xE4 0x17 @tab SSL3.0 @@ -318,10 +318,10 @@ @tab SSL3.0 @item TLS_@-PSK_@-AES_@-256_@-CBC_@-SHA384 @tab 0x00 0xAF -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-PSK_@-NULL_@-SHA384 @tab 0x00 0xB1 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-ARCFOUR_@-128_@-SHA1 @tab 0x00 0x92 @tab TLS1.0 @@ -345,28 +345,28 @@ @tab TLS1.2 @item TLS_@-RSA_@-PSK_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0xB6 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-NULL_@-SHA1 @tab 0x00 0x2E @tab TLS1.0 @item TLS_@-RSA_@-PSK_@-NULL_@-SHA256 @tab 0x00 0xB8 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-AES_@-256_@-GCM_@-SHA384 @tab 0x00 0xAD @tab TLS1.2 @item TLS_@-RSA_@-PSK_@-AES_@-256_@-CBC_@-SHA384 @tab 0x00 0xB7 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-NULL_@-SHA384 @tab 0x00 0xB9 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x98 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-RSA_@-PSK_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x99 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-ARCFOUR_@-128_@-SHA1 @tab 0x00 0x8E @tab SSL3.0 @@ -381,7 +381,7 @@ @tab SSL3.0 @item TLS_@-DHE_@-PSK_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0xB2 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-AES_@-128_@-GCM_@-SHA256 @tab 0x00 0xAA @tab TLS1.2 @@ -390,22 +390,22 @@ @tab SSL3.0 @item TLS_@-DHE_@-PSK_@-NULL_@-SHA256 @tab 0x00 0xB4 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-NULL_@-SHA384 @tab 0x00 0xB5 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-AES_@-256_@-CBC_@-SHA384 @tab 0x00 0xB3 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-AES_@-256_@-GCM_@-SHA384 @tab 0x00 0xAB @tab TLS1.2 @item TLS_@-DHE_@-PSK_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0xC0 0x96 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-CAMELLIA_@-256_@-CBC_@-SHA384 @tab 0xC0 0x97 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DHE_@-PSK_@-CAMELLIA_@-128_@-GCM_@-SHA256 @tab 0xC0 0x90 @tab TLS1.2 @@ -426,10 +426,10 @@ @tab SSL3.0 @item TLS_@-DH_@-ANON_@-CAMELLIA_@-128_@-CBC_@-SHA256 @tab 0x00 0xBF -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DH_@-ANON_@-CAMELLIA_@-256_@-CBC_@-SHA256 @tab 0x00 0xC5 -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DH_@-ANON_@-CAMELLIA_@-128_@-CBC_@-SHA1 @tab 0x00 0x46 @tab SSL3.0 @@ -438,10 +438,10 @@ @tab SSL3.0 @item TLS_@-DH_@-ANON_@-AES_@-128_@-CBC_@-SHA256 @tab 0x00 0x6C -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DH_@-ANON_@-AES_@-256_@-CBC_@-SHA256 @tab 0x00 0x6D -@tab TLS1.0 +@tab TLS1.2 @item TLS_@-DH_@-ANON_@-AES_@-128_@-GCM_@-SHA256 @tab 0x00 0xA6 @tab TLS1.2 @@ -567,6 +567,7 @@ @item RSA-PSK @item DHE-PSK @item ECDHE-PSK +@item RSA-EXPORT @end table @heading Public key algorithms diff -Nru gnutls28-3.3.8/doc/certtool.cfg gnutls28-3.3.30/doc/certtool.cfg --- gnutls28-3.3.8/doc/certtool.cfg 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/certtool.cfg 2017-09-08 15:20:31.000000000 -0400 @@ -48,9 +48,10 @@ # jurisdictionOfIncorporationStateOrProvinceName, # jurisdictionOfIncorporationCountryName, XmppAddr, and numeric OIDs. -#dn = "cn=Nik,st=Attiki,C=GR,surName=Mavrogiannopoulos,2.5.4.9=Arkadias" +#dn = "cn = Nikos,st = New\, Something,C=GR,surName=Mavrogiannopoulos,2.5.4.9=Arkadias" # The serial number of the certificate +# Comment the field for a time-based serial number. serial = 007 # In how many days, counting from today, this certificate will expire. @@ -150,24 +151,41 @@ # ca_issuers_uri = http://my.ca.issuer # Certificate policies -# policy1 = 1.3.6.1.4.1.5484.1.10.99.1.0 -# policy1_txt = "This is a long policy to summarize" -# policy1_url = http://www.example.com/a-policy-to-read - -# policy2 = 1.3.6.1.4.1.5484.1.10.99.1.1 -# policy2_txt = "This is a short policy" -# policy2_url = http://www.example.com/another-policy-to-read +#policy1 = 1.3.6.1.4.1.5484.1.10.99.1.0 +#policy1_txt = "This is a long policy to summarize" +#policy1_url = http://www.example.com/a-policy-to-read + +#policy2 = 1.3.6.1.4.1.5484.1.10.99.1.1 +#policy2_txt = "This is a short policy" +#policy2_url = http://www.example.com/another-policy-to-read + +# Name constraints + +# DNS +#nc_permit_dns = example.com +#nc_exclude_dns = test.example.com + +# EMAIL +#nc_permit_email = "nmav@@ex.net" + +# Exclude subdomains of example.com +#nc_exclude_email = .example.com + +# Exclude all e-mail addresses of example.com +#nc_exclude_email = example.com # Options for proxy certificates -# proxy_policy_language = 1.3.6.1.5.5.7.21.1 +#proxy_policy_language = 1.3.6.1.5.5.7.21.1 # Options for generating a CRL -# next CRL update will be in 43 days (wow) +# The number of days the next CRL update will be due. +# next CRL update will be in 43 days #crl_next_update = 43 # this is the 5th CRL by this CA +# Comment the field for a time-based number. #crl_number = 5 diff -Nru gnutls28-3.3.8/doc/cha-auth.texi gnutls28-3.3.30/doc/cha-auth.texi --- gnutls28-3.3.8/doc/cha-auth.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-auth.texi 2017-09-08 15:20:31.000000000 -0400 @@ -33,7 +33,7 @@ @subsection Two peers with an out-of-band channel -Let's consider two peers need to communicate over an untrusted channel +Let's consider two peers who need to communicate over an untrusted channel (the Internet), but have an out-of-band channel available. The latter channel is considered safe from eavesdropping and message modification and thus can be used for an initial bootstrapping of the protocol. The options @@ -44,7 +44,7 @@ channel and use it to negotiate further sessions over the untrusted channel. @item Passwords (see @ref{SRP authentication}). The client communicates -to the server his username and password of choice and uses it to +to the server its username and password of choice and uses it to negotiate further sessions over the untrusted channel. @item Public keys (see @ref{Certificate authentication}). The client @@ -101,7 +101,7 @@ available options are: @itemize @item Passwords (see @ref{SRP authentication}). The client communicates -to the server his username and password of choice on the initial +to the server its username and password of choice on the initial server-authenticated connection and uses it to negotiate further sessions. This is possible because the SRP protocol allows for the server to be authenticated using a certificate and the client using the diff -Nru gnutls28-3.3.8/doc/cha-cert-auth2.texi gnutls28-3.3.30/doc/cha-cert-auth2.texi --- gnutls28-3.3.8/doc/cha-cert-auth2.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-cert-auth2.texi 2017-09-08 15:20:31.000000000 -0400 @@ -146,14 +146,14 @@ identified @xcite{RIVESTCRL}. The Online Certificate Status Protocol, or @acronym{OCSP} @xcite{RFC2560}, -is a widely implemented protocol to perform certificate revocation status +is a widely implemented protocol which performs certificate revocation status checking. An application that wish to verify the identity of a peer will verify the certificate against a set of trusted certificates and then check whether the certificate is listed in a CRL and/or perform an OCSP check for the certificate. Note that in the context of a TLS session the server may provide an -OCSP response that will used during the TLS certificate verification +OCSP response that will be used during the TLS certificate verification (see @funcref{gnutls_certificate_verify_peers2}). You may obtain this response using @funcref{gnutls_ocsp_status_request_get}. @@ -169,8 +169,8 @@ There are several functions in GnuTLS for creating and manipulating OCSP requests and responses. The general idea is that a client -application create an OCSP request object, store some information -about the certificate to check in the request, and then export the +application creates an OCSP request object, stores some information +about the certificate to check in the request, and then exports the request in DER format. The request will then need to be sent to the OCSP responder, which needs to be done by the application (GnuTLS does not send and receive OCSP packets). Normally an OCSP response is diff -Nru gnutls28-3.3.8/doc/cha-cert-auth.texi gnutls28-3.3.30/doc/cha-cert-auth.texi --- gnutls28-3.3.8/doc/cha-cert-auth.texi 2014-09-16 13:29:17.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-cert-auth.texi 2017-09-08 15:20:31.000000000 -0400 @@ -654,7 +654,7 @@ long as it is difficult enough to generate two different messages with the same hash algorithm output. In that case the same signature could be used as a proof for both messages. Nobody wants to sign an innocent -message of donating 1 euro to Greenpeace and find out that he +message of donating 1 euro to Greenpeace and find out that they donated 1.000.000 euros to Bad Inc. For a hash algorithm to be called cryptographic the following three diff -Nru gnutls28-3.3.8/doc/cha-crypto.texi gnutls28-3.3.30/doc/cha-crypto.texi --- gnutls28-3.3.8/doc/cha-crypto.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-crypto.texi 2017-09-08 15:20:31.000000000 -0400 @@ -5,7 +5,8 @@ it does not provide access to basic cryptographic primitives. However it abstracts the internal cryptographic back-end (see @ref{Cryptographic Backend}), providing symmetric crypto, hash and HMAC algorithms, as well access -to the random number generation. +to the random number generation. For a low-level crypto API the usage of nettle +@footnote{See @uref{http://www.lysator.liu.se/~nisse/nettle/}.} library is recommended. @menu * Symmetric algorithms:: diff -Nru gnutls28-3.3.8/doc/cha-errors.texi gnutls28-3.3.30/doc/cha-errors.texi --- gnutls28-3.3.8/doc/cha-errors.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-errors.texi 2017-09-08 15:20:31.000000000 -0400 @@ -3,7 +3,7 @@ @cindex error codes The error codes used throughout the library are described below. The -return code @code{GNUTLS_E_SUCCESS} indicate successful operation, and +return code @code{GNUTLS_E_SUCCESS} indicates a successful operation, and is guaranteed to have the value 0, so you can use it in logical expressions. diff -Nru gnutls28-3.3.8/doc/cha-gtls-app.texi gnutls28-3.3.30/doc/cha-gtls-app.texi --- gnutls28-3.3.8/doc/cha-gtls-app.texi 2014-09-15 14:40:54.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-gtls-app.texi 2017-09-08 15:20:31.000000000 -0400 @@ -30,6 +30,7 @@ * Common types:: * Debugging and auditing:: * Thread safety:: +* Sessions and fork:: * Callback functions:: @end menu @@ -61,8 +62,8 @@ the credentials structures is initialized once and then can be shared by many @acronym{TLS} sessions. -A @acronym{GnuTLS} session contains all the required information -to handle one secure connection. The session communicates with the +A @acronym{GnuTLS} session contains all the required state and +information to handle one secure connection. The session communicates with the peers using the provided functions of the transport layer. Every session has a unique session ID shared with the peer. @@ -202,6 +203,13 @@ protected with a mutex. Read-only access to objects, for example the credentials holding structures, is also thread-safe. +A @code{gnutls_session_t} object can be shared by two threads, one sending, +the other receiving. In that case rehandshakes, if required, +must only be handled by a single thread being active. The termination of a session +should be handled, either by a single thread being active, or by the sender thread +using @funcref{gnutls_bye} with @code{GNUTLS_SHUT_WR} and the receiving thread +waiting for a return value of zero. + The random generator of the cryptographic back-end, utilizes mutex locks (e.g., pthreads on GNU/Linux and CriticalSection on Windows) which are setup by @acronym{GnuTLS} on library initialization. Prior to version 3.3.0 they were setup by calling @funcref{gnutls_global_init}. On special systems @@ -225,6 +233,17 @@ @showfuncdesc{gnutls_global_set_mutex} +@node Sessions and fork +@subsection Sessions and fork +@cindex fork + +A @code{gnutls_session_t} object can be shared by two processes after a fork, +one sending, the other receiving. In that case rehandshakes, +cannot and must not be performed. As with threads, the termination of a session should be +handled by the sender process using @funcref{gnutls_bye} with @code{GNUTLS_SHUT_WR} +and the receiving process waiting for a return value of zero. + + @node Callback functions @subsection Callback functions @cindex callback functions @@ -271,8 +290,10 @@ @node Initialization @subsection Initialization -GnuTLS must be initialized before it can be used. The library is -initialized on load; prior to 3.3.0 was initialized by calling @funcref{gnutls_global_init}. +The GnuTLS library is initialized on load; prior to 3.3.0 was initialized by calling @funcref{gnutls_global_init}@footnote{ +The original behavior of requiring explicit initialization can obtained by setting the +GNUTLS_NO_EXPLICIT_INIT environment variable to 1, or by using the macro GNUTLS_SKIP_GLOBAL_INIT +in a global section of your program.}. The initialization typically enables CPU-specific acceleration, performs any required precalculations needed, opens any required system devices (e.g., /dev/urandom on Linux) and initializes subsystems that could be used later. @@ -280,6 +301,11 @@ The resources allocated by the initialization process will be released on library deinitialization, or explictly by calling @funcref{gnutls_global_deinit}. +Note that during initialization file descriptors may be kept open by +GnuTLS (e.g. /dev/urandom) on library load. Applications closing all unknown file +descriptors must immediately call @funcref{gnutls_global_init}, after that, to +ensure they don't disrupt GnuTLS' operation. + @c In order to take advantage of the internationalization features in @c GnuTLS, such as translated error messages, the application must set @c the current locale using @code{setlocale} before initializing GnuTLS. @@ -962,7 +988,9 @@ and the certificate verification profile is set to GNUTLS_PROFILE_HIGH (128-bits). @item SECURE256 @tab -Currently alias for SECURE192. +Currently alias for SECURE192. This option, will enable ciphers which use a +256-bit key but, due to limitations of the TLS protocol, the overall security +level will be 192-bits (the security level depends on more factors than cipher key size). @item SUITEB128 @tab Means all the NSA Suite B cryptography (RFC5430) ciphersuites @@ -1220,9 +1248,9 @@ @headitem Security bits @tab RSA, DH and SRP parameter size @tab ECC key size @tab Security parameter @tab Description -@item <72 -@tab <1008 -@tab <160 +@item <64 +@tab <768 +@tab <128 @tab @code{INSECURE} @tab Considered to be insecure @@ -1368,7 +1396,9 @@ A server utilizing tickets should generate ticket encryption and authentication keys using @funcref{gnutls_session_ticket_key_generate}. Those keys should be associated with the GnuTLS session using -@funcref{gnutls_session_ticket_enable_server}. +@funcref{gnutls_session_ticket_enable_server}, and should be rotated regularly +(e.g., every few hours), to prevent them from becoming long-term keys which +if revealed could be used to decrypt all previous sessions. @showfuncdesc{gnutls_session_ticket_enable_server} @showfuncdesc{gnutls_session_ticket_key_generate} diff -Nru gnutls28-3.3.8/doc/cha-internals.texi gnutls28-3.3.30/doc/cha-internals.texi --- gnutls28-3.3.8/doc/cha-internals.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-internals.texi 2017-09-08 15:20:31.000000000 -0400 @@ -321,6 +321,33 @@ forget to add @code{Since:} tags to indicate the GnuTLS version the API was introduced in. +@subsubheading Heartbeat extension. + +One such extension is HeartBeat protocol (RFC6520: +@url{https://tools.ietf.org/html/rfc6520}) implementation. To enable +it use option --heartbeat with example client and server supplied with +gnutls: + +@example +./doc/credentials/gnutls-http-serv --priority "NORMAL:-CIPHER-ALL:+NULL" -d 100 \ + --heartbeat --echo +./src/gnutls-cli --priority "NORMAL:-CIPHER-ALL:+NULL" -d 100 localhost -p 5556 \ + --insecure --heartbeat +@end example + +After that pasting +@example +**HEARTBEAT** +@end example +command into gnutls-cli will trigger corresponding command on the server and it will send HeartBeat Request with random length to client. + +Another way is to run capabilities check with: + +@example +./doc/credentials/gnutls-http-serv -d 100 --heartbeat +./src/gnutls-cli-debug localhost -p 5556 +@end example + @subheading Adding a new Supplemental Data Handshake Message TLS handshake extensions allow to send so called supplemental data @@ -421,32 +448,6 @@ @} gnutls_supplemental_data_format_type_t; @end example -@subsubheading Heartbeat extension. - -One such extension is HeartBeat protocol (RFC6520: -@url{https://tools.ietf.org/html/rfc6520}) implementation. To enable -it use option --heartbeat with example client and server supplied with -gnutls: - -@example -./doc/credentials/gnutls-http-serv --priority "NORMAL:-CIPHER-ALL:+NULL" -d 100 \ - --heartbeat --echo -./src/gnutls-cli --priority "NORMAL:-CIPHER-ALL:+NULL" -d 100 localhost -p 5556 \ - --insecure --heartbeat -@end example - -After that pasting -@example -**HEARTBEAT** -@end example -command into gnutls-cli will trigger corresponding command on the server and it will send HeartBeat Request with random length to client. - -Another way is to run capabilities check with: - -@example -./doc/credentials/gnutls-http-serv -d 100 --heartbeat -./src/gnutls-cli-debug localhost -p 5556 -@end example @node Cryptographic Backend @section Cryptographic Backend diff -Nru gnutls28-3.3.8/doc/cha-intro-tls.texi gnutls28-3.3.30/doc/cha-intro-tls.texi --- gnutls28-3.3.8/doc/cha-intro-tls.texi 2014-08-07 14:50:39.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-intro-tls.texi 2017-09-08 15:20:31.000000000 -0400 @@ -437,6 +437,12 @@ and authenticated with a key only known to the server and then sent to the client. The Session Tickets extension is described in RFC 5077 @xcite{TLSTKT}. +A disadvantage of session tickets is that they eliminate the effects of +forward secrecy when a server uses the same key for long time. That is, +the secrecy of all sessions on a server using tickets depends on the ticket +key being kept secret. For that reason server keys should be rotated and discarded +regularly. + Since version 3.1.3 GnuTLS clients transparently support session tickets. @node HeartBeat diff -Nru gnutls28-3.3.8/doc/cha-support.texi gnutls28-3.3.30/doc/cha-support.texi --- gnutls28-3.3.8/doc/cha-support.texi 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/cha-support.texi 2017-09-08 15:20:31.000000000 -0400 @@ -168,5 +168,5 @@ @end itemize Obtaining such a certification is an expensive and elaborate job that has no immediate value for a continuously developed free software library (as the certification is tied to the -particular version tested), and in the case of algorithm verification of FIPS 140-2 it doesn't make much sense as the library is freely available and anyone can verify the correctness -of algorithm implementation. As such we are not actively pursuing this kind of certification. If you are, nevertheless, interested, see @ref{Commercial Support}. +particular version tested). While, as a free software project, we are not actively pursuing this kind of certification, GnuTLS has been FIPS-140-2 certified in several systems by +third parties. If you are, interested, see @ref{Commercial Support}. diff -Nru gnutls28-3.3.8/doc/core.c.texi gnutls28-3.3.30/doc/core.c.texi --- gnutls28-3.3.8/doc/core.c.texi 2014-08-08 14:51:58.000000000 -0400 +++ gnutls28-3.3.30/doc/core.c.texi 2017-09-08 15:21:21.000000000 -0400 @@ -1,386 +1,356 @@ @c Automatically generated, do not edit. -@c snarfed from ../guile/src/core.c:3345 +@c snarfed from ../guile/src/core.c:3361 @deffn {Scheme Procedure} set-log-level! level Enable GnuTLS logging up to @var{level} (an integer). @end deffn -@c snarfed from ../guile/src/core.c:3327 +@c snarfed from ../guile/src/core.c:3343 @deffn {Scheme Procedure} set-log-procedure! proc Use @var{proc} (a two-argument procedure) as the global GnuTLS log procedure. @end deffn -@c snarfed from ../guile/src/core.c:3288 +@c snarfed from ../guile/src/core.c:3304 @deffn {Scheme Procedure} set-certificate-credentials-openpgp-keys! cred pub sec Use certificate @var{pub} and secret key @var{sec} in certificate credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:3250 +@c snarfed from ../guile/src/core.c:3266 @deffn {Scheme Procedure} openpgp-keyring-contains-key-id? keyring id Return @code{#f} if key ID @var{id} is in @var{keyring}, @code{#f} otherwise. @end deffn -@c snarfed from ../guile/src/core.c:3204 +@c snarfed from ../guile/src/core.c:3220 @deffn {Scheme Procedure} import-openpgp-keyring data format Import @var{data} (a u8vector) according to @var{format} and return the imported keyring. @end deffn -@c snarfed from ../guile/src/core.c:3178 +@c snarfed from ../guile/src/core.c:3194 @deffn {Scheme Procedure} openpgp-certificate-usage key Return a list of values denoting the key usage of @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:3161 +@c snarfed from ../guile/src/core.c:3177 @deffn {Scheme Procedure} openpgp-certificate-version key Return the version of the OpenPGP message format (RFC2440) honored by @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:3140 +@c snarfed from ../guile/src/core.c:3156 @deffn {Scheme Procedure} openpgp-certificate-algorithm key Return two values: the certificate algorithm used by @var{key} and the number of bits used. @end deffn -@c snarfed from ../guile/src/core.c:3104 +@c snarfed from ../guile/src/core.c:3120 @deffn {Scheme Procedure} openpgp-certificate-names key Return the list of names for @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:3081 +@c snarfed from ../guile/src/core.c:3097 @deffn {Scheme Procedure} openpgp-certificate-name key index Return the @var{index}th name of @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:3023 +@c snarfed from ../guile/src/core.c:3039 @deffn {Scheme Procedure} openpgp-certificate-fingerprint key Return a new u8vector denoting the fingerprint of @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:2993 +@c snarfed from ../guile/src/core.c:3009 @deffn {Scheme Procedure} openpgp-certificate-fingerprint! key fpr Store in @var{fpr} (a u8vector) the fingerprint of @var{key}. Return the number of bytes stored in @var{fpr}. @end deffn -@c snarfed from ../guile/src/core.c:2958 +@c snarfed from ../guile/src/core.c:2974 @deffn {Scheme Procedure} openpgp-certificate-id! key id Store the ID (an 8 byte sequence) of certificate @var{key} in @var{id} (a u8vector). @end deffn -@c snarfed from ../guile/src/core.c:2932 +@c snarfed from ../guile/src/core.c:2948 @deffn {Scheme Procedure} openpgp-certificate-id key Return the ID (an 8-element u8vector) of certificate @var{key}. @end deffn -@c snarfed from ../guile/src/core.c:2877 +@c snarfed from ../guile/src/core.c:2893 @deffn {Scheme Procedure} import-openpgp-private-key data format [pass] Return a new OpenPGP private key object resulting from the import of @var{data} (a uniform array) according to @var{format}. Optionally, a passphrase may be provided. @end deffn -@c snarfed from ../guile/src/core.c:2832 +@c snarfed from ../guile/src/core.c:2848 @deffn {Scheme Procedure} import-openpgp-certificate data format Return a new OpenPGP certificate object resulting from the import of @var{data} (a uniform array) according to @var{format}. @end deffn -@c snarfed from ../guile/src/core.c:2768 +@c snarfed from ../guile/src/core.c:2784 @deffn {Scheme Procedure} x509-certificate-subject-alternative-name cert index Return two values: the alternative name type for @var{cert} (i.e., one of the @code{x509-subject-alternative-name/} values) and the actual subject alternative name (a string) at @var{index}. Both values are @code{#f} if no alternative name is available at @var{index}. @end deffn -@c snarfed from ../guile/src/core.c:2733 +@c snarfed from ../guile/src/core.c:2749 @deffn {Scheme Procedure} x509-certificate-subject-key-id cert Return the subject key ID (a u8vector) for @var{cert}. @end deffn -@c snarfed from ../guile/src/core.c:2702 +@c snarfed from ../guile/src/core.c:2718 @deffn {Scheme Procedure} x509-certificate-authority-key-id cert Return the key ID (a u8vector) of the X.509 certificate authority of @var{cert}. @end deffn -@c snarfed from ../guile/src/core.c:2670 +@c snarfed from ../guile/src/core.c:2686 @deffn {Scheme Procedure} x509-certificate-key-id cert Return a statistically unique ID (a u8vector) for @var{cert} that depends on its public key parameters. This is normally a 20-byte SHA-1 hash. @end deffn -@c snarfed from ../guile/src/core.c:2648 +@c snarfed from ../guile/src/core.c:2664 @deffn {Scheme Procedure} x509-certificate-version cert Return the version of @var{cert}. @end deffn -@c snarfed from ../guile/src/core.c:2621 +@c snarfed from ../guile/src/core.c:2637 @deffn {Scheme Procedure} x509-certificate-key-usage cert Return the key usage of @var{cert} (i.e., a list of @code{key-usage/} values), or the empty list if @var{cert} does not contain such information. @end deffn -@c snarfed from ../guile/src/core.c:2598 +@c snarfed from ../guile/src/core.c:2614 @deffn {Scheme Procedure} x509-certificate-public-key-algorithm cert Return two values: the public key algorithm (i.e., one of the @code{pk-algorithm/} values) of @var{cert} and the number of bits used. @end deffn -@c snarfed from ../guile/src/core.c:2575 +@c snarfed from ../guile/src/core.c:2591 @deffn {Scheme Procedure} x509-certificate-signature-algorithm cert Return the signature algorithm used by @var{cert} (i.e., one of the @code{sign-algorithm/} values). @end deffn -@c snarfed from ../guile/src/core.c:2543 +@c snarfed from ../guile/src/core.c:2559 @deffn {Scheme Procedure} x509-certificate-matches-hostname? cert hostname Return true if @var{cert} matches @var{hostname}, a string denoting a DNS host name. This is the basic implementation of @uref{http://tools.ietf.org/html/rfc2818, RFC 2818} (aka. HTTPS). @end deffn -@c snarfed from ../guile/src/core.c:2525 +@c snarfed from ../guile/src/core.c:2541 @deffn {Scheme Procedure} x509-certificate-issuer-dn-oid cert index Return the OID (a string) at @var{index} from @var{cert}'s issuer DN. Return @code{#f} if no OID is available at @var{index}. @end deffn -@c snarfed from ../guile/src/core.c:2511 +@c snarfed from ../guile/src/core.c:2527 @deffn {Scheme Procedure} x509-certificate-dn-oid cert index Return OID (a string) at @var{index} from @var{cert}. Return @code{#f} if no OID is available at @var{index}. @end deffn -@c snarfed from ../guile/src/core.c:2449 +@c snarfed from ../guile/src/core.c:2465 @deffn {Scheme Procedure} x509-certificate-issuer-dn cert Return the distinguished name (DN) of X.509 certificate @var{cert}. @end deffn -@c snarfed from ../guile/src/core.c:2436 +@c snarfed from ../guile/src/core.c:2452 @deffn {Scheme Procedure} x509-certificate-dn cert Return the distinguished name (DN) of X.509 certificate @var{cert}. The form of the DN is as described in @uref{http://tools.ietf.org/html/rfc2253, RFC 2253}. @end deffn -@c snarfed from ../guile/src/core.c:2346 +@c snarfed from ../guile/src/core.c:2362 @deffn {Scheme Procedure} pkcs8-import-x509-private-key data format [pass [encrypted]] Return a new X.509 private key object resulting from the import of @var{data} (a uniform array) according to @var{format}. Optionally, if @var{pass} is not @code{#f}, it should be a string denoting a passphrase. @var{encrypted} tells whether the private key is encrypted (@code{#t} by default). @end deffn -@c snarfed from ../guile/src/core.c:2297 +@c snarfed from ../guile/src/core.c:2313 @deffn {Scheme Procedure} import-x509-private-key data format Return a new X.509 private key object resulting from the import of @var{data} (a uniform array) according to @var{format}. @end deffn -@c snarfed from ../guile/src/core.c:2252 +@c snarfed from ../guile/src/core.c:2268 @deffn {Scheme Procedure} import-x509-certificate data format Return a new X.509 certificate object resulting from the import of @var{data} (a uniform array) according to @var{format}. @end deffn -@c snarfed from ../guile/src/core.c:2224 +@c snarfed from ../guile/src/core.c:2240 @deffn {Scheme Procedure} server-session-psk-username session Return the username associated with PSK server session @var{session}. @end deffn -@c snarfed from ../guile/src/core.c:2180 +@c snarfed from ../guile/src/core.c:2196 @deffn {Scheme Procedure} set-psk-client-credentials! cred username key key-format Set the client credentials for @var{cred}, a PSK client credentials object. @end deffn -@c snarfed from ../guile/src/core.c:2160 +@c snarfed from ../guile/src/core.c:2176 @deffn {Scheme Procedure} make-psk-client-credentials Return a new PSK client credentials object. @end deffn -@c snarfed from ../guile/src/core.c:2132 +@c snarfed from ../guile/src/core.c:2148 @deffn {Scheme Procedure} set-psk-server-credentials-file! cred file Use @var{file} as the password file for PSK server credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:2112 +@c snarfed from ../guile/src/core.c:2128 @deffn {Scheme Procedure} make-psk-server-credentials Return new PSK server credentials. @end deffn -@c snarfed from ../guile/src/core.c:1824 +@c snarfed from ../guile/src/core.c:1840 @deffn {Scheme Procedure} peer-certificate-status session Verify the peer certificate for @var{session} and return a list of @code{certificate-status} values (such as @code{certificate-status/revoked}), or the empty list if the certificate is valid. @end deffn -@c snarfed from ../guile/src/core.c:1796 +@c snarfed from ../guile/src/core.c:1812 @deffn {Scheme Procedure} set-certificate-credentials-verify-flags! cred [flags...] Set the certificate verification flags to @var{flags}, a series of @code{certificate-verify} values. @end deffn -@c snarfed from ../guile/src/core.c:1774 +@c snarfed from ../guile/src/core.c:1790 @deffn {Scheme Procedure} set-certificate-credentials-verify-limits! cred max-bits max-depth Set the verification limits of @code{peer-certificate-status} for certificate credentials @var{cred} to @var{max_bits} bits for an acceptable certificate and @var{max_depth} as the maximum depth of a certificate chain. @end deffn -@c snarfed from ../guile/src/core.c:1732 +@c snarfed from ../guile/src/core.c:1748 @deffn {Scheme Procedure} set-certificate-credentials-x509-keys! cred certs privkey Have certificate credentials @var{cred} use the X.509 certificates listed in @var{certs} and X.509 private key @var{privkey}. @end deffn -@c snarfed from ../guile/src/core.c:1686 +@c snarfed from ../guile/src/core.c:1702 @deffn {Scheme Procedure} set-certificate-credentials-x509-key-data! cred cert key format Use X.509 certificate @var{cert} and private key @var{key}, both uniform arrays containing the X.509 certificate and key in format @var{format}, for certificate credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:1666 +@c snarfed from ../guile/src/core.c:1682 @deffn {Scheme Procedure} set-certificate-credentials-x509-crl-data! cred data format Use @var{data} (a uniform array) as the X.509 CRL (certificate revocation list) database for @var{cred}. On success, return the number of CRLs processed. @end deffn -@c snarfed from ../guile/src/core.c:1647 +@c snarfed from ../guile/src/core.c:1663 @deffn {Scheme Procedure} set-certificate-credentials-x509-trust-data! cred data format Use @var{data} (a uniform array) as the X.509 trust database for @var{cred}. On success, return the number of certificates processed. @end deffn -@c snarfed from ../guile/src/core.c:1628 +@c snarfed from ../guile/src/core.c:1644 @deffn {Scheme Procedure} set-certificate-credentials-x509-crl-file! cred file format Use @var{file} as the X.509 CRL (certificate revocation list) file for certificate credentials @var{cred}. On success, return the number of CRLs processed. @end deffn -@c snarfed from ../guile/src/core.c:1609 +@c snarfed from ../guile/src/core.c:1625 @deffn {Scheme Procedure} set-certificate-credentials-x509-trust-file! cred file format Use @var{file} as the X.509 trust file for certificate credentials @var{cred}. On success, return the number of certificates processed. @end deffn -@c snarfed from ../guile/src/core.c:1567 +@c snarfed from ../guile/src/core.c:1583 @deffn {Scheme Procedure} set-certificate-credentials-x509-key-files! cred cert-file key-file format Use @var{file} as the password file for PSK server credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:1545 +@c snarfed from ../guile/src/core.c:1561 @deffn {Scheme Procedure} set-certificate-credentials-rsa-export-parameters! cred rsa-params Use RSA parameters @var{rsa_params} for certificate credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:1523 +@c snarfed from ../guile/src/core.c:1539 @deffn {Scheme Procedure} set-certificate-credentials-dh-parameters! cred dh-params Use Diffie-Hellman parameters @var{dh_params} for certificate credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:1503 +@c snarfed from ../guile/src/core.c:1519 @deffn {Scheme Procedure} make-certificate-credentials Return new certificate credentials (i.e., for use with either X.509 or OpenPGP certificates. @end deffn -@c snarfed from ../guile/src/core.c:1397 +@c snarfed from ../guile/src/core.c:1413 @deffn {Scheme Procedure} pkcs1-export-rsa-parameters rsa-params format Export Diffie-Hellman parameters @var{rsa_params} in PKCS1 format according for @var{format} (an @code{x509-certificate-format} value). Return a @code{u8vector} containing the result. @end deffn -@c snarfed from ../guile/src/core.c:1352 +@c snarfed from ../guile/src/core.c:1368 @deffn {Scheme Procedure} pkcs1-import-rsa-parameters array format Import Diffie-Hellman parameters in PKCS1 format (further specified by @var{format}, an @code{x509-certificate-format} value) from @var{array} (a homogeneous array) and return a new @code{rsa-params} object. @end deffn -@c snarfed from ../guile/src/core.c:1320 +@c snarfed from ../guile/src/core.c:1336 @deffn {Scheme Procedure} make-rsa-parameters bits Return new RSA parameters. @end deffn -@c snarfed from ../guile/src/core.c:1299 +@c snarfed from ../guile/src/core.c:1315 @deffn {Scheme Procedure} set-anonymous-server-dh-parameters! cred dh-params Set the Diffie-Hellman parameters of anonymous server credentials @var{cred}. @end deffn -@c snarfed from ../guile/src/core.c:1279 +@c snarfed from ../guile/src/core.c:1295 @deffn {Scheme Procedure} make-anonymous-client-credentials Return anonymous client credentials. @end deffn -@c snarfed from ../guile/src/core.c:1261 +@c snarfed from ../guile/src/core.c:1277 @deffn {Scheme Procedure} make-anonymous-server-credentials Return anonymous server credentials. @end deffn -@c snarfed from ../guile/src/core.c:1240 +@c snarfed from ../guile/src/core.c:1256 @deffn {Scheme Procedure} set-session-dh-prime-bits! session bits Use @var{bits} DH prime bits for @var{session}. @end deffn -@c snarfed from ../guile/src/core.c:1218 +@c snarfed from ../guile/src/core.c:1234 @deffn {Scheme Procedure} pkcs3-export-dh-parameters dh-params format Export Diffie-Hellman parameters @var{dh_params} in PKCS3 format according for @var{format} (an @code{x509-certificate-format} value). Return a @code{u8vector} containing the result. @end deffn -@c snarfed from ../guile/src/core.c:1173 +@c snarfed from ../guile/src/core.c:1189 @deffn {Scheme Procedure} pkcs3-import-dh-parameters array format Import Diffie-Hellman parameters in PKCS3 format (further specified by @var{format}, an @code{x509-certificate-format} value) from @var{array} (a homogeneous array) and return a new @code{dh-params} object. @end deffn -@c snarfed from ../guile/src/core.c:1141 +@c snarfed from ../guile/src/core.c:1157 @deffn {Scheme Procedure} make-dh-parameters bits Return new Diffie-Hellman parameters. @end deffn -@c snarfed from ../guile/src/core.c:1060 +@c snarfed from ../guile/src/core.c:1076 @deffn {Scheme Procedure} set-session-transport-port! session port Use @var{port} as the input/output port for @var{session}. @end deffn -@c snarfed from ../guile/src/core.c:1009 +@c snarfed from ../guile/src/core.c:1025 @deffn {Scheme Procedure} set-session-transport-fd! session fd Use file descriptor @var{fd} as the underlying transport for @var{session}. @end deffn -@c snarfed from ../guile/src/core.c:964 +@c snarfed from ../guile/src/core.c:980 @deffn {Scheme Procedure} session-record-port session Return a read-write port that may be used to communicate over @var{session}. All invocations of @code{session-port} on a given session return the same object (in the sense of @code{eq?}). @end deffn -@c snarfed from ../guile/src/core.c:738 +@c snarfed from ../guile/src/core.c:754 @deffn {Scheme Procedure} record-receive! session array Receive data from @var{session} into @var{array}, a uniform homogeneous array. Return the number of bytes actually received. @end deffn -@c snarfed from ../guile/src/core.c:705 +@c snarfed from ../guile/src/core.c:721 @deffn {Scheme Procedure} record-send session array Send the record constituted by @var{array} through @var{session}. @end deffn -@c snarfed from ../guile/src/core.c:621 +@c snarfed from ../guile/src/core.c:690 +@deffn {Scheme Procedure} set-session-server-name! session type name +For a client, this procedure provides a way to inform the server that it is known under @var{name}, @i{via} the @code{SERVER NAME} TLS extension. @var{type} must be a @code{server-name-type} value, @var{server-name-type/dns} for DNS names. +@end deffn + +@c snarfed from ../guile/src/core.c:605 @deffn {Scheme Procedure} set-session-credentials! session cred Use @var{cred} as @var{session}'s credentials. @end deffn -@c snarfed from ../guile/src/core.c:599 +@c snarfed from ../guile/src/core.c:583 @deffn {Scheme Procedure} cipher-suite->string kx cipher mac Return the name of the given cipher suite. @end deffn -@c snarfed from ../guile/src/core.c:560 +@c snarfed from ../guile/src/core.c:544 @deffn {Scheme Procedure} set-session-priorities! session priorities -Have @var{session} use the given @var{priorities} for the ciphers, key exchange methods, MACs and compression methods. @var{priorities} must be a string (see Priority Strings). When @var{priorities} cannot be parsed, an @code{error/invalid-request} error is raised, with an extra argument indication the position of the error. +Have @var{session} use the given @var{priorities} for the ciphers, key exchange methods, MACs and compression methods. @var{priorities} must be a string (@pxref{Priority Strings,,, gnutls, GnuTLS@comma{} Transport Layer Security Library for the GNU system}). When @var{priorities} cannot be parsed, an @code{error/invalid-request} error is raised, with an extra argument indication the position of the error. @end deffn -@c snarfed from ../guile/src/core.c:539 -@deffn {Scheme Procedure} set-session-default-export-priority! session -Have @var{session} use the default export priorities. -@end deffn - -@c snarfed from ../guile/src/core.c:523 +@c snarfed from ../guile/src/core.c:521 @deffn {Scheme Procedure} set-session-default-priority! session Have @var{session} use the default priorities. @end deffn -@c snarfed from ../guile/src/priorities.i.c:110 -@deffn {Scheme Procedure} set-session-certificate-type-priority! session items -Use @var{items} (a list) as the list of preferred certificate-type for @var{session}. -@end deffn - -@c snarfed from ../guile/src/priorities.i.c:89 -@deffn {Scheme Procedure} set-session-protocol-priority! session items -Use @var{items} (a list) as the list of preferred protocol for @var{session}. -@end deffn - -@c snarfed from ../guile/src/priorities.i.c:68 -@deffn {Scheme Procedure} set-session-kx-priority! session items -Use @var{items} (a list) as the list of preferred kx for @var{session}. -@end deffn - -@c snarfed from ../guile/src/priorities.i.c:47 -@deffn {Scheme Procedure} set-session-compression-method-priority! session items -Use @var{items} (a list) as the list of preferred compression-method for @var{session}. -@end deffn - -@c snarfed from ../guile/src/priorities.i.c:26 -@deffn {Scheme Procedure} set-session-mac-priority! session items -Use @var{items} (a list) as the list of preferred mac for @var{session}. -@end deffn - -@c snarfed from ../guile/src/priorities.i.c:5 -@deffn {Scheme Procedure} set-session-cipher-priority! session items -Use @var{items} (a list) as the list of preferred cipher for @var{session}. -@end deffn - @c snarfed from ../guile/src/core.c:500 @deffn {Scheme Procedure} set-server-session-certificate-request! session request Tell how @var{session}, a server-side session, should deal with certificate requests. @var{request} should be either @code{certificate-request/request} or @code{certificate-request/require}. @@ -551,31 +521,36 @@ Return true if @var{obj} is of type @code{session}. @end deffn -@c snarfed from ../guile/src/enum-map.i.c:915 +@c snarfed from ../guile/src/enum-map.i.c:955 @deffn {Scheme Procedure} openpgp-certificate-format->string enumval Return a string describing @var{enumval}, a @code{openpgp-certificate-format} value. @end deffn -@c snarfed from ../guile/src/enum-map.i.c:874 +@c snarfed from ../guile/src/enum-map.i.c:914 @deffn {Scheme Procedure} error->string enumval Return a string describing @var{enumval}, a @code{error} value. @end deffn -@c snarfed from ../guile/src/enum-map.i.c:853 +@c snarfed from ../guile/src/enum-map.i.c:893 @deffn {Scheme Procedure} certificate-verify->string enumval Return a string describing @var{enumval}, a @code{certificate-verify} value. @end deffn -@c snarfed from ../guile/src/enum-map.i.c:808 +@c snarfed from ../guile/src/enum-map.i.c:848 @deffn {Scheme Procedure} key-usage->string enumval Return a string describing @var{enumval}, a @code{key-usage} value. @end deffn -@c snarfed from ../guile/src/enum-map.i.c:760 +@c snarfed from ../guile/src/enum-map.i.c:800 @deffn {Scheme Procedure} psk-key-format->string enumval Return a string describing @var{enumval}, a @code{psk-key-format} value. @end deffn +@c snarfed from ../guile/src/enum-map.i.c:759 +@deffn {Scheme Procedure} server-name-type->string enumval +Return a string describing @var{enumval}, a @code{server-name-type} value. +@end deffn + @c snarfed from ../guile/src/enum-map.i.c:719 @deffn {Scheme Procedure} sign-algorithm->string enumval Return a string describing @var{enumval}, a @code{sign-algorithm} value. diff -Nru gnutls28-3.3.8/doc/credentials/Makefile.in gnutls28-3.3.30/doc/credentials/Makefile.in --- gnutls28-3.3.8/doc/credentials/Makefile.in 2014-09-18 07:12:19.000000000 -0400 +++ gnutls28-3.3.30/doc/credentials/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -34,7 +34,17 @@ # along with this file; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -98,7 +108,6 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc/credentials -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -132,6 +141,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -208,6 +218,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -267,6 +278,7 @@ ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -503,6 +515,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -624,6 +637,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -714,6 +730,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -721,6 +738,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -886,6 +904,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -910,6 +930,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -923,6 +944,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1086,10 +1108,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1121,6 +1145,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1153,9 +1178,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1239,6 +1266,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1267,7 +1295,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/credentials/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/credentials/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1562,6 +1589,8 @@ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnutls28-3.3.8/doc/credentials/openpgp/Makefile.in gnutls28-3.3.30/doc/credentials/openpgp/Makefile.in --- gnutls28-3.3.8/doc/credentials/openpgp/Makefile.in 2014-09-18 07:12:19.000000000 -0400 +++ gnutls28-3.3.30/doc/credentials/openpgp/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,7 +88,6 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc/credentials/openpgp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -112,6 +121,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -188,6 +198,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -212,6 +223,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -423,6 +435,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -544,6 +557,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -634,6 +650,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -641,6 +658,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -806,6 +824,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -830,6 +850,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -843,6 +864,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1006,10 +1028,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1041,6 +1065,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1073,9 +1098,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1159,6 +1186,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1183,7 +1211,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/credentials/openpgp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/credentials/openpgp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1358,6 +1385,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnutls28-3.3.8/doc/credentials/srp/Makefile.in gnutls28-3.3.30/doc/credentials/srp/Makefile.in --- gnutls28-3.3.8/doc/credentials/srp/Makefile.in 2014-09-18 07:12:20.000000000 -0400 +++ gnutls28-3.3.30/doc/credentials/srp/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,7 +88,6 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc/credentials/srp -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -112,6 +121,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -188,6 +198,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -212,6 +223,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -423,6 +435,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -544,6 +557,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -634,6 +650,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -641,6 +658,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -806,6 +824,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -830,6 +850,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -843,6 +864,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1006,10 +1028,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1041,6 +1065,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1073,9 +1098,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1159,6 +1186,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1183,7 +1211,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/credentials/srp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/credentials/srp/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1358,6 +1385,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnutls28-3.3.8/doc/credentials/x509/Makefile.in gnutls28-3.3.30/doc/credentials/x509/Makefile.in --- gnutls28-3.3.8/doc/credentials/x509/Makefile.in 2014-09-18 07:12:20.000000000 -0400 +++ gnutls28-3.3.30/doc/credentials/x509/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,7 +14,17 @@ @SET_MAKE@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -78,7 +88,6 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc/credentials/x509 -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -112,6 +121,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -188,6 +198,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -212,6 +223,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -423,6 +435,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -544,6 +557,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -634,6 +650,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -641,6 +658,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -806,6 +824,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -830,6 +850,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -843,6 +864,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1006,10 +1028,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1041,6 +1065,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1073,9 +1098,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1159,6 +1186,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1185,7 +1213,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/credentials/x509/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/credentials/x509/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1360,6 +1387,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnutls28-3.3.8/doc/crypto-api.texi gnutls28-3.3.30/doc/crypto-api.texi --- gnutls28-3.3.8/doc/crypto-api.texi 2014-08-09 10:37:41.000000000 -0400 +++ gnutls28-3.3.30/doc/crypto-api.texi 2017-03-06 01:54:54.000000000 -0500 @@ -432,7 +432,9 @@ This function will generate random data and store it to output buffer. -@strong{Returns:} Zero or a negative error code on error. +This function is thread-safe and also fork-safe. + +@strong{Returns:} Zero on success, or a negative error code on error. @strong{Since:} 2.12.0 @end deftypefun diff -Nru gnutls28-3.3.8/doc/cyclo/Makefile.in gnutls28-3.3.30/doc/cyclo/Makefile.in --- gnutls28-3.3.8/doc/cyclo/Makefile.in 2014-09-18 07:12:20.000000000 -0400 +++ gnutls28-3.3.30/doc/cyclo/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -34,7 +34,17 @@ # along with this file; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -98,7 +108,6 @@ build_triplet = @build@ host_triplet = @host@ subdir = doc/cyclo -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -132,6 +141,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -208,6 +218,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -232,6 +243,7 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -443,6 +455,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -564,6 +577,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -654,6 +670,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -661,6 +678,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -826,6 +844,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -850,6 +870,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -863,6 +884,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1026,10 +1048,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1061,6 +1085,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1093,9 +1118,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1179,6 +1206,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1204,7 +1232,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/cyclo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/cyclo/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1379,6 +1406,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am +.PRECIOUS: Makefile + cyclo-gnutls.html: (cd ${top_srcdir}/lib && \ diff -Nru gnutls28-3.3.8/doc/dane-api.texi gnutls28-3.3.30/doc/dane-api.texi --- gnutls28-3.3.8/doc/dane-api.texi 2014-08-09 10:37:43.000000000 -0400 +++ gnutls28-3.3.30/doc/dane-api.texi 2018-02-16 02:11:20.000000000 -0500 @@ -253,19 +253,22 @@ is set. If a DNSSEC signature is not available for the DANE record then the verify flag @code{DANE_VERIFY_NO_DNSSEC_DATA} is set. -Note that the CA constraint only applies for the directly certifying CA -and does not account for long CA chains. Moreover this function does not -validate the provided chain. - Due to the many possible options of DANE, there is no single threat model countered. When notifying the user about DANE verification results it may be better to mention: DANE verification did not reject the certificate, rather than mentioning a successful DANE verication. -If the @code{q} parameter is provided it will be used for caching entries. - -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +Note that this function is designed to be run in addition to +PKIX - certificate chain - verification. To be run independently +the @code{DANE_VFLAG_ONLY_CHECK_EE_USAGE} flag should be specified; +then the function will check whether the key of the peer matches the +key advertized in the DANE entry. + +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun @subheading dane_verify_crt_raw @@ -293,18 +296,24 @@ is set. If a DNSSEC signature is not available for the DANE record then the verify flag @code{DANE_VERIFY_NO_DNSSEC_DATA} is set. -Note that the CA constraint only applies for the directly certifying CA -and does not account for long CA chains. - Due to the many possible options of DANE, there is no single threat model countered. When notifying the user about DANE verification results it may be better to mention: DANE verification did not reject the certificate, rather than mentioning a successful DANE verication. +Note that this function is designed to be run in addition to +PKIX - certificate chain - verification. To be run independently +the @code{DANE_VFLAG_ONLY_CHECK_EE_USAGE} flag should be specified; +then the function will check whether the key of the peer matches the +key advertized in the DANE entry. + If the @code{q} parameter is provided it will be used for caching entries. -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun @subheading dane_verify_session_crt @@ -331,10 +340,13 @@ See @code{dane_verify_crt()} for more information. This will not verify the chain for validity; unless the DANE -verification is restricted to end certificates, this has to +verification is restricted to end certificates, this must be be performed separately using @code{gnutls_certificate_verify_peers3()} . -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/dtls-api.texi gnutls28-3.3.30/doc/dtls-api.texi --- gnutls28-3.3.8/doc/dtls-api.texi 2014-08-09 10:37:38.000000000 -0400 +++ gnutls28-3.3.30/doc/dtls-api.texi 2017-03-06 01:54:51.000000000 -0500 @@ -176,9 +176,6 @@ The DTLS protocol recommends the values of 1 sec and 60 seconds respectively. -If the retransmission timeout is zero then the handshake will operate -in a non-blocking way, i.e., return @code{GNUTLS_E_AGAIN} . - To disable retransmissions set a @code{retrans_timeout} larger than the @code{total_timeout} . @strong{Since:} 3.0 diff -Nru gnutls28-3.3.8/doc/enums/gnutls_alert_description_t gnutls28-3.3.30/doc/enums/gnutls_alert_description_t --- gnutls28-3.3.8/doc/enums/gnutls_alert_description_t 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_alert_description_t 2018-02-16 02:11:19.000000000 -0500 @@ -63,5 +63,6 @@ The SRP/PSK username is missing or not known. @item GNUTLS_@-A_@-NO_@-APPLICATION_@-PROTOCOL --- undescribed -- +The ALPN protocol requested is +not supported by the peer. @end table diff -Nru gnutls28-3.3.8/doc/enums/gnutls_cipher_algorithm_t gnutls28-3.3.30/doc/enums/gnutls_cipher_algorithm_t --- gnutls28-3.3.8/doc/enums/gnutls_cipher_algorithm_t 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_cipher_algorithm_t 2018-02-16 02:11:19.000000000 -0500 @@ -33,9 +33,9 @@ @item GNUTLS_@-CIPHER_@-CAMELLIA_@-192_@-CBC Camellia in CBC mode with 192-bit keys. @item GNUTLS_@-CIPHER_@-SALSA20_@-256 --- undescribed -- +Salsa20 with 256-bit keys. @item GNUTLS_@-CIPHER_@-ESTREAM_@-SALSA20_@-256 --- undescribed -- +Estream's Salsa20 variant with 256-bit keys. @item GNUTLS_@-CIPHER_@-CAMELLIA_@-128_@-GCM CAMELLIA in GCM mode with 128-bit keys. @item GNUTLS_@-CIPHER_@-CAMELLIA_@-256_@-GCM diff -Nru gnutls28-3.3.8/doc/enums/gnutls_pkcs11_obj_flags gnutls28-3.3.30/doc/enums/gnutls_pkcs11_obj_flags --- gnutls28-3.3.8/doc/enums/gnutls_pkcs11_obj_flags 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_pkcs11_obj_flags 2018-02-16 02:11:19.000000000 -0500 @@ -35,7 +35,8 @@ @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-ANY When retrieving an object, do not set any requirements. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-TRUSTED --- undescribed -- +When retrieving an object, only retrieve the marked as trusted. +In @code{gnutls_pkcs11_crt_is_known()} it implies @code{GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_COMPARE} if @code{GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY} is not given. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-DISTRUSTED When retrieving an object, only retrieve the marked as distrusted. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-COMPARE @@ -50,4 +51,6 @@ When checking an object's presence, compare the key before returning any result. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-OVERWRITE_@-TRUSTMOD_@-EXT When an issuer is requested, override its extensions with the ones present in the trust module. +@item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-NO_@-STORE_@-PUBKEY +When generating a keypair don't store the public key (store). @end table diff -Nru gnutls28-3.3.8/doc/enums/gnutls_pkcs11_obj_type_t gnutls28-3.3.30/doc/enums/gnutls_pkcs11_obj_type_t --- gnutls28-3.3.8/doc/enums/gnutls_pkcs11_obj_type_t 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_pkcs11_obj_type_t 2018-02-16 02:11:19.000000000 -0500 @@ -15,5 +15,5 @@ @item GNUTLS_@-PKCS11_@-OBJ_@-DATA Data object. @item GNUTLS_@-PKCS11_@-OBJ_@-X509_@-CRT_@-EXTENSION --- undescribed -- +X.509 certificate extension (supported by p11-kit trust module only). @end table diff -Nru gnutls28-3.3.8/doc/enums/gnutls_pkcs_encrypt_flags_t gnutls28-3.3.30/doc/enums/gnutls_pkcs_encrypt_flags_t --- gnutls28-3.3.8/doc/enums/gnutls_pkcs_encrypt_flags_t 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_pkcs_encrypt_flags_t 2018-02-16 02:11:19.000000000 -0500 @@ -4,20 +4,22 @@ @table @code @item GNUTLS_@-PKCS_@-PLAIN Unencrypted private key. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-3DES +@item GNUTLS_@-PKCS_@-PKCS12_@-3DES PKCS-12 3DES. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-ARCFOUR +@item GNUTLS_@-PKCS_@-PKCS12_@-ARCFOUR PKCS-12 ARCFOUR. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-RC2_@-40 +@item GNUTLS_@-PKCS_@-PKCS12_@-RC2_@-40 PKCS-12 RC2-40. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-3DES +@item GNUTLS_@-PKCS_@-PBES2_@-3DES PBES2 3DES. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-128 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-128 PBES2 AES-128. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-192 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-192 PBES2 AES-192. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-256 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-256 PBES2 AES-256. @item GNUTLS_@-PKCS_@-NULL_@-PASSWORD Some schemas distinguish between an empty and a NULL password. +@item GNUTLS_@-PKCS_@-PBES2_@-DES +PBES2 single DES. @end table diff -Nru gnutls28-3.3.8/doc/enums/gnutls_sign_algorithm_t gnutls28-3.3.30/doc/enums/gnutls_sign_algorithm_t --- gnutls28-3.3.8/doc/enums/gnutls_sign_algorithm_t 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums/gnutls_sign_algorithm_t 2018-02-16 02:11:19.000000000 -0500 @@ -41,7 +41,7 @@ @item GNUTLS_@-SIGN_@-ECDSA_@-SHA512 Digital signature algorithm ECDSA with SHA-512. @item GNUTLS_@-SIGN_@-DSA_@-SHA384 --- undescribed -- +Digital signature algorithm DSA with SHA-384 @item GNUTLS_@-SIGN_@-DSA_@-SHA512 --- undescribed -- +Digital signature algorithm DSA with SHA-512 @end table diff -Nru gnutls28-3.3.8/doc/enums.texi gnutls28-3.3.30/doc/enums.texi --- gnutls28-3.3.8/doc/enums.texi 2014-09-18 01:59:07.000000000 -0400 +++ gnutls28-3.3.30/doc/enums.texi 2018-02-16 02:11:19.000000000 -0500 @@ -33,9 +33,9 @@ @item GNUTLS_@-CIPHER_@-CAMELLIA_@-192_@-CBC Camellia in CBC mode with 192-bit keys. @item GNUTLS_@-CIPHER_@-SALSA20_@-256 --- undescribed -- +Salsa20 with 256-bit keys. @item GNUTLS_@-CIPHER_@-ESTREAM_@-SALSA20_@-256 --- undescribed -- +Estream's Salsa20 variant with 256-bit keys. @item GNUTLS_@-CIPHER_@-CAMELLIA_@-128_@-GCM CAMELLIA in GCM mode with 128-bit keys. @item GNUTLS_@-CIPHER_@-CAMELLIA_@-256_@-GCM @@ -257,7 +257,8 @@ The SRP/PSK username is missing or not known. @item GNUTLS_@-A_@-NO_@-APPLICATION_@-PROTOCOL --- undescribed -- +The ALPN protocol requested is +not supported by the peer. @end table @c gnutls_handshake_description_t @@ -478,9 +479,9 @@ @item GNUTLS_@-SIGN_@-ECDSA_@-SHA512 Digital signature algorithm ECDSA with SHA-512. @item GNUTLS_@-SIGN_@-DSA_@-SHA384 --- undescribed -- +Digital signature algorithm DSA with SHA-384 @item GNUTLS_@-SIGN_@-DSA_@-SHA512 --- undescribed -- +Digital signature algorithm DSA with SHA-512 @end table @c gnutls_ecc_curve_t @@ -738,22 +739,24 @@ @table @code @item GNUTLS_@-PKCS_@-PLAIN Unencrypted private key. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-3DES +@item GNUTLS_@-PKCS_@-PKCS12_@-3DES PKCS-12 3DES. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-ARCFOUR +@item GNUTLS_@-PKCS_@-PKCS12_@-ARCFOUR PKCS-12 ARCFOUR. -@item GNUTLS_@-PKCS_@-USE_@-PKCS12_@-RC2_@-40 +@item GNUTLS_@-PKCS_@-PKCS12_@-RC2_@-40 PKCS-12 RC2-40. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-3DES +@item GNUTLS_@-PKCS_@-PBES2_@-3DES PBES2 3DES. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-128 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-128 PBES2 AES-128. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-192 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-192 PBES2 AES-192. -@item GNUTLS_@-PKCS_@-USE_@-PBES2_@-AES_@-256 +@item GNUTLS_@-PKCS_@-PBES2_@-AES_@-256 PBES2 AES-256. @item GNUTLS_@-PKCS_@-NULL_@-PASSWORD Some schemas distinguish between an empty and a NULL password. +@item GNUTLS_@-PKCS_@-PBES2_@-DES +PBES2 single DES. @end table @c gnutls_openpgp_crt_fmt_t @@ -835,7 +838,8 @@ @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-ANY When retrieving an object, do not set any requirements. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-TRUSTED --- undescribed -- +When retrieving an object, only retrieve the marked as trusted. +In @code{gnutls_pkcs11_crt_is_known()} it implies @code{GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_COMPARE} if @code{GNUTLS_PKCS11_OBJ_FLAG_COMPARE_KEY} is not given. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-RETRIEVE_@-DISTRUSTED When retrieving an object, only retrieve the marked as distrusted. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-COMPARE @@ -850,6 +854,8 @@ When checking an object's presence, compare the key before returning any result. @item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-OVERWRITE_@-TRUSTMOD_@-EXT When an issuer is requested, override its extensions with the ones present in the trust module. +@item GNUTLS_@-PKCS11_@-OBJ_@-FLAG_@-NO_@-STORE_@-PUBKEY +When generating a keypair don't store the public key (store). @end table @c gnutls_pkcs11_url_type_t @@ -933,7 +939,7 @@ @item GNUTLS_@-PKCS11_@-OBJ_@-DATA Data object. @item GNUTLS_@-PKCS11_@-OBJ_@-X509_@-CRT_@-EXTENSION --- undescribed -- +X.509 certificate extension (supported by p11-kit trust module only). @end table @c gnutls_pubkey_flags_t diff -Nru gnutls28-3.3.8/doc/error_codes.texi gnutls28-3.3.30/doc/error_codes.texi --- gnutls28-3.3.8/doc/error_codes.texi 2014-08-24 03:24:36.000000000 -0400 +++ gnutls28-3.3.30/doc/error_codes.texi 2018-02-16 02:11:18.000000000 -0500 @@ -3,7 +3,7 @@ @item -3 @tab GNUTLS_@-E_@-UNKNOWN_@-COMPRESSION_@-ALGORITHM @tab Could not negotiate a supported compression method. @item -6 @tab GNUTLS_@-E_@-UNKNOWN_@-CIPHER_@-TYPE @tab The cipher type is unsupported. @item -7 @tab GNUTLS_@-E_@-LARGE_@-PACKET @tab The transmitted packet is too large (EMSGSIZE). -@item -8 @tab GNUTLS_@-E_@-UNSUPPORTED_@-VERSION_@-PACKET @tab A record packet with illegal version was received. +@item -8 @tab GNUTLS_@-E_@-UNSUPPORTED_@-VERSION_@-PACKET @tab A packet with illegal or unsupported version was received. @item -9 @tab GNUTLS_@-E_@-UNEXPECTED_@-PACKET_@-LENGTH @tab A TLS packet with unexpected length was received. @item -10 @tab GNUTLS_@-E_@-INVALID_@-SESSION @tab The specified session has been invalidated for some reason. @item -12 @tab GNUTLS_@-E_@-FATAL_@-ALERT_@-RECEIVED @tab A TLS fatal alert has been received. @@ -83,8 +83,6 @@ @item -99 @tab GNUTLS_@-E_@-INVALID_@-PASSWORD @tab The given password contains invalid characters. @item -100 @tab GNUTLS_@-E_@-MAC_@-VERIFY_@-FAILED @tab The Message Authentication Code verification failed. @item -101 @tab GNUTLS_@-E_@-CONSTRAINT_@-ERROR @tab Some constraint limits were reached. -@item -102 @tab GNUTLS_@-E_@-WARNING_@-IA_@-IPHF_@-RECEIVED @tab Received a TLS/IA Intermediate Phase Finished message -@item -103 @tab GNUTLS_@-E_@-WARNING_@-IA_@-FPHF_@-RECEIVED @tab Received a TLS/IA Final Phase Finished message @item -104 @tab GNUTLS_@-E_@-IA_@-VERIFY_@-FAILED @tab Verifying TLS/IA phase checksum failed @item -105 @tab GNUTLS_@-E_@-UNKNOWN_@-ALGORITHM @tab The specified algorithm or protocol is unknown. @item -106 @tab GNUTLS_@-E_@-UNSUPPORTED_@-SIGNATURE_@-ALGORITHM @tab The signature algorithm is not supported. @@ -144,6 +142,7 @@ @item -332 @tab GNUTLS_@-E_@-TPM_@-SESSION_@-ERROR @tab Cannot initialize a session with the TPM. @item -333 @tab GNUTLS_@-E_@-TPM_@-KEY_@-NOT_@-FOUND @tab TPM key was not found in persistent storage. @item -334 @tab GNUTLS_@-E_@-TPM_@-UNINITIALIZED @tab TPM is not initialized. +@item -335 @tab GNUTLS_@-E_@-TPM_@-NO_@-LIB @tab The TPM library (trousers) cannot be found. @item -340 @tab GNUTLS_@-E_@-NO_@-CERTIFICATE_@-STATUS @tab There is no certificate status (OCSP). @item -341 @tab GNUTLS_@-E_@-OCSP_@-RESPONSE_@-ERROR @tab The OCSP response is invalid @item -342 @tab GNUTLS_@-E_@-RANDOM_@-DEVICE_@-ERROR @tab Error in the system's randomness device. diff -Nru gnutls28-3.3.8/doc/examples/ex-client-dtls.c gnutls28-3.3.30/doc/examples/ex-client-dtls.c --- gnutls28-3.3.8/doc/examples/ex-client-dtls.c 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/examples/ex-client-dtls.c 2017-09-08 15:20:31.000000000 -0400 @@ -75,8 +75,7 @@ /* set the connection MTU */ gnutls_dtls_set_mtu(session, 1000); - gnutls_handshake_set_timeout(session, - GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT); + /* gnutls_dtls_set_timeouts(session, 1000, 60000); */ /* Perform the TLS handshake */ do { diff -Nru gnutls28-3.3.8/doc/examples/ex-serv-dtls.c gnutls28-3.3.30/doc/examples/ex-serv-dtls.c --- gnutls28-3.3.8/doc/examples/ex-serv-dtls.c 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/examples/ex-serv-dtls.c 2017-09-08 15:20:31.000000000 -0400 @@ -28,7 +28,7 @@ */ #define MAX_BUFFER 1024 -#define PORT 5556 +#define PORT 5557 typedef struct { gnutls_session_t session; diff -Nru gnutls28-3.3.8/doc/examples/Makefile.am gnutls28-3.3.30/doc/examples/Makefile.am --- gnutls28-3.3.8/doc/examples/Makefile.am 2014-07-29 16:22:47.000000000 -0400 +++ gnutls28-3.3.30/doc/examples/Makefile.am 2017-09-08 15:20:31.000000000 -0400 @@ -24,9 +24,7 @@ -I$(top_srcdir)/lib/includes -I$(top_builddir)/lib/includes \ -I$(top_srcdir)/extra/includes \ -I$(top_srcdir)/src/gl \ - -I$(top_builddir)/src/gl \ - -I$(top_srcdir)/gl \ - -I$(top_builddir)/gl + -I$(top_builddir)/src/gl # Gnulib warns and suggests use of fseeko instead of fseek, which is # used in ex-cert-select.c, but certificate files will not be > 4 GB, diff -Nru gnutls28-3.3.8/doc/examples/Makefile.in gnutls28-3.3.30/doc/examples/Makefile.in --- gnutls28-3.3.8/doc/examples/Makefile.in 2014-09-18 07:12:20.000000000 -0400 +++ gnutls28-3.3.30/doc/examples/Makefile.in 2018-07-16 01:40:32.000000000 -0400 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2013 Free Software Foundation, Inc. +# Copyright (C) 1994-2017 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -36,7 +36,17 @@ VPATH = @srcdir@ -am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ @@ -114,8 +124,6 @@ @ENABLE_SRP_TRUE@am__append_7 = ex-client-srp ex-serv-srp @ENABLE_OCSP_TRUE@am__append_8 = ex-ocsp-client subdir = doc/examples -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/src/gl/m4/arpa_inet_h.m4 \ $(top_srcdir)/src/gl/m4/bison.m4 \ @@ -149,6 +157,7 @@ $(top_srcdir)/src/gl/m4/tm_gmtoff.m4 \ $(top_srcdir)/src/gl/m4/xalloc.m4 \ $(top_srcdir)/src/libopts/m4/libopts.m4 \ + $(top_srcdir)/src/libopts/m4/stdnoreturn.m4 \ $(top_srcdir)/gl/m4/00gnulib.m4 \ $(top_srcdir)/gl/m4/absolute-header.m4 \ $(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/base64.m4 \ @@ -225,6 +234,7 @@ $(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -461,6 +471,8 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ @@ -672,6 +684,7 @@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RAISE = @GNULIB_RAISE@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ @@ -793,6 +806,9 @@ GNUTLS_REQUIRES_PRIVATE = @GNUTLS_REQUIRES_PRIVATE@ GREP = @GREP@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ GUILE = @GUILE@ @@ -883,6 +899,7 @@ HAVE_LCHOWN = @HAVE_LCHOWN@ HAVE_LIBDL = @HAVE_LIBDL@ HAVE_LIBICONV = @HAVE_LIBICONV@ +HAVE_LIBNSL = @HAVE_LIBNSL@ HAVE_LIBPTHREAD = @HAVE_LIBPTHREAD@ HAVE_LIBRT = @HAVE_LIBRT@ HAVE_LIBZ = @HAVE_LIBZ@ @@ -890,6 +907,7 @@ HAVE_LINKAT = @HAVE_LINKAT@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -1055,6 +1073,8 @@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_LIBS = @LIBIDN_LIBS@ LIBINTL = @LIBINTL@ +LIBNSL = @LIBNSL@ +LIBNSL_PREFIX = @LIBNSL_PREFIX@ LIBOBJS = @LIBOBJS@ LIBOPTS_CFLAGS = @LIBOPTS_CFLAGS@ LIBOPTS_DIR = @LIBOPTS_DIR@ @@ -1079,6 +1099,7 @@ LTLIBDL = @LTLIBDL@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ +LTLIBNSL = @LTLIBNSL@ LTLIBOBJS = @LTLIBOBJS@ LTLIBPTHREAD = @LTLIBPTHREAD@ LTLIBRT = @LTLIBRT@ @@ -1092,6 +1113,7 @@ LT_SSL_AGE = @LT_SSL_AGE@ LT_SSL_CURRENT = @LT_SSL_CURRENT@ LT_SSL_REVISION = @LT_SSL_REVISION@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ @@ -1255,10 +1277,12 @@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RAISE = @REPLACE_RAISE@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMOVE = @REPLACE_REMOVE@ @@ -1290,6 +1314,7 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ @@ -1322,9 +1347,11 @@ STDBOOL_H = @STDBOOL_H@ STDDEF_H = @STDDEF_H@ STDINT_H = @STDINT_H@ +STDNORETURN_H = @STDNORETURN_H@ STRIP = @STRIP@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ +TROUSERS_LIB = @TROUSERS_LIB@ TSS_CFLAGS = @TSS_CFLAGS@ TSS_LIBS = @TSS_LIBS@ UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@ @@ -1408,6 +1435,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1424,8 +1452,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/lib/includes \ -I$(top_builddir)/lib/includes -I$(top_srcdir)/extra/includes \ -I$(top_srcdir)/src/gl -I$(top_builddir)/src/gl \ - -I$(top_srcdir)/gl -I$(top_builddir)/gl -D_GL_NO_LARGE_FILES \ - -DNO_LIBCURL + -D_GL_NO_LARGE_FILES -DNO_LIBCURL AM_LDFLAGS = -no-install LDADD = libexamples.la \ ../../lib/libgnutls.la \ @@ -1459,7 +1486,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/examples/Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -1860,6 +1886,8 @@ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am +.PRECIOUS: Makefile + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gnutls28-3.3.8/doc/functions/dane_verify_crt gnutls28-3.3.30/doc/functions/dane_verify_crt --- gnutls28-3.3.8/doc/functions/dane_verify_crt 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/dane_verify_crt 2018-02-16 02:11:50.000000000 -0500 @@ -29,17 +29,20 @@ is set. If a DNSSEC signature is not available for the DANE record then the verify flag @code{DANE_VERIFY_NO_DNSSEC_DATA} is set. -Note that the CA constraint only applies for the directly certifying CA -and does not account for long CA chains. Moreover this function does not -validate the provided chain. - Due to the many possible options of DANE, there is no single threat model countered. When notifying the user about DANE verification results it may be better to mention: DANE verification did not reject the certificate, rather than mentioning a successful DANE verication. -If the @code{q} parameter is provided it will be used for caching entries. +Note that this function is designed to be run in addition to +PKIX - certificate chain - verification. To be run independently +the @code{DANE_VFLAG_ONLY_CHECK_EE_USAGE} flag should be specified; +then the function will check whether the key of the peer matches the +key advertized in the DANE entry. -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/dane_verify_crt_raw gnutls28-3.3.30/doc/functions/dane_verify_crt_raw --- gnutls28-3.3.8/doc/functions/dane_verify_crt_raw 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/dane_verify_crt_raw 2018-02-16 02:11:50.000000000 -0500 @@ -25,16 +25,22 @@ is set. If a DNSSEC signature is not available for the DANE record then the verify flag @code{DANE_VERIFY_NO_DNSSEC_DATA} is set. -Note that the CA constraint only applies for the directly certifying CA -and does not account for long CA chains. - Due to the many possible options of DANE, there is no single threat model countered. When notifying the user about DANE verification results it may be better to mention: DANE verification did not reject the certificate, rather than mentioning a successful DANE verication. +Note that this function is designed to be run in addition to +PKIX - certificate chain - verification. To be run independently +the @code{DANE_VFLAG_ONLY_CHECK_EE_USAGE} flag should be specified; +then the function will check whether the key of the peer matches the +key advertized in the DANE entry. + If the @code{q} parameter is provided it will be used for caching entries. -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/dane_verify_session_crt gnutls28-3.3.30/doc/functions/dane_verify_session_crt --- gnutls28-3.3.8/doc/functions/dane_verify_session_crt 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/dane_verify_session_crt 2018-02-16 02:11:50.000000000 -0500 @@ -24,9 +24,12 @@ See @code{dane_verify_crt()} for more information. This will not verify the chain for validity; unless the DANE -verification is restricted to end certificates, this has to +verification is restricted to end certificates, this must be be performed separately using @code{gnutls_certificate_verify_peers3()} . -@strong{Returns:} On success, @code{DANE_E_SUCCESS} (0) is returned, otherwise a -negative error value. +@strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0) +when the DANE entries were successfully parsed, irrespective of +whether they were verified (see @code{verify} for that information). If +no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE} +will be returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_alpn_get_selected_protocol gnutls28-3.3.30/doc/functions/gnutls_alpn_get_selected_protocol --- gnutls28-3.3.8/doc/functions/gnutls_alpn_get_selected_protocol 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_alpn_get_selected_protocol 2018-02-16 02:11:50.000000000 -0500 @@ -11,8 +11,11 @@ returned protocol should be treated as opaque, constant value and only valid during the session life. +The selected protocol is the first supported by the list sent +by the client. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. -Since 3.1.11 +Since 3.2.0 @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_alpn_set_protocols gnutls28-3.3.30/doc/functions/gnutls_alpn_set_protocols --- gnutls28-3.3.8/doc/functions/gnutls_alpn_set_protocols 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_alpn_set_protocols 2018-02-16 02:11:50.000000000 -0500 @@ -12,7 +12,7 @@ @var{flags}: zero or @code{GNUTLS_ALPN_} * This function is to be used by both clients and servers, to declare -the supported ALPN protocols, which are used during peer negotiation. +the supported ALPN protocols, which are used during negotiation with peer. If @code{GNUTLS_ALPN_MAND} is specified the connection will be aborted if no matching ALPN protocol is found. @@ -20,5 +20,5 @@ @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. -Since 3.1.11 +Since 3.2.0 @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_get_issuer gnutls28-3.3.30/doc/functions/gnutls_certificate_get_issuer --- gnutls28-3.3.8/doc/functions/gnutls_certificate_get_issuer 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_get_issuer 2018-02-16 02:11:50.000000000 -0500 @@ -9,9 +9,12 @@ @var{issuer}: Will hold the issuer if any. Should be treated as constant. -@var{flags}: Use zero. +@var{flags}: Use zero or @code{GNUTLS_TL_GET_COPY} This function will return the issuer of a given certificate. +As with @code{gnutls_x509_trust_list_get_issuer()} this function requires +the @code{GNUTLS_TL_GET_COPY} flag in order to operate with PKCS @code{11} trust +lists. In that case the issuer must be freed using @code{gnutls_x509_crt_deinit()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_get_peers gnutls28-3.3.30/doc/functions/gnutls_certificate_get_peers --- gnutls28-3.3.8/doc/functions/gnutls_certificate_get_peers 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_get_peers 2018-02-16 02:11:50.000000000 -0500 @@ -16,7 +16,7 @@ In case of OpenPGP keys a single key will be returned in raw format. -@strong{Returns:} a pointer to a @code{gnutls_datum_t} containing our +@strong{Returns:} a pointer to a @code{gnutls_datum_t} containing the peer's certificates, or @code{NULL} in case of an error or if no certificate was used. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_key gnutls28-3.3.30/doc/functions/gnutls_certificate_set_key --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_key 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_key 2018-02-16 02:11:50.000000000 -0500 @@ -21,10 +21,13 @@ entity certificate (e.g., also an intermediate CA cert) then put the certificate chain in @code{pcert_list} . -Note that the @code{pcert_list} and @code{key} will become part of the credentials +Note that the @code{key} and the elements of @code{pcert_list} will become part of the credentials structure and must not be deallocated. They will be automatically deallocated when the @code{res} structure is deinitialized. +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @strong{Since:} 3.0 diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_retrieve_function gnutls28-3.3.30/doc/functions/gnutls_certificate_set_retrieve_function --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_retrieve_function 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_retrieve_function 2018-02-16 02:11:50.000000000 -0500 @@ -16,7 +16,7 @@ int (*callback)(gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs, const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_retr2_st* st); - @code{req_ca_cert} is only used in X.509 certificates. + @code{req_ca_dn} is only used in X.509 certificates. Contains a list with the CA names that the server considers trusted. Normally we should send a certificate that is signed by one of these CAs. These names are DER encoded. To get a more diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_retrieve_function2 gnutls28-3.3.30/doc/functions/gnutls_certificate_set_retrieve_function2 --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_retrieve_function2 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_retrieve_function2 2018-02-16 02:11:50.000000000 -0500 @@ -15,7 +15,7 @@ const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_pcert_st** pcert, unsigned int *pcert_length, gnutls_privkey_t * pkey); - @code{req_ca_cert} is only used in X.509 certificates. + @code{req_ca_dn} is only used in X.509 certificates. Contains a list with the CA names that the server considers trusted. Normally we should send a certificate that is signed by one of these CAs. These names are DER encoded. To get a more @@ -24,7 +24,7 @@ @code{pk_algos} contains a list with server's acceptable signature algorithms. The certificate returned should support the server's given algorithms. - @code{pcert} should contain a single certificate and public or a list of them. + @code{pcert} should contain a single certificate and public key or a list of them. @code{pcert_length} is the size of the previous list. @@ -32,6 +32,8 @@ If the callback function is provided then gnutls will call it, in the handshake, after the certificate request message has been received. +All the provided by the callback values will not be released or +modified by gnutls. In server side pk_algos and req_ca_dn are NULL. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key 2018-02-16 02:11:50.000000000 -0500 @@ -21,6 +21,9 @@ Note that the certificates and keys provided, can be safely deinitialized after this function is called. +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @strong{Since:} 2.4.0 diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key_file gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key_file --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key_file 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key_file 2018-02-16 02:11:50.000000000 -0500 @@ -30,5 +30,8 @@ In case the @code{certfile} is provided as a PKCS @code{11} URL, then the certificate, and its present issuers in the token are are imported (i.e., the required trust chain). +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key_file2 gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key_file2 --- gnutls28-3.3.8/doc/functions/gnutls_certificate_set_x509_key_file2 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_set_x509_key_file2 2018-02-16 02:11:50.000000000 -0500 @@ -34,5 +34,8 @@ In case the @code{certfile} is provided as a PKCS @code{11} URL, then the certificate, and its present issuers in the token are are imported (i.e., the required trust chain). +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers --- gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers 2018-02-16 02:11:50.000000000 -0500 @@ -19,18 +19,19 @@ using @code{gnutls_certificate_set_verify_flags()} . See the documentation of @code{gnutls_certificate_verify_peers2()} for details in the verification process. -The acceptable data types are @code{GNUTLS_DT_DNS_HOSTNAME} and @code{GNUTLS_DT_KEY_PURPOSE_OID} . +The acceptable @code{data} types are @code{GNUTLS_DT_DNS_HOSTNAME} and @code{GNUTLS_DT_KEY_PURPOSE_OID} . +The former accepts as data a null-terminated hostname, and the latter a null-terminated +object identifier (e.g., @code{GNUTLS_KP_TLS_WWW_SERVER} ). If a DNS hostname is provided then this function will compare -the hostname in the certificate against the given. The comparison will -be accurate for ascii names; non-ascii names are compared byte-by-byte. -If names do not match the @code{GNUTLS_CERT_UNEXPECTED_OWNER} status flag will be set. - +the hostname in the certificate against the given. If names do not match the +@code{GNUTLS_CERT_UNEXPECTED_OWNER} status flag will be set. If a key purpose OID is provided and the end-certificate contains the extended key usage PKIX extension, it will be required to be have the provided key purpose -(e.g., @code{GNUTLS_KP_TLS_WWW_SERVER} ), or be marked for any purpose, otherwise -verification will fail with @code{GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE} status. +or be marked for any purpose, otherwise verification will fail with @code{GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE} status. -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @strong{Since:} 3.3.0 @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers2 gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers2 --- gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers2 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers2 2018-02-16 02:11:50.000000000 -0500 @@ -26,5 +26,7 @@ the verified certificate belongs to the actual peer, see @code{gnutls_x509_crt_check_hostname()} , or use @code{gnutls_certificate_verify_peers3()} . -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers3 gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers3 --- gnutls28-3.3.8/doc/functions/gnutls_certificate_verify_peers3 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_certificate_verify_peers3 2018-02-16 02:11:50.000000000 -0500 @@ -25,7 +25,9 @@ In order to verify the purpose of the end-certificate (by checking the extended key usage), use @code{gnutls_certificate_verify_peers()} . -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @strong{Since:} 3.1.4 @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_dh_get_group gnutls28-3.3.30/doc/functions/gnutls_dh_get_group --- gnutls28-3.3.8/doc/functions/gnutls_dh_get_group 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_dh_get_group 2018-02-16 02:11:50.000000000 -0500 @@ -15,6 +15,9 @@ anonymous and ephemeral Diffie-Hellman. The output parameters must be freed with @code{gnutls_free()} . +Note, that the prime and generator are exported as non-negative +integers and may include a leading zero byte. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_dh_get_pubkey gnutls28-3.3.30/doc/functions/gnutls_dh_get_pubkey --- gnutls28-3.3.8/doc/functions/gnutls_dh_get_pubkey 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_dh_get_pubkey 2018-02-16 02:11:50.000000000 -0500 @@ -12,6 +12,9 @@ anonymous and ephemeral Diffie-Hellman. The output parameters must be freed with @code{gnutls_free()} . +Note, that public key is exported as non-negative +integer and may include a leading zero byte. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_dh_set_prime_bits gnutls28-3.3.30/doc/functions/gnutls_dh_set_prime_bits --- gnutls28-3.3.8/doc/functions/gnutls_dh_set_prime_bits 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_dh_set_prime_bits 2018-02-16 02:11:50.000000000 -0500 @@ -16,8 +16,8 @@ a server sends a prime with less bits than that @code{GNUTLS_E_DH_PRIME_UNACCEPTABLE} will be returned by the handshake. -Note that values lower than 512 bits may allow decryption of the -exchanged data. +Note that this function will warn via the audit log for value that +are believed to be weak. The function has no effect in server side. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_dtls_set_timeouts gnutls28-3.3.30/doc/functions/gnutls_dtls_set_timeouts --- gnutls28-3.3.8/doc/functions/gnutls_dtls_set_timeouts 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_dtls_set_timeouts 2018-02-16 02:11:50.000000000 -0500 @@ -18,9 +18,6 @@ The DTLS protocol recommends the values of 1 sec and 60 seconds respectively. -If the retransmission timeout is zero then the handshake will operate -in a non-blocking way, i.e., return @code{GNUTLS_E_AGAIN} . - To disable retransmissions set a @code{retrans_timeout} larger than the @code{total_timeout} . @strong{Since:} 3.0 diff -Nru gnutls28-3.3.8/doc/functions/gnutls_error_is_fatal gnutls28-3.3.30/doc/functions/gnutls_error_is_fatal --- gnutls28-3.3.8/doc/functions/gnutls_error_is_fatal 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_error_is_fatal 2018-02-16 02:11:50.000000000 -0500 @@ -17,6 +17,5 @@ functions that relate to a TLS session (e.g., record layer or handshake layer handling functions). -@strong{Returns:} zero on non fatal errors or positive @code{error} values. Non-zero -on fatal error codes. +@strong{Returns:} Non-zero value on fatal errors or zero on non-fatal. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_handshake gnutls28-3.3.30/doc/functions/gnutls_handshake --- gnutls28-3.3.8/doc/functions/gnutls_handshake 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_handshake 2018-02-16 02:11:50.000000000 -0500 @@ -14,20 +14,25 @@ full handshake will be performed. The non-fatal errors expected by this function are: -@code{GNUTLS_E_INTERRUPTED} , @code{GNUTLS_E_AGAIN} , and @code{GNUTLS_E_WARNING_ALERT_RECEIVED} . +@code{GNUTLS_E_INTERRUPTED} , @code{GNUTLS_E_AGAIN} , +@code{GNUTLS_E_WARNING_ALERT_RECEIVED} , and @code{GNUTLS_E_GOT_APPLICATION_DATA} , +the latter only in a case of rehandshake. + The former two interrupt the handshake procedure due to the lower layer being interrupted, and the latter because of an alert that may be sent by a server (it is always a good idea to check any received alerts). On these errors call this function again, until it returns 0; cf. @code{gnutls_record_get_direction()} and -@code{gnutls_error_is_fatal()} . +@code{gnutls_error_is_fatal()} . In DTLS sessions the non-fatal error +@code{GNUTLS_E_LARGE_PACKET} is also possible, and indicates that +the MTU should be adjusted. If this function is called by a server after a rehandshake request then @code{GNUTLS_E_GOT_APPLICATION_DATA} or @code{GNUTLS_E_WARNING_ALERT_RECEIVED} may be returned. Note that these are non fatal errors, only in the specific case of a rehandshake. Their meaning is that the client rejected the rehandshake request or -in the case of @code{GNUTLS_E_GOT_APPLICATION_DATA} it might also mean that +in the case of @code{GNUTLS_E_GOT_APPLICATION_DATA} it could also mean that some data were pending. @strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, otherwise a negative error code. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_handshake_set_max_packet_length gnutls28-3.3.30/doc/functions/gnutls_handshake_set_max_packet_length --- gnutls28-3.3.8/doc/functions/gnutls_handshake_set_max_packet_length 2014-09-18 01:59:37.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_handshake_set_max_packet_length 2018-02-16 02:11:50.000000000 -0500 @@ -10,9 +10,12 @@ This function will set the maximum size of all handshake messages. Handshakes over this size are rejected with @code{GNUTLS_E_HANDSHAKE_TOO_LARGE} error code. The default value is -48kb which is typically large enough. Set this to 0 if you do not +128kb which is typically large enough. Set this to 0 if you do not want to set an upper limit. The reason for restricting the handshake message sizes are to limit Denial of Service attacks. + +Note that the maximum handshake size was increased to 128kb +from 48kb in GnuTLS 3.3.25. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_ocsp_status_request_enable_client gnutls28-3.3.30/doc/functions/gnutls_ocsp_status_request_enable_client --- gnutls28-3.3.8/doc/functions/gnutls_ocsp_status_request_enable_client 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_ocsp_status_request_enable_client 2018-02-16 02:11:50.000000000 -0500 @@ -13,8 +13,14 @@ This function is to be used by clients to request OCSP response from the server, using the "status_request" TLS extension. Only -OCSP status type is supported. A typical server has a single -OCSP response cached, so @code{responder_id} and @code{extensions} should be null. +OCSP status type is supported. + +The @code{responder_id} array, its containing elements as well as +the data of @code{extensions} , must be allocated using @code{gnutls_malloc()} . They +will be deinitialized on session cleanup. + +Due to the difficult semantics of the @code{responder_id} and @code{extensions} parameters, it is recommended to only call this function with these +parameters set to @code{NULL} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_deinit gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_deinit --- gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_deinit 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_deinit 2018-02-16 02:11:50.000000000 -0500 @@ -3,7 +3,7 @@ @deftypefun {void} {gnutls_openpgp_keyring_deinit} (gnutls_openpgp_keyring_t @var{keyring}) -@var{keyring}: The structure to be initialized +@var{keyring}: A pointer to the type to be initialized This function will deinitialize a keyring structure. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_get_crt gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_get_crt --- gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_get_crt 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_get_crt 2018-02-16 02:11:50.000000000 -0500 @@ -7,7 +7,7 @@ @var{idx}: the index of the certificate to export -@var{cert}: An uninitialized @code{gnutls_openpgp_crt_t} structure +@var{cert}: An uninitialized @code{gnutls_openpgp_crt_t} type This function will extract an OpenPGP certificate from the given keyring. If the index given is out of range diff -Nru gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_init gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_init --- gnutls28-3.3.8/doc/functions/gnutls_openpgp_keyring_init 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_openpgp_keyring_init 2018-02-16 02:11:50.000000000 -0500 @@ -3,7 +3,7 @@ @deftypefun {int} {gnutls_openpgp_keyring_init} (gnutls_openpgp_keyring_t * @var{keyring}) -@var{keyring}: The structure to be initialized +@var{keyring}: A pointer to the type to be initialized This function will initialize an keyring structure. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt 2018-02-16 02:11:50.000000000 -0500 @@ -5,9 +5,9 @@ @deftypefun {int} {gnutls_pkcs11_copy_x509_crt} (const char * @var{token_url}, gnutls_x509_crt_t @var{crt}, const char * @var{label}, unsigned int @var{flags}) @var{token_url}: A PKCS @code{11} URL specifying a token -@var{crt}: A certificate +@var{crt}: The certificate to copy -@var{label}: A name to be used for the stored data +@var{label}: The name to be used for the stored data @var{flags}: One of GNUTLS_PKCS11_OBJ_FLAG_* diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt2 gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt2 --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt2 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt2 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,23 @@ + + + + +@deftypefun {int} {gnutls_pkcs11_copy_x509_crt2} (const char * @var{token_url}, gnutls_x509_crt_t @var{crt}, const char * @var{label}, const gnutls_datum_t * @var{cid}, unsigned int @var{flags}) +@var{token_url}: A PKCS @code{11} URL specifying a token + +@var{crt}: The certificate to copy + +@var{label}: The name to be used for the stored data + +@var{cid}: The CKA_ID to set for the object -if NULL, the ID will be derived from the public key + +@var{flags}: One of GNUTLS_PKCS11_OBJ_FLAG_* + +This function will copy a certificate into a PKCS @code{11} token specified by +a URL. The certificate can be marked as trusted or not. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. + +@strong{Since:} 3.3.26 +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt2.short gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt2.short --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_crt2.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_crt2.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_pkcs11_copy_x509_crt2} (const char * @var{token_url}, gnutls_x509_crt_t @var{crt}, const char * @var{label}, const gnutls_datum_t * @var{cid}, unsigned int @var{flags}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_privkey2 gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_privkey2 --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_privkey2 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_privkey2 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,26 @@ + + + + +@deftypefun {int} {gnutls_pkcs11_copy_x509_privkey2} (const char * @var{token_url}, gnutls_x509_privkey_t @var{key}, const char * @var{label}, const gnutls_datum_t * @var{cid}, unsigned int @var{key_usage}, unsigned int @var{flags}) +@var{token_url}: A PKCS @code{11} URL specifying a token + +@var{key}: A private key + +@var{label}: A name to be used for the stored data + +@var{cid}: The CKA_ID to set for the object -if NULL, the ID will be derived from the public key + +@var{key_usage}: One of GNUTLS_KEY_* + +@var{flags}: One of GNUTLS_PKCS11_OBJ_* flags + +This function will copy a private key into a PKCS @code{11} token specified by +a URL. It is highly recommended flags to contain @code{GNUTLS_PKCS11_OBJ_FLAG_MARK_SENSITIVE} +unless there is a strong reason not to. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. + +@strong{Since:} 3.3.26 +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_privkey2.short gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_privkey2.short --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_copy_x509_privkey2.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_copy_x509_privkey2.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_pkcs11_copy_x509_privkey2} (const char * @var{token_url}, gnutls_x509_privkey_t @var{key}, const char * @var{label}, const gnutls_datum_t * @var{cid}, unsigned int @var{key_usage}, unsigned int @var{flags}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_get_exts gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_get_exts --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_get_exts 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_get_exts 2018-02-16 02:11:50.000000000 -0500 @@ -3,11 +3,11 @@ @deftypefun {int} {gnutls_pkcs11_obj_get_exts} (gnutls_pkcs11_obj_t @var{obj}, gnutls_x509_ext_st ** @var{exts}, unsigned int * @var{exts_size}, unsigned int @var{flags}) -@var{obj}: should contain a @code{gnutls_pkcs11_obj_t} structure +@var{obj}: should contain a @code{gnutls_pkcs11_obj_t} type -@var{exts}: an allocated list of pointers to @code{gnutls_x509_ext_st} +@var{exts}: a pointer to a @code{gnutls_x509_ext_st} pointer -@var{exts_size}: the number of @code{exts} +@var{exts_size}: will be updated with the number of @code{exts} @var{flags}: Or sequence of @code{GNUTLS_PKCS11_OBJ_} * flags @@ -15,6 +15,9 @@ that associate to the provided object (which should be a certificate). The extensions are the attached p11-kit trust module extensions. +Each element of @code{exts} must be deinitialized using @code{gnutls_x509_ext_deinit()} +while @code{exts} should be deallocated using @code{gnutls_free()} . + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success or a negative error code on error. @strong{Since:} 3.3.8 diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_set_info gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_set_info --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_set_info 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_set_info 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,23 @@ + + + + +@deftypefun {int} {gnutls_pkcs11_obj_set_info} (gnutls_pkcs11_obj_t @var{obj}, gnutls_pkcs11_obj_info_t @var{itype}, const void * @var{data}, size_t @var{data_size}, unsigned @var{flags}) +@var{obj}: should contain a @code{gnutls_pkcs11_obj_t} structure + +@var{itype}: Denotes the type of information to be set + +@var{data}: the data to set + +@var{data_size}: the size of data + +@var{flags}: Or sequence of GNUTLS_PKCS11_OBJ_* flags + +This function will set attributes on the provided object. +Available options for @code{itype} are @code{GNUTLS_PKCS11_OBJ_LABEL} , +@code{GNUTLS_PKCS11_OBJ_ID_HEX} , and @code{GNUTLS_PKCS11_OBJ_ID} . + +@strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success or a negative error code on error. + +@strong{Since:} 3.3.26 +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_set_info.short gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_set_info.short --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_obj_set_info.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_obj_set_info.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_pkcs11_obj_set_info} (gnutls_pkcs11_obj_t @var{obj}, gnutls_pkcs11_obj_info_t @var{itype}, const void * @var{data}, size_t @var{data_size}, unsigned @var{flags}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate2 gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate2 --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate2 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate2 2018-02-16 02:11:50.000000000 -0500 @@ -11,7 +11,7 @@ @var{label}: a label -@var{fmt}: the format of output params. PEM or DER. +@var{fmt}: the format of output params. PEM or DER @var{pubkey}: will hold the public key (may be @code{NULL} ) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate3 gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate3 --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate3 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate3 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,36 @@ + + + + +@deftypefun {int} {gnutls_pkcs11_privkey_generate3} (const char * @var{url}, gnutls_pk_algorithm_t @var{pk}, unsigned int @var{bits}, const char * @var{label}, const gnutls_datum_t * @var{cid}, gnutls_x509_crt_fmt_t @var{fmt}, gnutls_datum_t * @var{pubkey}, unsigned int @var{flags}) +@var{url}: a token URL + +@var{pk}: the public key algorithm + +@var{bits}: the security bits + +@var{label}: a label + +@var{cid}: The CKA_ID to use for the new object + +@var{fmt}: the format of output params. PEM or DER + +@var{pubkey}: will hold the public key (may be @code{NULL} ) + +@var{flags}: zero or an OR'ed sequence of @code{GNUTLS_PKCS11_OBJ_FLAGs} + +This function will generate a private key in the specified +by the @code{url} token. The private key will be generate within +the token and will not be exportable. This function will +store the DER-encoded public key in the SubjectPublicKeyInfo format +in @code{pubkey} . The @code{pubkey} should be deinitialized using @code{gnutls_free()} . + +Note that when generating an elliptic curve key, the curve +can be substituted in the place of the bits parameter using the +@code{GNUTLS_CURVE_TO_BITS()} macro. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. + +@strong{Since:} 3.3.26 +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate3.short gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate3.short --- gnutls28-3.3.8/doc/functions/gnutls_pkcs11_privkey_generate3.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs11_privkey_generate3.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_pkcs11_privkey_generate3} (const char * @var{url}, gnutls_pk_algorithm_t @var{pk}, unsigned int @var{bits}, const char * @var{label}, const gnutls_datum_t * @var{cid}, gnutls_x509_crt_fmt_t @var{fmt}, gnutls_datum_t * @var{pubkey}, unsigned int @var{flags}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pkcs12_simple_parse gnutls28-3.3.30/doc/functions/gnutls_pkcs12_simple_parse --- gnutls28-3.3.8/doc/functions/gnutls_pkcs12_simple_parse 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_pkcs12_simple_parse 2018-02-16 02:11:50.000000000 -0500 @@ -3,9 +3,9 @@ @deftypefun {int} {gnutls_pkcs12_simple_parse} (gnutls_pkcs12_t @var{p12}, const char * @var{password}, gnutls_x509_privkey_t * @var{key}, gnutls_x509_crt_t ** @var{chain}, unsigned int * @var{chain_len}, gnutls_x509_crt_t ** @var{extra_certs}, unsigned int * @var{extra_certs_len}, gnutls_x509_crl_t * @var{crl}, unsigned int @var{flags}) -@var{p12}: the PKCS12 blob. +@var{p12}: should contain a gnutls_pkcs12_t structure -@var{password}: optional password used to decrypt PKCS12 blob, bags and keys. +@var{password}: optional password used to decrypt the structure, bags and keys. @var{key}: a structure to store the parsed private key. @@ -14,7 +14,7 @@ @var{chain_len}: will be updated with the number of additional (may be @code{NULL} ) @var{extra_certs}: optional pointer to receive an array of additional -certificates found in the PKCS12 blob (may be @code{NULL} ). +certificates found in the PKCS12 structure (may be @code{NULL} ). @var{extra_certs_len}: will be updated with the number of additional certs (may be @code{NULL} ). @@ -23,7 +23,7 @@ @var{flags}: should be zero or one of GNUTLS_PKCS12_SP_* -This function parses a PKCS12 blob in @code{p12blob} and extracts the +This function parses a PKCS12 structure in @code{pkcs12} and extracts the private key, the corresponding certificate chain, any additional certificates and a CRL. @@ -36,7 +36,7 @@ only with password based security and the same password for all operations. -Note that a PKCS12 file may contain many keys and/or certificates, +Note that a PKCS12 structure may contain many keys and/or certificates, and there is no way to identify which key/certificate pair you want. For this reason this function is useful for PKCS12 files that contain only one key/certificate pair and/or one CRL. @@ -49,6 +49,9 @@ @code{GNUTLS_PKCS12_SP_INCLUDE_SELF_SIGNED} is specified then self signed certificates will be included in the chain. +Prior to using this function the PKCS @code{12} structure integrity must +be verified using @code{gnutls_pkcs12_verify_mac()} . + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_prf gnutls28-3.3.30/doc/functions/gnutls_prf --- gnutls28-3.3.8/doc/functions/gnutls_prf 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_prf 2018-02-16 02:11:50.000000000 -0500 @@ -20,8 +20,10 @@ @var{out}: pre-allocated buffer to hold the generated data. Applies the TLS Pseudo-Random-Function (PRF) on the master secret -and the provided data, seeded with the client and server random fields, -as specified in RFC5705. +and the provided data, seeded with the client and server random fields. + +The output of this function is identical to RFC5705 extractor if @code{extra} and @code{extra_size} are set to zero. Otherwise, @code{extra} should contain the context +value prefixed by a two-byte length. The @code{label} variable usually contains a string denoting the purpose for the generated data. The @code{server_random_first} indicates whether diff -Nru gnutls28-3.3.8/doc/functions/gnutls_priority_init gnutls28-3.3.30/doc/functions/gnutls_priority_init --- gnutls28-3.3.8/doc/functions/gnutls_priority_init 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_priority_init 2018-02-16 02:11:50.000000000 -0500 @@ -5,7 +5,7 @@ @deftypefun {int} {gnutls_priority_init} (gnutls_priority_t * @var{priority_cache}, const char * @var{priorities}, const char ** @var{err_pos}) @var{priority_cache}: is a @code{gnutls_prioritity_t} structure. -@var{priorities}: is a string describing priorities +@var{priorities}: is a string describing priorities (may be @code{NULL} ) @var{err_pos}: In case of an error this will have the position in the string the error occurred @@ -84,6 +84,9 @@ Note that "NORMAL:@code{COMPAT} " is the most compatible mode. +A @code{NULL} @code{priorities} string indicates the default priorities to be +used (this is available since GnuTLS 3.3.0). + @strong{Returns:} On syntax error @code{GNUTLS_E_INVALID_REQUEST} is returned, @code{GNUTLS_E_SUCCESS} on success, or an error code. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_pubkey_print gnutls28-3.3.30/doc/functions/gnutls_pubkey_print --- gnutls28-3.3.8/doc/functions/gnutls_pubkey_print 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_pubkey_print 2018-02-16 02:11:50.000000000 -0500 @@ -7,7 +7,7 @@ @var{format}: Indicate the format to use -@var{out}: Newly allocated datum with (0) terminated string. +@var{out}: Newly allocated datum with null terminated string. This function will pretty print public key information, suitable for display to a human. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_random_art gnutls28-3.3.30/doc/functions/gnutls_random_art --- gnutls28-3.3.8/doc/functions/gnutls_random_art 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_random_art 2018-02-16 02:11:50.000000000 -0500 @@ -3,7 +3,7 @@ @deftypefun {int} {gnutls_random_art} (gnutls_random_art_t @var{type}, const char * @var{key_type}, unsigned int @var{key_size}, void * @var{fpr}, size_t @var{fpr_size}, gnutls_datum_t * @var{art}) -@var{type}: The type of the random art +@var{type}: The type of the random art (for now only @code{GNUTLS_RANDOM_ART_OPENSSH} is supported) @var{key_type}: The type of the key (RSA, DSA etc.) @@ -16,7 +16,7 @@ @var{art}: The returned random art This function will convert a given fingerprint to an "artistic" -image. The returned image is allocated using @code{gnutls_malloc()} +image. The returned image is allocated using @code{gnutls_malloc()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_record_check_corked gnutls28-3.3.30/doc/functions/gnutls_record_check_corked --- gnutls28-3.3.8/doc/functions/gnutls_record_check_corked 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_record_check_corked 2018-02-16 02:11:50.000000000 -0500 @@ -6,7 +6,7 @@ @var{session}: is a @code{gnutls_session_t} structure. This function checks if there pending corked -data in the gnutls buffers --see @code{gnutls_cork()} . +data in the gnutls buffers --see @code{gnutls_record_cork()} . @strong{Returns:} Returns the size of the corked data or zero. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_record_cork gnutls28-3.3.30/doc/functions/gnutls_record_cork --- gnutls28-3.3.8/doc/functions/gnutls_record_cork 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_record_cork 2018-02-16 02:11:50.000000000 -0500 @@ -5,9 +5,8 @@ @deftypefun {void} {gnutls_record_cork} (gnutls_session_t @var{session}) @var{session}: is a @code{gnutls_session_t} structure. -If called @code{gnutls_record_send()} will no longer send partial records. -All queued records will be sent when @code{gnutls_uncork()} is called, or -when the maximum record size is reached. +If called, @code{gnutls_record_send()} will no longer send any records. +Any sent records will be cached until @code{gnutls_record_uncork()} is called. This function is safe to use with DTLS after GnuTLS 3.3.0. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_record_get_direction gnutls28-3.3.30/doc/functions/gnutls_record_get_direction --- gnutls28-3.3.8/doc/functions/gnutls_record_get_direction 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_record_get_direction 2018-02-16 02:11:50.000000000 -0500 @@ -16,5 +16,8 @@ interrupted function was trying to read data, and 1 if it was trying to write data. +This function's output is unreliable if you are using the + @code{session} in different threads, for sending and receiving. + @strong{Returns:} 0 if trying to read data, 1 if trying to write data. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_record_uncork gnutls28-3.3.30/doc/functions/gnutls_record_uncork --- gnutls28-3.3.8/doc/functions/gnutls_record_uncork 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_record_uncork 2018-02-16 02:11:50.000000000 -0500 @@ -7,7 +7,7 @@ @var{flags}: Could be zero or @code{GNUTLS_RECORD_WAIT} -This resets the effect of @code{gnutls_cork()} , and flushes any pending +This resets the effect of @code{gnutls_record_cork()} , and flushes any pending data. If the @code{GNUTLS_RECORD_WAIT} flag is specified then this function will block until the data is sent or a fatal error occurs (i.e., the function will retry on @code{GNUTLS_E_AGAIN} and diff -Nru gnutls28-3.3.8/doc/functions/gnutls_rnd gnutls28-3.3.30/doc/functions/gnutls_rnd --- gnutls28-3.3.8/doc/functions/gnutls_rnd 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_rnd 2018-02-16 02:11:50.000000000 -0500 @@ -12,7 +12,9 @@ This function will generate random data and store it to output buffer. -@strong{Returns:} Zero or a negative error code on error. +This function is thread-safe and also fork-safe. + +@strong{Returns:} Zero on success, or a negative error code on error. @strong{Since:} 2.12.0 @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_session_get_data gnutls28-3.3.30/doc/functions/gnutls_session_get_data --- gnutls28-3.3.8/doc/functions/gnutls_session_get_data 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_session_get_data 2018-02-16 02:11:50.000000000 -0500 @@ -12,7 +12,8 @@ Returns all session parameters needed to be stored to support resumption. The client should call this, and store the returned session data. A session may be resumed later by calling @code{gnutls_session_set_data()} . -This function must be called after a successful handshake. +This function must be called after a successful (full) handshake. It should +not be used in resumed sessions --see @code{gnutls_session_is_resumed()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_session_get_data2 gnutls28-3.3.30/doc/functions/gnutls_session_get_data2 --- gnutls28-3.3.8/doc/functions/gnutls_session_get_data2 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_session_get_data2 2018-02-16 02:11:50.000000000 -0500 @@ -10,7 +10,9 @@ Returns all session parameters needed to be stored to support resumption. The client should call this, and store the returned session data. A session may be resumed later by calling @code{gnutls_session_set_data()} . -This function must be called after a successful handshake. +This function must be called after a successful (full) handshake. It should +not be used in resumed sessions --see @code{gnutls_session_is_resumed()} . + The returned @code{data} are allocated and must be released using @code{gnutls_free()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise diff -Nru gnutls28-3.3.8/doc/functions/gnutls_set_default_priority gnutls28-3.3.30/doc/functions/gnutls_set_default_priority --- gnutls28-3.3.8/doc/functions/gnutls_set_default_priority 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_set_default_priority 2018-02-16 02:11:50.000000000 -0500 @@ -5,17 +5,9 @@ @deftypefun {int} {gnutls_set_default_priority} (gnutls_session_t @var{session}) @var{session}: is a @code{gnutls_session_t} structure. -Sets some default priority on the ciphers, key exchange methods, -macs and compression methods. - -This typically sets a default priority that is considered -sufficiently secure to establish encrypted sessions. - -This function is kept around for backwards compatibility, but -because of its wide use it is still fully supported. If you wish -to allow users to provide a string that specify which ciphers to -use (which is recommended), you should use -@code{gnutls_priority_set_direct()} or @code{gnutls_priority_set()} instead. +Sets the default priority on the ciphers, key exchange methods, +macs and compression methods. For more fine-tuning you could +use @code{gnutls_priority_set_direct()} or @code{gnutls_priority_set()} instead. @strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, or an error code. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_tdb_set_store_commitment_func gnutls28-3.3.30/doc/functions/gnutls_tdb_set_store_commitment_func --- gnutls28-3.3.8/doc/functions/gnutls_tdb_set_store_commitment_func 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_tdb_set_store_commitment_func 2018-02-16 02:11:50.000000000 -0500 @@ -10,7 +10,9 @@ This function will associate a commitment (hash) storage function with the trust storage structure. The function is of the following form. -gnutls_tdb_store_commitment_func(const char* db_name, const char* host, +int gnutls_tdb_store_commitment_func(const char* db_name, const char* host, const char* service, time_t expiration, gnutls_digest_algorithm_t, const gnutls_datum_t* hash); + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_tdb_set_store_func gnutls28-3.3.30/doc/functions/gnutls_tdb_set_store_func --- gnutls28-3.3.8/doc/functions/gnutls_tdb_set_store_func 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_tdb_set_store_func 2018-02-16 02:11:50.000000000 -0500 @@ -10,7 +10,9 @@ This function will associate a storage function with the trust storage structure. The function is of the following form. -gnutls_tdb_store_func(const char* db_name, const char* host, +int gnutls_tdb_store_func(const char* db_name, const char* host, const char* service, time_t expiration, const gnutls_datum_t* pubkey); + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_tdb_set_verify_func gnutls28-3.3.30/doc/functions/gnutls_tdb_set_verify_func --- gnutls28-3.3.8/doc/functions/gnutls_tdb_set_verify_func 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_tdb_set_verify_func 2018-02-16 02:11:50.000000000 -0500 @@ -10,6 +10,11 @@ This function will associate a retrieval function with the trust storage structure. The function is of the following form. -gnutls_tdb_verify_func(const char* db_name, const char* host, +int gnutls_tdb_verify_func(const char* db_name, const char* host, const char* service, const gnutls_datum_t* pubkey); + +The verify function should return zero on a match, @code{GNUTLS_E_CERTIFICATE_KEY_MISMATCH} +if there is a mismatch and any other negative error code otherwise. + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_transport_set_errno gnutls28-3.3.30/doc/functions/gnutls_transport_set_errno --- gnutls28-3.3.8/doc/functions/gnutls_transport_set_errno 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_transport_set_errno 2018-02-16 02:11:50.000000000 -0500 @@ -8,7 +8,7 @@ @var{err}: error value to store in session-specific errno variable. Store @code{err} in the session-specific errno variable. Useful values -for @code{err} is EAGAIN and EINTR, other values are treated will be +for @code{err} are EINTR, EAGAIN and EMSGSIZE, other values are treated will be treated as real errors in the push/pull function. This function is useful in replacement push and pull functions set by diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_check_issuer gnutls28-3.3.30/doc/functions/gnutls_x509_crt_check_issuer --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_check_issuer 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_check_issuer 2018-02-16 02:11:50.000000000 -0500 @@ -11,6 +11,9 @@ given issuer. It checks the DN fields and the authority key identifier and subject key identifier fields match. +If the same certificate is provided at the @code{cert} and @code{issuer} fields, +it will check whether the certificate is self-signed. + @strong{Returns:} It will return true (1) if the given certificate is issued by the given issuer, and false (0) if not. @end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_get_authority_info_access gnutls28-3.3.30/doc/functions/gnutls_x509_crt_get_authority_info_access --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_get_authority_info_access 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_get_authority_info_access 2018-02-16 02:11:50.000000000 -0500 @@ -37,17 +37,20 @@ If @code{what} is @code{GNUTLS_IA_URI} , @code{data} will hold the accessLocation URI data. Requesting this @code{what} value leads to an error if the -accessLocation is not of the "uniformResourceIdentifier" type. +accessLocation is not of the "uniformResourceIdentifier" type. If @code{what} is @code{GNUTLS_IA_OCSP_URI} , @code{data} will hold the OCSP URI. Requesting this @code{what} value leads to an error if the accessMethod is not 1.3.6.1.5.5.7.48.1 aka OSCP, or if accessLocation is not of -the "uniformResourceIdentifier" type. +the "uniformResourceIdentifier" type. In that case @code{GNUTLS_E_UNKNOWN_ALGORITHM} +will be returned, and @code{seq} should be increased and this function +called again. If @code{what} is @code{GNUTLS_IA_CAISSUERS_URI} , @code{data} will hold the caIssuers URI. Requesting this @code{what} value leads to an error if the accessMethod is not 1.3.6.1.5.5.7.48.2 aka caIssuers, or if accessLocation is not of the "uniformResourceIdentifier" type. +In that case handle as in @code{GNUTLS_IA_OCSP_URI} . More @code{what} values may be allocated in the future as needed. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_issuer_unique_id gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_issuer_unique_id --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_issuer_unique_id 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_issuer_unique_id 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,16 @@ + + + + +@deftypefun {int} {gnutls_x509_crt_set_issuer_unique_id} (gnutls_x509_crt_t @var{cert}, const void * @var{id}, size_t @var{id_size}) +@var{cert}: a certificate of type @code{gnutls_x509_crt_t} + +@var{id}: The unique ID + +@var{id_size}: Holds the size of the unique ID. + +This function will set the X.509 certificate's issuer unique ID field. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_issuer_unique_id.short gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_issuer_unique_id.short --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_issuer_unique_id.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_issuer_unique_id.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_x509_crt_set_issuer_unique_id} (gnutls_x509_crt_t @var{cert}, const void * @var{id}, size_t @var{id_size}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_subject_unique_id gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_subject_unique_id --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_subject_unique_id 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_subject_unique_id 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1,16 @@ + + + + +@deftypefun {int} {gnutls_x509_crt_set_subject_unique_id} (gnutls_x509_crt_t @var{cert}, const void * @var{id}, size_t @var{id_size}) +@var{cert}: a certificate of type @code{gnutls_x509_crt_t} + +@var{id}: The unique ID + +@var{id_size}: Holds the size of the unique ID. + +This function will set the X.509 certificate's subject unique ID field. + +@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a +negative error value. +@end deftypefun diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_subject_unique_id.short gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_subject_unique_id.short --- gnutls28-3.3.8/doc/functions/gnutls_x509_crt_set_subject_unique_id.short 1969-12-31 19:00:00.000000000 -0500 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_crt_set_subject_unique_id.short 2018-02-16 02:11:50.000000000 -0500 @@ -0,0 +1 @@ +@item @var{int} @ref{gnutls_x509_crt_set_subject_unique_id} (gnutls_x509_crt_t @var{cert}, const void * @var{id}, size_t @var{id_size}) diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_name_constraints_add_excluded gnutls28-3.3.30/doc/functions/gnutls_x509_name_constraints_add_excluded --- gnutls28-3.3.8/doc/functions/gnutls_x509_name_constraints_add_excluded 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_name_constraints_add_excluded 2018-02-16 02:11:50.000000000 -0500 @@ -10,7 +10,11 @@ @var{name}: The data of the constraints This function will add a name constraint to the list of excluded -constraints. +constraints. The constraints @code{type} can be any of the following types: +@code{GNUTLS_SAN_DNSNAME} , @code{GNUTLS_SAN_RFC822NAME} , @code{GNUTLS_SAN_DN} , +@code{GNUTLS_SAN_URI} , @code{GNUTLS_SAN_IPADDRESS} . For the latter, an IP address +in network byte order is expected, followed by its network mask (which is +4 bytes in IPv4 or 16-bytes in IPv6). @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_name_constraints_add_permitted gnutls28-3.3.30/doc/functions/gnutls_x509_name_constraints_add_permitted --- gnutls28-3.3.8/doc/functions/gnutls_x509_name_constraints_add_permitted 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_name_constraints_add_permitted 2018-02-16 02:11:50.000000000 -0500 @@ -10,7 +10,10 @@ @var{name}: The data of the constraints This function will add a name constraint to the list of permitted -constraints. +constraints. The constraints @code{type} can be any of the following types: +@code{GNUTLS_SAN_DNSNAME} , @code{GNUTLS_SAN_RFC822NAME} , @code{GNUTLS_SAN_DN} , +@code{GNUTLS_SAN_URI} , @code{GNUTLS_SAN_IPADDRESS} . For the latter, an IP address +in network byte order is expected, followed by its network mask. @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_crls gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_crls --- gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_crls 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_crls 2018-02-16 02:11:50.000000000 -0500 @@ -18,7 +18,10 @@ during this structure's lifetime. This function must be called after @code{gnutls_x509_trust_list_add_cas()} -to allow verifying the CRLs for validity. +to allow verifying the CRLs for validity. If the flag @code{GNUTLS_TL_NO_DUPLICATES} +is given, then any provided CRLs that are a duplicate, will be deinitialized +and not added to the list (that assumes that @code{gnutls_x509_trust_list_deinit()} +will be called with all=1). @strong{Returns:} The number of added elements is returned. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_system_trust gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_system_trust --- gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_system_trust 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_system_trust 2018-02-16 02:11:50.000000000 -0500 @@ -10,9 +10,11 @@ @var{tl_vflags}: gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL This function adds the system's default trusted certificate -authorities to the trusted list. Note that on unsupported system +authorities to the trusted list. Note that on unsupported systems this function returns @code{GNUTLS_E_UNIMPLEMENTED_FEATURE} . +This function implies the flag @code{GNUTLS_TL_NO_DUPLICATES} . + @strong{Returns:} The number of added elements or a negative error code on error. @strong{Since:} 3.1 diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_trust_file gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_trust_file --- gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_add_trust_file 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_add_trust_file 2018-02-16 02:11:50.000000000 -0500 @@ -16,8 +16,11 @@ @var{tl_vflags}: gnutls_certificate_verify_flags if flags specifies GNUTLS_TL_VERIFY_CRL This function will add the given certificate authorities -to the trusted list. pkcs11 URLs are also accepted, instead -of files, by this function. +to the trusted list. PKCS @code{11} URLs are also accepted, instead +of files, by this function. A PKCS @code{11} URL implies a trust +database (a specially marked module in p11-kit); the URL "pkcs11:" +implies all trust databases in the system. Only a single URL specifying +trust databases can be set; they cannot be stacked with multiple calls. @strong{Returns:} The number of added elements is returned. diff -Nru gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_get_issuer gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_get_issuer --- gnutls28-3.3.8/doc/functions/gnutls_x509_trust_list_get_issuer 2014-09-18 01:59:38.000000000 -0400 +++ gnutls28-3.3.30/doc/functions/gnutls_x509_trust_list_get_issuer 2018-02-16 02:11:50.000000000 -0500 @@ -9,10 +9,13 @@ @var{issuer}: Will hold the issuer if any. Should be treated as constant. -@var{flags}: Use zero. +@var{flags}: Use zero or @code{GNUTLS_TL_GET_COPY} -This function will attempt to find the issuer of the -given certificate. +This function will find the issuer of the given certificate. +If the flag @code{GNUTLS_TL_GET_COPY} is specified a copy of the issuer +will be returned which must be freed using @code{gnutls_x509_crt_deinit()} . +Note that the flag @code{GNUTLS_TL_GET_COPY} is required for this function +to work with PKCS @code{11} trust lists in a thread-safe way. @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. diff -Nru gnutls28-3.3.8/doc/gnutls-api.texi gnutls28-3.3.30/doc/gnutls-api.texi --- gnutls28-3.3.8/doc/gnutls-api.texi 2014-08-09 10:37:56.000000000 -0400 +++ gnutls28-3.3.30/doc/gnutls-api.texi 2018-02-16 02:11:49.000000000 -0500 @@ -91,10 +91,13 @@ returned protocol should be treated as opaque, constant value and only valid during the session life. +The selected protocol is the first supported by the list sent +by the client. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. -Since 3.1.11 +Since 3.2.0 @end deftypefun @subheading gnutls_alpn_set_protocols @@ -109,7 +112,7 @@ @var{flags}: zero or @code{GNUTLS_ALPN_} * This function is to be used by both clients and servers, to declare -the supported ALPN protocols, which are used during peer negotiation. +the supported ALPN protocols, which are used during negotiation with peer. If @code{GNUTLS_ALPN_MAND} is specified the connection will be aborted if no matching ALPN protocol is found. @@ -117,7 +120,7 @@ @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. -Since 3.1.11 +Since 3.2.0 @end deftypefun @subheading gnutls_anon_allocate_client_credentials @@ -412,9 +415,12 @@ @var{issuer}: Will hold the issuer if any. Should be treated as constant. -@var{flags}: Use zero. +@var{flags}: Use zero or @code{GNUTLS_TL_GET_COPY} This function will return the issuer of a given certificate. +As with @code{gnutls_x509_trust_list_get_issuer()} this function requires +the @code{GNUTLS_TL_GET_COPY} flag in order to operate with PKCS @code{11} trust +lists. In that case the issuer must be freed using @code{gnutls_x509_crt_deinit()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error value. @@ -452,7 +458,7 @@ In case of OpenPGP keys a single key will be returned in raw format. -@strong{Returns:} a pointer to a @code{gnutls_datum_t} containing our +@strong{Returns:} a pointer to a @code{gnutls_datum_t} containing the peer's certificates, or @code{NULL} in case of an error or if no certificate was used. @end deftypefun @@ -618,7 +624,7 @@ int (*callback)(gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs, const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_retr2_st* st); - @code{req_ca_cert} is only used in X.509 certificates. + @code{req_ca_dn} is only used in X.509 certificates. Contains a list with the CA names that the server considers trusted. Normally we should send a certificate that is signed by one of these CAs. These names are DER encoded. To get a more @@ -772,6 +778,9 @@ Note that the certificates and keys provided, can be safely deinitialized after this function is called. +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @strong{Since:} 2.4.0 @@ -807,6 +816,9 @@ In case the @code{certfile} is provided as a PKCS @code{11} URL, then the certificate, and its present issuers in the token are are imported (i.e., the required trust chain). +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @end deftypefun @@ -844,6 +856,9 @@ In case the @code{certfile} is provided as a PKCS @code{11} URL, then the certificate, and its present issuers in the token are are imported (i.e., the required trust chain). +If that function fails to load the @code{res} structure is at an undefined state, it must +not be reused to load other keys or certificates. + @strong{Returns:} @code{GNUTLS_E_SUCCESS} (0) on success, or a negative error code. @end deftypefun @@ -1181,18 +1196,19 @@ using @code{gnutls_certificate_set_verify_flags()} . See the documentation of @code{gnutls_certificate_verify_peers2()} for details in the verification process. -The acceptable data types are @code{GNUTLS_DT_DNS_HOSTNAME} and @code{GNUTLS_DT_KEY_PURPOSE_OID} . +The acceptable @code{data} types are @code{GNUTLS_DT_DNS_HOSTNAME} and @code{GNUTLS_DT_KEY_PURPOSE_OID} . +The former accepts as data a null-terminated hostname, and the latter a null-terminated +object identifier (e.g., @code{GNUTLS_KP_TLS_WWW_SERVER} ). If a DNS hostname is provided then this function will compare -the hostname in the certificate against the given. The comparison will -be accurate for ascii names; non-ascii names are compared byte-by-byte. -If names do not match the @code{GNUTLS_CERT_UNEXPECTED_OWNER} status flag will be set. - +the hostname in the certificate against the given. If names do not match the +@code{GNUTLS_CERT_UNEXPECTED_OWNER} status flag will be set. If a key purpose OID is provided and the end-certificate contains the extended key usage PKIX extension, it will be required to be have the provided key purpose -(e.g., @code{GNUTLS_KP_TLS_WWW_SERVER} ), or be marked for any purpose, otherwise -verification will fail with @code{GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE} status. +or be marked for any purpose, otherwise verification will fail with @code{GNUTLS_CERT_SIGNER_CONSTRAINTS_FAILURE} status. -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @strong{Since:} 3.3.0 @end deftypefun @@ -1223,7 +1239,9 @@ the verified certificate belongs to the actual peer, see @code{gnutls_x509_crt_check_hostname()} , or use @code{gnutls_certificate_verify_peers3()} . -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @end deftypefun @subheading gnutls_certificate_verify_peers3 @@ -1251,7 +1269,9 @@ In order to verify the purpose of the end-certificate (by checking the extended key usage), use @code{gnutls_certificate_verify_peers()} . -@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) on success. +@strong{Returns:} a negative error code on error and @code{GNUTLS_E_SUCCESS} (0) +when the peer's certificate was successfully parsed, irrespective of whether +it was verified. @strong{Since:} 3.1.4 @end deftypefun @@ -1633,6 +1653,9 @@ anonymous and ephemeral Diffie-Hellman. The output parameters must be freed with @code{gnutls_free()} . +Note, that the prime and generator are exported as non-negative +integers and may include a leading zero byte. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @end deftypefun @@ -1677,6 +1700,9 @@ anonymous and ephemeral Diffie-Hellman. The output parameters must be freed with @code{gnutls_free()} . +Note, that public key is exported as non-negative +integer and may include a leading zero byte. + @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @end deftypefun @@ -1866,8 +1892,8 @@ a server sends a prime with less bits than that @code{GNUTLS_E_DH_PRIME_UNACCEPTABLE} will be returned by the handshake. -Note that values lower than 512 bits may allow decryption of the -exchanged data. +Note that this function will warn via the audit log for value that +are believed to be weak. The function has no effect in server side. @@ -1980,8 +2006,7 @@ functions that relate to a TLS session (e.g., record layer or handshake layer handling functions). -@strong{Returns:} zero on non fatal errors or positive @code{error} values. Non-zero -on fatal error codes. +@strong{Returns:} Non-zero value on fatal errors or zero on non-fatal. @end deftypefun @subheading gnutls_error_to_alert @@ -2192,20 +2217,25 @@ full handshake will be performed. The non-fatal errors expected by this function are: -@code{GNUTLS_E_INTERRUPTED} , @code{GNUTLS_E_AGAIN} , and @code{GNUTLS_E_WARNING_ALERT_RECEIVED} . +@code{GNUTLS_E_INTERRUPTED} , @code{GNUTLS_E_AGAIN} , +@code{GNUTLS_E_WARNING_ALERT_RECEIVED} , and @code{GNUTLS_E_GOT_APPLICATION_DATA} , +the latter only in a case of rehandshake. + The former two interrupt the handshake procedure due to the lower layer being interrupted, and the latter because of an alert that may be sent by a server (it is always a good idea to check any received alerts). On these errors call this function again, until it returns 0; cf. @code{gnutls_record_get_direction()} and -@code{gnutls_error_is_fatal()} . +@code{gnutls_error_is_fatal()} . In DTLS sessions the non-fatal error +@code{GNUTLS_E_LARGE_PACKET} is also possible, and indicates that +the MTU should be adjusted. If this function is called by a server after a rehandshake request then @code{GNUTLS_E_GOT_APPLICATION_DATA} or @code{GNUTLS_E_WARNING_ALERT_RECEIVED} may be returned. Note that these are non fatal errors, only in the specific case of a rehandshake. Their meaning is that the client rejected the rehandshake request or -in the case of @code{GNUTLS_E_GOT_APPLICATION_DATA} it might also mean that +in the case of @code{GNUTLS_E_GOT_APPLICATION_DATA} it could also mean that some data were pending. @strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, otherwise a negative error code. @@ -2294,11 +2324,14 @@ This function will set the maximum size of all handshake messages. Handshakes over this size are rejected with @code{GNUTLS_E_HANDSHAKE_TOO_LARGE} error code. The default value is -48kb which is typically large enough. Set this to 0 if you do not +128kb which is typically large enough. Set this to 0 if you do not want to set an upper limit. The reason for restricting the handshake message sizes are to limit Denial of Service attacks. + +Note that the maximum handshake size was increased to 128kb +from 48kb in GnuTLS 3.3.25. @end deftypefun @subheading gnutls_handshake_set_post_client_hello_function @@ -2725,8 +2758,14 @@ This function is to be used by clients to request OCSP response from the server, using the "status_request" TLS extension. Only -OCSP status type is supported. A typical server has a single -OCSP response cached, so @code{responder_id} and @code{extensions} should be null. +OCSP status type is supported. + +The @code{responder_id} array, its containing elements as well as +the data of @code{extensions} , must be allocated using @code{gnutls_malloc()} . They +will be deinitialized on session cleanup. + +Due to the difficult semantics of the @code{responder_id} and @code{extensions} parameters, it is recommended to only call this function with these +parameters set to @code{NULL} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a negative error code is returned. @@ -3003,8 +3042,10 @@ @var{out}: pre-allocated buffer to hold the generated data. Applies the TLS Pseudo-Random-Function (PRF) on the master secret -and the provided data, seeded with the client and server random fields, -as specified in RFC5705. +and the provided data, seeded with the client and server random fields. + +The output of this function is identical to RFC5705 extractor if @code{extra} and @code{extra_size} are set to zero. Otherwise, @code{extra} should contain the context +value prefixed by a two-byte length. The @code{label} variable usually contains a string denoting the purpose for the generated data. The @code{server_random_first} indicates whether @@ -3152,7 +3193,7 @@ @deftypefun {int} {gnutls_priority_init} (gnutls_priority_t * @var{priority_cache}, const char * @var{priorities}, const char ** @var{err_pos}) @var{priority_cache}: is a @code{gnutls_prioritity_t} structure. -@var{priorities}: is a string describing priorities +@var{priorities}: is a string describing priorities (may be @code{NULL} ) @var{err_pos}: In case of an error this will have the position in the string the error occurred @@ -3231,6 +3272,9 @@ Note that "NORMAL:@code{COMPAT} " is the most compatible mode. +A @code{NULL} @code{priorities} string indicates the default priorities to be +used (this is available since GnuTLS 3.3.0). + @strong{Returns:} On syntax error @code{GNUTLS_E_INVALID_REQUEST} is returned, @code{GNUTLS_E_SUCCESS} on success, or an error code. @end deftypefun @@ -3580,7 +3624,7 @@ @subheading gnutls_random_art @anchor{gnutls_random_art} @deftypefun {int} {gnutls_random_art} (gnutls_random_art_t @var{type}, const char * @var{key_type}, unsigned int @var{key_size}, void * @var{fpr}, size_t @var{fpr_size}, gnutls_datum_t * @var{art}) -@var{type}: The type of the random art +@var{type}: The type of the random art (for now only @code{GNUTLS_RANDOM_ART_OPENSSH} is supported) @var{key_type}: The type of the key (RSA, DSA etc.) @@ -3593,7 +3637,7 @@ @var{art}: The returned random art This function will convert a given fingerprint to an "artistic" -image. The returned image is allocated using @code{gnutls_malloc()} +image. The returned image is allocated using @code{gnutls_malloc()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @@ -3644,7 +3688,7 @@ @var{session}: is a @code{gnutls_session_t} structure. This function checks if there pending corked -data in the gnutls buffers --see @code{gnutls_cork()} . +data in the gnutls buffers --see @code{gnutls_record_cork()} . @strong{Returns:} Returns the size of the corked data or zero. @@ -3669,9 +3713,8 @@ @deftypefun {void} {gnutls_record_cork} (gnutls_session_t @var{session}) @var{session}: is a @code{gnutls_session_t} structure. -If called @code{gnutls_record_send()} will no longer send partial records. -All queued records will be sent when @code{gnutls_uncork()} is called, or -when the maximum record size is reached. +If called, @code{gnutls_record_send()} will no longer send any records. +Any sent records will be cached until @code{gnutls_record_uncork()} is called. This function is safe to use with DTLS after GnuTLS 3.3.0. @@ -3708,6 +3751,9 @@ interrupted function was trying to read data, and 1 if it was trying to write data. +This function's output is unreliable if you are using the + @code{session} in different threads, for sending and receiving. + @strong{Returns:} 0 if trying to read data, 1 if trying to write data. @end deftypefun @@ -3936,7 +3982,7 @@ @var{flags}: Could be zero or @code{GNUTLS_RECORD_WAIT} -This resets the effect of @code{gnutls_cork()} , and flushes any pending +This resets the effect of @code{gnutls_record_cork()} , and flushes any pending data. If the @code{GNUTLS_RECORD_WAIT} flag is specified then this function will block until the data is sent or a fatal error occurs (i.e., the function will retry on @code{GNUTLS_E_AGAIN} and @@ -4162,7 +4208,8 @@ Returns all session parameters needed to be stored to support resumption. The client should call this, and store the returned session data. A session may be resumed later by calling @code{gnutls_session_set_data()} . -This function must be called after a successful handshake. +This function must be called after a successful (full) handshake. It should +not be used in resumed sessions --see @code{gnutls_session_is_resumed()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise an error code is returned. @@ -4178,7 +4225,9 @@ Returns all session parameters needed to be stored to support resumption. The client should call this, and store the returned session data. A session may be resumed later by calling @code{gnutls_session_set_data()} . -This function must be called after a successful handshake. +This function must be called after a successful (full) handshake. It should +not be used in resumed sessions --see @code{gnutls_session_is_resumed()} . + The returned @code{data} are allocated and must be released using @code{gnutls_free()} . @strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise @@ -4421,17 +4470,9 @@ @deftypefun {int} {gnutls_set_default_priority} (gnutls_session_t @var{session}) @var{session}: is a @code{gnutls_session_t} structure. -Sets some default priority on the ciphers, key exchange methods, -macs and compression methods. - -This typically sets a default priority that is considered -sufficiently secure to establish encrypted sessions. - -This function is kept around for backwards compatibility, but -because of its wide use it is still fully supported. If you wish -to allow users to provide a string that specify which ciphers to -use (which is recommended), you should use -@code{gnutls_priority_set_direct()} or @code{gnutls_priority_set()} instead. +Sets the default priority on the ciphers, key exchange methods, +macs and compression methods. For more fine-tuning you could +use @code{gnutls_priority_set_direct()} or @code{gnutls_priority_set()} instead. @strong{Returns:} @code{GNUTLS_E_SUCCESS} on success, or an error code. @end deftypefun @@ -5149,9 +5190,11 @@ This function will associate a commitment (hash) storage function with the trust storage structure. The function is of the following form. -gnutls_tdb_store_commitment_func(const char* db_name, const char* host, +int gnutls_tdb_store_commitment_func(const char* db_name, const char* host, const char* service, time_t expiration, gnutls_digest_algorithm_t, const gnutls_datum_t* hash); + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun @subheading gnutls_tdb_set_store_func @@ -5164,9 +5207,11 @@ This function will associate a storage function with the trust storage structure. The function is of the following form. -gnutls_tdb_store_func(const char* db_name, const char* host, +int gnutls_tdb_store_func(const char* db_name, const char* host, const char* service, time_t expiration, const gnutls_datum_t* pubkey); + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun @subheading gnutls_tdb_set_verify_func @@ -5179,8 +5224,13 @@ This function will associate a retrieval function with the trust storage structure. The function is of the following form. -gnutls_tdb_verify_func(const char* db_name, const char* host, +int gnutls_tdb_verify_func(const char* db_name, const char* host, const char* service, const gnutls_datum_t* pubkey); + +The verify function should return zero on a match, @code{GNUTLS_E_CERTIFICATE_KEY_MISMATCH} +if there is a mismatch and any other negative error code otherwise. + +The @code{db_name} should be used to pass any private data to this function. @end deftypefun @subheading gnutls_transport_get_int @@ -5247,7 +5297,7 @@ @var{err}: error value to store in session-specific errno variable. Store @code{err} in the session-specific errno variable. Useful values -for @code{err} is EAGAIN and EINTR, other values are treated will be +for @code{err} are EINTR, EAGAIN and EMSGSIZE, other values are treated will be treated as real errors in the push/pull function. This function is useful in replacement push and pull functions set by diff -Nru gnutls28-3.3.8/doc/gnutls-guile.html gnutls28-3.3.30/doc/gnutls-guile.html --- gnutls28-3.3.8/doc/gnutls-guile.html 2014-09-18 07:53:23.000000000 -0400 +++ gnutls28-3.3.30/doc/gnutls-guile.html 2018-07-16 02:03:38.000000000 -0400 @@ -1,7 +1,7 @@ - - + -GnuTLS-Guile 3.3.8 + +GnuTLS-Guile 3.3.30 - - + + - @@ -28,16 +28,16 @@