Changeset 180e49f in mod_gnutls for config


Ignore:
Timestamp:
Jan 11, 2013, 12:58:31 AM (10 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, upstream
Children:
2b1118c, ae29683
Parents:
17eb1a1
Message:

Imported Upstream version 0.5.10

Location:
config
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • config/config.guess

    r17eb1a1 r180e49f  
    55#   Free Software Foundation, Inc.
    66
    7 timestamp='2009-06-10'
     7timestamp='2009-11-20'
    88
    99# This file is free software; you can redistribute it and/or modify it
     
    2828
    2929
    30 # Originally written by Per Bothner <per@bothner.com>.
    31 # Please send patches to <config-patches@gnu.org>.  Submit a context
    32 # diff and a properly formatted ChangeLog entry.
     30# Originally written by Per Bothner.  Please send patches (context
     31# diff format) to <config-patches@gnu.org> and include a ChangeLog
     32# entry.
    3333#
    3434# This script attempts to guess a canonical system name similar to
     
    3636# exits with 0.  Otherwise, it exits with 1.
    3737#
    38 # The plan is that this can be called by configure scripts if you
    39 # don't specify an explicit build system type.
     38# You can get the latest version of this script from:
     39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    4040
    4141me=`echo "$0" | sed -e 's,.*/,,'`
     
    334334        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    335335        exit ;;
     336    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
     337        echo i386-pc-auroraux${UNAME_RELEASE}
     338        exit ;;
    336339    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    337340        eval $set_cc_for_build
     
    808811        echo ${UNAME_MACHINE}-pc-pw32
    809812        exit ;;
    810     *:Interix*:[3456]*)
     813    *:Interix*:*)
    811814        case ${UNAME_MACHINE} in
    812815            x86)
    813816                echo i586-pc-interix${UNAME_RELEASE}
    814817                exit ;;
    815             EM64T | authenticamd | genuineintel)
     818            authenticamd | genuineintel | EM64T)
    816819                echo x86_64-unknown-interix${UNAME_RELEASE}
    817820                exit ;;
     
    855858        echo ${UNAME_MACHINE}-pc-minix
    856859        exit ;;
     860    alpha:Linux:*:*)
     861        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     862          EV5)   UNAME_MACHINE=alphaev5 ;;
     863          EV56)  UNAME_MACHINE=alphaev56 ;;
     864          PCA56) UNAME_MACHINE=alphapca56 ;;
     865          PCA57) UNAME_MACHINE=alphapca56 ;;
     866          EV6)   UNAME_MACHINE=alphaev6 ;;
     867          EV67)  UNAME_MACHINE=alphaev67 ;;
     868          EV68*) UNAME_MACHINE=alphaev68 ;;
     869        esac
     870        objdump --private-headers /bin/sh | grep -q ld.so.1
     871        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     872        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     873        exit ;;
    857874    arm*:Linux:*:*)
    858875        eval $set_cc_for_build
     
    876893    frv:Linux:*:*)
    877894        echo frv-unknown-linux-gnu
     895        exit ;;
     896    i*86:Linux:*:*)
     897        LIBC=gnu
     898        eval $set_cc_for_build
     899        sed 's/^        //' << EOF >$dummy.c
     900        #ifdef __dietlibc__
     901        LIBC=dietlibc
     902        #endif
     903EOF
     904        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     905        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
    878906        exit ;;
    879907    ia64:Linux:*:*)
     
    902930        #endif
    903931EOF
    904         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    905             /^CPU/{
    906                 s: ::g
    907                 p
    908             }'`"
     932        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
    909933        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
    910934        ;;
     
    912936        echo or32-unknown-linux-gnu
    913937        exit ;;
    914     ppc:Linux:*:*)
    915         echo powerpc-unknown-linux-gnu
    916         exit ;;
    917     ppc64:Linux:*:*)
    918         echo powerpc64-unknown-linux-gnu
    919         exit ;;
    920     alpha:Linux:*:*)
    921         case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
    922           EV5)   UNAME_MACHINE=alphaev5 ;;
    923           EV56)  UNAME_MACHINE=alphaev56 ;;
    924           PCA56) UNAME_MACHINE=alphapca56 ;;
    925           PCA57) UNAME_MACHINE=alphapca56 ;;
    926           EV6)   UNAME_MACHINE=alphaev6 ;;
    927           EV67)  UNAME_MACHINE=alphaev67 ;;
    928           EV68*) UNAME_MACHINE=alphaev68 ;;
    929         esac
    930         objdump --private-headers /bin/sh | grep -q ld.so.1
    931         if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    932         echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    933         exit ;;
    934938    padre:Linux:*:*)
    935939        echo sparc-unknown-linux-gnu
     940        exit ;;
     941    parisc64:Linux:*:* | hppa64:Linux:*:*)
     942        echo hppa64-unknown-linux-gnu
    936943        exit ;;
    937944    parisc:Linux:*:* | hppa:Linux:*:*)
     
    943950        esac
    944951        exit ;;
    945     parisc64:Linux:*:* | hppa64:Linux:*:*)
    946         echo hppa64-unknown-linux-gnu
     952    ppc64:Linux:*:*)
     953        echo powerpc64-unknown-linux-gnu
     954        exit ;;
     955    ppc:Linux:*:*)
     956        echo powerpc-unknown-linux-gnu
    947957        exit ;;
    948958    s390:Linux:*:* | s390x:Linux:*:*)
     
    967977        echo ${UNAME_MACHINE}-unknown-linux-gnu
    968978        exit ;;
    969     i*86:Linux:*:*)
    970         # The BFD linker knows what the default object file format is, so
    971         # first see if it will tell us. cd to the root directory to prevent
    972         # problems with other programs or directories called `ld' in the path.
    973         # Set LC_ALL=C to ensure ld outputs messages in English.
    974         ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
    975                          | sed -ne '/supported targets:/!d
    976                                     s/[         ][      ]*/ /g
    977                                     s/.*supported targets: *//
    978                                     s/ .*//
    979                                     p'`
    980         case "$ld_supported_targets" in
    981           elf32-i386)
    982                 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
    983                 ;;
    984         esac
    985         # Determine whether the default compiler is a.out or elf
    986         eval $set_cc_for_build
    987         sed 's/^        //' << EOF >$dummy.c
    988         #include <features.h>
    989         #ifdef __ELF__
    990         # ifdef __GLIBC__
    991         #  if __GLIBC__ >= 2
    992         LIBC=gnu
    993         #  else
    994         LIBC=gnulibc1
    995         #  endif
    996         # else
    997         LIBC=gnulibc1
    998         # endif
    999         #else
    1000         #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
    1001         LIBC=gnu
    1002         #else
    1003         LIBC=gnuaout
    1004         #endif
    1005         #endif
    1006         #ifdef __dietlibc__
    1007         LIBC=dietlibc
    1008         #endif
    1009 EOF
    1010         eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
    1011             /^LIBC/{
    1012                 s: ::g
    1013                 p
    1014             }'`"
    1015         test x"${LIBC}" != x && {
    1016                 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
    1017                 exit
    1018         }
    1019         test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
    1020         ;;
    1021979    i*86:DYNIX/ptx:4*:*)
    1022980        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     
    12481206        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
    12491207        case $UNAME_PROCESSOR in
     1208            i386)
     1209                eval $set_cc_for_build
     1210                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1211                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
     1212                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     1213                      grep IS_64BIT_ARCH >/dev/null
     1214                  then
     1215                      UNAME_PROCESSOR="x86_64"
     1216                  fi
     1217                fi ;;
    12501218            unknown) UNAME_PROCESSOR=powerpc ;;
    12511219        esac
  • config/config.sub

    r17eb1a1 r180e49f  
    55#   Free Software Foundation, Inc.
    66
    7 timestamp='2009-06-11'
     7timestamp='2009-11-20'
    88
    99# This file is (in principle) common to ALL GNU software.
     
    3333
    3434# Please send patches to <config-patches@gnu.org>.  Submit a context
    35 # diff and a properly formatted ChangeLog entry.
     35# diff and a properly formatted GNU ChangeLog entry.
    3636#
    3737# Configuration subroutine to validate and canonicalize a configuration type.
     
    3939# If it is invalid, we print an error message on stderr and exit with code 1.
    4040# Otherwise, we print the canonical config type on stdout and succeed.
     41
     42# You can get the latest version of this script from:
     43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    4144
    4245# This file is supposed to be the same for all GNU packages
     
    150153        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    151154        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    152         -apple | -axis | -knuth | -cray)
     155        -apple | -axis | -knuth | -cray | -microblaze)
    153156                os=
    154157                basic_machine=$1
     
    285288        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    286289        | pyramid \
     290        | rx \
    287291        | score \
    288292        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
     
    292296        | spu | strongarm \
    293297        | tahoe | thumb | tic4x | tic80 | tron \
     298        | ubicom32 \
    294299        | v850 | v850e \
    295300        | we32k \
     
    298303                basic_machine=$basic_machine-unknown
    299304                ;;
    300         m6811 | m68hc11 | m6812 | m68hc12)
     305        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
    301306                # Motorola 68HC11/12.
    302307                basic_machine=$basic_machine-unknown
     
    341346        | m32c-* | m32r-* | m32rle-* \
    342347        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    343         | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
     348        | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
    344349        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    345350        | mips16-* \
     
    369374        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
    370375        | pyramid-* \
    371         | romp-* | rs6000-* \
     376        | romp-* | rs6000-* | rx-* \
    372377        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    373378        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
     
    378383        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
    379384        | tron-* \
     385        | ubicom32-* \
    380386        | v850-* | v850e-* | vax-* \
    381387        | we32k-* \
     
    726732                basic_machine=ns32k-utek
    727733                os=-sysv
     734                ;;
     735        microblaze)
     736                basic_machine=microblaze-xilinx
    728737                ;;
    729738        mingw32)
     
    12481257        # that might get confused with valid system types.
    12491258        # -solaris* is a basic system type, with this one exception.
     1259        -auroraux)
     1260                os=-auroraux
     1261                ;;
    12501262        -solaris1 | -solaris1.*)
    12511263                os=`echo $os | sed -e 's|solaris1|sunos4|'`
     
    12691281        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    12701282              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
    1271               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
    1272               | -kopensolaris* \
     1283              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
     1284              | -sym* | -kopensolaris* \
    12731285              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    12741286              | -aos* | -aros* \
     
    12911303              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    12921304              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    1293               | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
     1305              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
    12941306        # Remember, each alternative MUST END IN *, to match a version number.
    12951307                ;;
  • config/ltmain.sh

    r17eb1a1 r180e49f  
    11# Generated from ltmain.m4sh.
    22
    3 # ltmain.sh (GNU libtool) 2.2.6b
     3# libtool (GNU libtool) 2.2.10
    44# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    55
    6 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
     6# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
     7# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
    78# This is free software; see the source for copying conditions.  There is NO
    89# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     
    3334# Provide generalized library-building support services.
    3435#
    35 #     --config             show all configuration variables
    36 #     --debug              enable verbose shell tracing
    37 # -n, --dry-run            display commands without modifying any files
    38 #     --features           display basic configuration information and exit
    39 #     --mode=MODE          use operation mode MODE
    40 #     --preserve-dup-deps  don't remove duplicate dependency libraries
    41 #     --quiet, --silent    don't print informational messages
    42 #     --tag=TAG            use configuration variables from tag TAG
    43 # -v, --verbose            print informational messages (default)
    44 #     --version            print version information
    45 # -h, --help               print short or long help message
     36#       --config             show all configuration variables
     37#       --debug              enable verbose shell tracing
     38#   -n, --dry-run            display commands without modifying any files
     39#       --features           display basic configuration information and exit
     40#       --mode=MODE          use operation mode MODE
     41#       --preserve-dup-deps  don't remove duplicate dependency libraries
     42#       --quiet, --silent    don't print informational messages
     43#       --no-quiet, --no-silent
     44#                            print informational messages (default)
     45#       --tag=TAG            use configuration variables from tag TAG
     46#   -v, --verbose            print more informational messages than default
     47#       --no-verbose         don't print the extra informational messages
     48#       --version            print version information
     49#   -h, --help, --help-all   print short, long, or detailed help message
    4650#
    4751# MODE must be one of the following:
    4852#
    49 #       clean              remove files from the build directory
    50 #       compile            compile a source file into a libtool object
    51 #       execute            automatically set library path, then run a program
    52 #       finish             complete the installation of libtool libraries
    53 #       install            install libraries or executables
    54 #       link               create a library or an executable
    55 #       uninstall          remove libraries from an installed directory
     53#         clean              remove files from the build directory
     54#         compile            compile a source file into a libtool object
     55#         execute            automatically set library path, then run a program
     56#         finish             complete the installation of libtool libraries
     57#         install            install libraries or executables
     58#         link               create a library or an executable
     59#         uninstall          remove libraries from an installed directory
    5660#
    57 # MODE-ARGS vary depending on the MODE.
     61# MODE-ARGS vary depending on the MODE.  When passed as first option,
     62# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
    5863# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
    5964#
     
    6166# include the following information:
    6267#
    63 #       host-triplet:   $host
    64 #       shell:          $SHELL
    65 #       compiler:               $LTCC
    66 #       compiler flags:         $LTCFLAGS
    67 #       linker:         $LD (gnu? $with_gnu_ld)
    68 #       $progname:              (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
    69 #       automake:               $automake_version
    70 #       autoconf:               $autoconf_version
     68#         host-triplet: $host
     69#         shell:                $SHELL
     70#         compiler:             $LTCC
     71#         compiler flags:               $LTCFLAGS
     72#         linker:               $LD (gnu? $with_gnu_ld)
     73#         $progname:    (GNU libtool) 2.2.10
     74#         automake:     $automake_version
     75#         autoconf:     $autoconf_version
    7176#
    7277# Report bugs to <bug-libtool@gnu.org>.
    7378
    74 PROGRAM=ltmain.sh
     79PROGRAM=libtool
    7580PACKAGE=libtool
    76 VERSION="2.2.6b Debian-2.2.6b-2ubuntu1"
     81VERSION=2.2.10
    7782TIMESTAMP=""
    78 package_revision=1.3017
     83package_revision=1.3175
    7984
    8085# Be Bourne compatible
     
    9297DUALCASE=1; export DUALCASE # for MKS sh
    9398
     99# A function that is used when there is no print builtin or printf.
     100func_fallback_echo ()
     101{
     102  eval 'cat <<_LTECHO_EOF
     103$1
     104_LTECHO_EOF'
     105}
     106
    94107# NLS nuisances: We save the old values to restore during execute mode.
    95 # Only set LANG and LC_ALL to C if already set.
    96 # These must not be set unconditionally because not all systems understand
    97 # e.g. LANG=C (notably SCO).
    98108lt_user_locale=
    99109lt_safe_locale=
     
    108118        fi"
    109119done
     120LC_ALL=C
     121LANGUAGE=C
     122export LANGUAGE LC_ALL
    110123
    111124$lt_unset CDPATH
    112125
    113126
     127# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
     128# is ksh but when the shell is invoked as "sh" and the current value of
     129# the _XPG environment variable is not equal to 1 (one), the special
     130# positional parameter $0, within a function call, is the name of the
     131# function.
     132progpath="$0"
    114133
    115134
    116135
    117136: ${CP="cp -f"}
    118 : ${ECHO="echo"}
     137test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
    119138: ${EGREP="/bin/grep -E"}
    120139: ${FGREP="/bin/grep -F"}
     
    160179{
    161180  # Extract subdirectory from the argument.
    162   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
     181  func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
    163182  if test "X$func_dirname_result" = "X${1}"; then
    164183    func_dirname_result="${3}"
     
    166185    func_dirname_result="$func_dirname_result${2}"
    167186  fi
    168   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
     187  func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
    169188}
    170189
    171190# Generated shell functions inserted here.
    172191
    173 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
    174 # is ksh but when the shell is invoked as "sh" and the current value of
    175 # the _XPG environment variable is not equal to 1 (one), the special
    176 # positional parameter $0, within a function call, is the name of the
    177 # function.
    178 progpath="$0"
     192# These SED scripts presuppose an absolute path with a trailing slash.
     193pathcar='s,^/\([^/]*\).*$,\1,'
     194pathcdr='s,^/[^/]*,,'
     195removedotparts=':dotsl
     196                s@/\./@/@g
     197                t dotsl
     198                s,/\.$,/,'
     199collapseslashes='s@/\{1,\}@/@g'
     200finalslash='s,/*$,/,'
     201
     202# func_normal_abspath PATH
     203# Remove doubled-up and trailing slashes, "." path components,
     204# and cancel out any ".." path components in PATH after making
     205# it an absolute path.
     206#             value returned in "$func_normal_abspath_result"
     207func_normal_abspath ()
     208{
     209  # Start from root dir and reassemble the path.
     210  func_normal_abspath_result=
     211  func_normal_abspath_tpath=$1
     212  func_normal_abspath_altnamespace=
     213  case $func_normal_abspath_tpath in
     214    "")
     215      # Empty path, that just means $cwd.
     216      func_stripname '' '/' "`pwd`"
     217      func_normal_abspath_result=$func_stripname_result
     218      return
     219    ;;
     220    # The next three entries are used to spot a run of precisely
     221    # two leading slashes without using negated character classes;
     222    # we take advantage of case's first-match behaviour.
     223    ///*)
     224      # Unusual form of absolute path, do nothing.
     225    ;;
     226    //*)
     227      # Not necessarily an ordinary path; POSIX reserves leading '//'
     228      # and for example Cygwin uses it to access remote file shares
     229      # over CIFS/SMB, so we conserve a leading double slash if found.
     230      func_normal_abspath_altnamespace=/
     231    ;;
     232    /*)
     233      # Absolute path, do nothing.
     234    ;;
     235    *)
     236      # Relative path, prepend $cwd.
     237      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
     238    ;;
     239  esac
     240  # Cancel out all the simple stuff to save iterations.  We also want
     241  # the path to end with a slash for ease of parsing, so make sure
     242  # there is one (and only one) here.
     243  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
     244        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
     245  while :; do
     246    # Processed it all yet?
     247    if test "$func_normal_abspath_tpath" = / ; then
     248      # If we ascended to the root using ".." the result may be empty now.
     249      if test -z "$func_normal_abspath_result" ; then
     250        func_normal_abspath_result=/
     251      fi
     252      break
     253    fi
     254    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
     255        -e "$pathcar"`
     256    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
     257        -e "$pathcdr"`
     258    # Figure out what to do with it
     259    case $func_normal_abspath_tcomponent in
     260      "")
     261        # Trailing empty path component, ignore it.
     262      ;;
     263      ..)
     264        # Parent dir; strip last assembled component from result.
     265        func_dirname "$func_normal_abspath_result"
     266        func_normal_abspath_result=$func_dirname_result
     267      ;;
     268      *)
     269        # Actual path component, append it.
     270        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
     271      ;;
     272    esac
     273  done
     274  # Restore leading double-slash if one was found on entry.
     275  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
     276}
     277
     278# func_relative_path SRCDIR DSTDIR
     279# generates a relative path from SRCDIR to DSTDIR, with a trailing
     280# slash if non-empty, suitable for immediately appending a filename
     281# without needing to append a separator.
     282#             value returned in "$func_relative_path_result"
     283func_relative_path ()
     284{
     285  func_relative_path_result=
     286  func_normal_abspath "$1"
     287  func_relative_path_tlibdir=$func_normal_abspath_result
     288  func_normal_abspath "$2"
     289  func_relative_path_tbindir=$func_normal_abspath_result
     290
     291  # Ascend the tree starting from libdir
     292  while :; do
     293    # check if we have found a prefix of bindir
     294    case $func_relative_path_tbindir in
     295      $func_relative_path_tlibdir)
     296        # found an exact match
     297        func_relative_path_tcancelled=
     298        break
     299        ;;
     300      $func_relative_path_tlibdir*)
     301        # found a matching prefix
     302        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
     303        func_relative_path_tcancelled=$func_stripname_result
     304        if test -z "$func_relative_path_result"; then
     305          func_relative_path_result=.
     306        fi
     307        break
     308        ;;
     309      *)
     310        func_dirname $func_relative_path_tlibdir
     311        func_relative_path_tlibdir=${func_dirname_result}
     312        if test "x$func_relative_path_tlibdir" = x ; then
     313          # Have to descend all the way to the root!
     314          func_relative_path_result=../$func_relative_path_result
     315          func_relative_path_tcancelled=$func_relative_path_tbindir
     316          break
     317        fi
     318        func_relative_path_result=../$func_relative_path_result
     319        ;;
     320    esac
     321  done
     322
     323  # Now calculate path; take care to avoid doubling-up slashes.
     324  func_stripname '' '/' "$func_relative_path_result"
     325  func_relative_path_result=$func_stripname_result
     326  func_stripname '/' '/' "$func_relative_path_tcancelled"
     327  if test "x$func_stripname_result" != x ; then
     328    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
     329  fi
     330
     331  # Normalisation. If bindir is libdir, return empty string,
     332  # else relative path ending with a slash; either way, target
     333  # file name can be directly appended.
     334  if test ! -z "$func_relative_path_result"; then
     335    func_stripname './' '' "$func_relative_path_result/"
     336    func_relative_path_result=$func_stripname_result
     337  fi
     338}
    179339
    180340# The name of this program:
    181 # In the unlikely event $progname began with a '-', it would play havoc with
    182 # func_echo (imagine progname=-n), so we prepend ./ in that case:
    183341func_dirname_and_basename "$progpath"
    184342progname=$func_basename_result
    185 case $progname in
    186   -*) progname=./$progname ;;
    187 esac
    188343
    189344# Make sure we have an absolute path for reexecution:
     
    259414}
    260415
     416# func_echo_all arg...
     417# Invoke $ECHO with all args, space-separated.
     418func_echo_all ()
     419{
     420    $ECHO "$*"
     421}
     422
    261423# func_error arg...
    262424# Echo program name prefixed message to standard error.
     
    327489
    328490        # ...otherwise throw away the child directory and loop
    329         my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
     491        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
    330492      done
    331       my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
     493      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
    332494
    333495      save_mkdir_p_IFS="$IFS"; IFS=':'
     
    379541    fi
    380542
    381     $ECHO "X$my_tmpdir" | $Xsed
     543    $ECHO "$my_tmpdir"
    382544}
    383545
     
    393555    case $1 in
    394556      *[\\\`\"\$]*)
    395         func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
     557        func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
    396558      *)
    397559        func_quote_for_eval_unquoted_result="$1" ;;
     
    420582    case $1 in
    421583      *[\\\`\"]*)
    422         my_arg=`$ECHO "X$1" | $Xsed \
     584        my_arg=`$ECHO "$1" | $SED \
    423585            -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
    424586      *)
     
    490652
    491653
    492 
    493 
    494 
    495654# func_version
    496655# Echo version message to standard output and exit.
    497656func_version ()
    498657{
    499     $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
     658    $SED -n '/(C)/!b go
     659        :more
     660        /\./!{
     661          N
     662          s/\n# / /
     663          b more
     664        }
     665        :go
     666        /^# '$PROGRAM' (GNU /,/# warranty; / {
    500667        s/^# //
    501668        s/^# *$//
     
    510677func_usage ()
    511678{
    512     $SED -n '/^# Usage:/,/# -h/ {
     679    $SED -n '/^# Usage:/,/^#  *.*--help/ {
    513680        s/^# //
    514681        s/^# *$//
     
    516683        p
    517684    }' < "$progpath"
    518     $ECHO
     685    echo
    519686    $ECHO "run \`$progname --help | more' for full usage"
    520687    exit $?
    521688}
    522689
    523 # func_help
    524 # Echo long help message to standard output and exit.
     690# func_help [NOEXIT]
     691# Echo long help message to standard output and exit,
     692# unless 'noexit' is passed as argument.
    525693func_help ()
    526694{
     
    539707        p
    540708     }' < "$progpath"
    541     exit $?
     709    ret=$?
     710    if test -z "$1"; then
     711      exit $ret
     712    fi
    542713}
    543714
     
    547718func_missing_arg ()
    548719{
    549     func_error "missing argument for $1"
     720    func_error "missing argument for $1."
    550721    exit_cmd=exit
    551722}
     
    557728
    558729
    559 # Check that we have a working $ECHO.
    560 if test "X$1" = X--no-reexec; then
    561   # Discard the --no-reexec flag, and continue.
    562   shift
    563 elif test "X$1" = X--fallback-echo; then
    564   # Avoid inline document here, it may be left over
    565   :
    566 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
    567   # Yippee, $ECHO works!
    568   :
    569 else
    570   # Restart under the correct shell, and then maybe $ECHO will work.
    571   exec $SHELL "$progpath" --no-reexec ${1+"$@"}
    572 fi
    573 
    574 if test "X$1" = X--fallback-echo; then
    575   # used as fallback echo
    576   shift
    577   cat <<EOF
    578 $*
    579 EOF
    580   exit $EXIT_SUCCESS
    581 fi
    582730
    583731magic="%%%MAGIC variable%%%"
     
    637785func_features ()
    638786{
    639     $ECHO "host: $host"
     787    echo "host: $host"
    640788    if test "$build_libtool_libs" = yes; then
    641       $ECHO "enable shared libraries"
     789      echo "enable shared libraries"
    642790    else
    643       $ECHO "disable shared libraries"
     791      echo "disable shared libraries"
    644792    fi
    645793    if test "$build_old_libs" = yes; then
    646       $ECHO "enable static libraries"
     794      echo "enable static libraries"
    647795    else
    648       $ECHO "disable static libraries"
     796      echo "disable static libraries"
    649797    fi
    650798
     
    773921      --quiet|--silent) preserve_args="$preserve_args $opt"
    774922                        opt_silent=:
     923                        opt_verbose=false
     924                        ;;
     925
     926      --no-quiet|--no-silent)
     927                        preserve_args="$preserve_args $opt"
     928                        opt_silent=false
    775929                        ;;
    776930
    777931      --verbose| -v)    preserve_args="$preserve_args $opt"
    778932                        opt_silent=false
     933                        opt_verbose=:
     934                        ;;
     935
     936      --no-verbose)     preserve_args="$preserve_args $opt"
     937                        opt_verbose=false
    779938                        ;;
    780939
     
    794953      -\?|-h)           func_usage                                      ;;
    795954      --help)           opt_help=:                                      ;;
     955      --help-all)       opt_help=': help-all'                           ;;
    796956      --version)        func_version                                    ;;
    797957
     
    10171177        CC_quoted="$CC_quoted $func_quote_for_eval_result"
    10181178      done
     1179      CC_expanded=`func_echo_all $CC`
     1180      CC_quoted_expanded=`func_echo_all $CC_quoted`
    10191181      case $@ in
    10201182      # Blanks in the command may have been stripped by the calling shell,
    10211183      # but not from the CC environment variable when configure was run.
    1022       " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
     1184      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
     1185      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
    10231186      # Blanks at the start of $base_compile will cause this to fail
    10241187      # if we don't check for them as well.
     
    10341197              CC_quoted="$CC_quoted $func_quote_for_eval_result"
    10351198            done
     1199            CC_expanded=`func_echo_all $CC`
     1200            CC_quoted_expanded=`func_echo_all $CC_quoted`
    10361201            case "$@ " in
    1037               " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
     1202            " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
     1203            " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
    10381204              # The compiler in the base compile command matches
    10391205              # the one in the tagged configuration.
     
    12141380    *.ada | *.adb | *.ads | *.asm | \
    12151381    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
    1216     *.[fF][09]? | *.for | *.java | *.obj | *.sx)
     1382    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
    12171383      func_xform "$libobj"
    12181384      libobj=$func_xform_result
     
    12891455    # not support -o with -c
    12901456    if test "$compiler_c_o" = no; then
    1291       output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
     1457      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
    12921458      lockfile="$output_obj.lock"
    12931459    else
     
    14461612
    14471613$opt_help || {
    1448 test "$mode" = compile && func_mode_compile ${1+"$@"}
     1614  test "$mode" = compile && func_mode_compile ${1+"$@"}
    14491615}
    14501616
     
    14831649  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
    14841650  -no-suppress      do not suppress compiler output for multiple passes
    1485   -prefer-pic       try to building PIC objects only
    1486   -prefer-non-pic   try to building non-PIC objects only
     1651  -prefer-pic       try to build PIC objects only
     1652  -prefer-non-pic   try to build non-PIC objects only
    14871653  -shared           do not build a \`.o' file suitable for static linking
    14881654  -static           only build a \`.o' file suitable for static linking
     1655  -Wc,FLAG          pass FLAG directly to the compiler
    14891656
    14901657COMPILE-COMMAND is a command to be used in creating a \`standard' object file
     
    15391706The following components of INSTALL-COMMAND are treated specially:
    15401707
    1541   -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
     1708  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
    15421709
    15431710The rest of the components are interpreted as arguments to that command (only
     
    15591726  -all-static       do not do any dynamic linking at all
    15601727  -avoid-version    do not add a version suffix if possible
     1728  -bindir BINDIR    specify path to binaries directory (for systems where
     1729                    libraries must be found in the PATH setting at runtime)
    15611730  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
    15621731  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
     
    15871756                    specify library version info [each variable defaults to 0]
    15881757  -weak LIBNAME     declare that the target provides the LIBNAME interface
     1758  -Wc,FLAG
     1759  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
     1760  -Wl,FLAG
     1761  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
     1762  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
    15891763
    15901764All other options (arguments beginning with \`-') are ignored.
     
    16241798    esac
    16251799
    1626     $ECHO
     1800    echo
    16271801    $ECHO "Try \`$progname --help' for more information about other modes."
    1628 
    1629     exit $?
    16301802}
    16311803
    1632   # Now that we've collected a possible --mode arg, show help if necessary
    1633   $opt_help && func_mode_help
     1804# Now that we've collected a possible --mode arg, show help if necessary
     1805if $opt_help; then
     1806  if test "$opt_help" = :; then
     1807    func_mode_help
     1808  else
     1809    {
     1810      func_help noexit
     1811      for mode in compile link execute install finish uninstall clean; do
     1812        func_mode_help
     1813      done
     1814    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
     1815    {
     1816      func_help noexit
     1817      for mode in compile link execute install finish uninstall clean; do
     1818        echo
     1819        func_mode_help
     1820      done
     1821    } |
     1822    sed '1d
     1823      /^When reporting/,/^Report/{
     1824        H
     1825        d
     1826      }
     1827      $x
     1828      /information about other modes/d
     1829      /more detailed .*MODE/d
     1830      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
     1831  fi
     1832  exit $?
     1833fi
    16341834
    16351835
     
    17131913    do
    17141914      case $file in
    1715       -*) ;;
     1915      -* | *.la | *.lo ) ;;
    17161916      *)
    17171917        # Do a test to see if this is really a libtool program.
     
    17551955      if test -n "$shlibpath_var"; then
    17561956        eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
    1757         $ECHO "export $shlibpath_var"
     1957        echo "export $shlibpath_var"
    17581958      fi
    17591959      $ECHO "$cmd$args"
     
    17961996    $opt_silent && exit $EXIT_SUCCESS
    17971997
    1798     $ECHO "X----------------------------------------------------------------------" | $Xsed
    1799     $ECHO "Libraries have been installed in:"
     1998    echo "----------------------------------------------------------------------"
     1999    echo "Libraries have been installed in:"
    18002000    for libdir in $libdirs; do
    18012001      $ECHO "   $libdir"
    18022002    done
    1803     $ECHO
    1804     $ECHO "If you ever happen to want to link against installed libraries"
    1805     $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
    1806     $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
    1807     $ECHO "flag during linking and do at least one of the following:"
     2003    echo
     2004    echo "If you ever happen to want to link against installed libraries"
     2005    echo "in a given directory, LIBDIR, you must either use libtool, and"
     2006    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
     2007    echo "flag during linking and do at least one of the following:"
    18082008    if test -n "$shlibpath_var"; then
    1809       $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
    1810       $ECHO "     during execution"
     2009      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
     2010      echo "     during execution"
    18112011    fi
    18122012    if test -n "$runpath_var"; then
    1813       $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
    1814       $ECHO "     during linking"
     2013      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
     2014      echo "     during linking"
    18152015    fi
    18162016    if test -n "$hardcode_libdir_flag_spec"; then
     
    18242024    fi
    18252025    if test -f /etc/ld.so.conf; then
    1826       $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
     2026      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
    18272027    fi
    1828     $ECHO
    1829 
    1830     $ECHO "See any operating system documentation about shared libraries for"
     2028    echo
     2029
     2030    echo "See any operating system documentation about shared libraries for"
    18312031    case $host in
    18322032      solaris2.[6789]|solaris2.1[0-9])
    1833         $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
    1834         $ECHO "pages."
     2033        echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
     2034        echo "pages."
    18352035        ;;
    18362036      *)
    1837         $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
     2037        echo "more information, such as the ld(1) and ld.so(8) manual pages."
    18382038        ;;
    18392039    esac
    1840     $ECHO "X----------------------------------------------------------------------" | $Xsed
     2040    echo "----------------------------------------------------------------------"
    18412041    exit $EXIT_SUCCESS
    18422042}
     
    18532053    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
    18542054       # Allow the use of GNU shtool's install command.
    1855        $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
     2055       case $nonopt in *shtool*) :;; *) false;; esac; then
    18562056      # Aesthetically quote it.
    18572057      func_quote_for_eval "$nonopt"
     
    18682068    func_quote_for_eval "$arg"
    18692069    install_prog="$install_prog$func_quote_for_eval_result"
     2070    install_shared_prog=$install_prog
     2071    case " $install_prog " in
     2072      *[\\\ /]cp\ *) install_cp=: ;;
     2073      *) install_cp=false ;;
     2074    esac
    18702075
    18712076    # We need to accept at least all the BSD install flags.
     
    18772082    isdir=no
    18782083    stripme=
     2084    no_mode=:
    18792085    for arg
    18802086    do
     2087      arg2=
    18812088      if test -n "$dest"; then
    18822089        files="$files $dest"
     
    18882095      -d) isdir=yes ;;
    18892096      -f)
    1890         case " $install_prog " in
    1891         *[\\\ /]cp\ *) ;;
    1892         *) prev=$arg ;;
    1893         esac
     2097        if $install_cp; then :; else
     2098          prev=$arg
     2099        fi
    18942100        ;;
    18952101      -g | -m | -o)
     
    19052111        # If the previous option needed an argument, then skip it.
    19062112        if test -n "$prev"; then
     2113          if test "x$prev" = x-m && test -n "$install_override_mode"; then
     2114            arg2=$install_override_mode
     2115            no_mode=false
     2116          fi
    19072117          prev=
    19082118        else
     
    19162126      func_quote_for_eval "$arg"
    19172127      install_prog="$install_prog $func_quote_for_eval_result"
     2128      if test -n "$arg2"; then
     2129        func_quote_for_eval "$arg2"
     2130      fi
     2131      install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
    19182132    done
    19192133
     
    19232137    test -n "$prev" && \
    19242138      func_fatal_help "the \`$prev' option requires an argument"
     2139
     2140    if test -n "$install_override_mode" && $no_mode; then
     2141      if $install_cp; then :; else
     2142        func_quote_for_eval "$install_override_mode"
     2143        install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result"
     2144      fi
     2145    fi
    19252146
    19262147    if test -z "$files"; then
     
    20112232        if test -n "$relink_command"; then
    20122233          # Determine the prefix the user has applied to our future dir.
    2013           inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
     2234          inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
    20142235
    20152236          # Don't allow the user to place us outside of our expected
     
    20242245          if test -n "$inst_prefix_dir"; then
    20252246            # Stick the inst_prefix_dir data into the link command.
    2026             relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
     2247            relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
    20272248          else
    2028             relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
     2249            relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
    20292250          fi
    20302251
     
    20442265
    20452266          # Install the shared library and build the symlinks.
    2046           func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
     2267          func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
    20472268              'exit $?'
    20482269          tstripme="$stripme"
     
    21842405              func_source "$lib"
    21852406            fi
    2186             libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
     2407            libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
    21872408            if test -n "$libdir" && test ! -f "$libfile"; then
    21882409              func_warning "\`$lib' has not been installed in \`$libdir'"
     
    22032424                outputname="$tmpdir/$file"
    22042425                # Replace the output file specification.
    2205                 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
     2426                relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
    22062427
    22072428                $opt_silent || {
     
    22222443          else
    22232444            # Install the binary that we compiled earlier.
    2224             file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
     2445            file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
    22252446          fi
    22262447        fi
     
    23242545#endif
    23252546
     2547#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
     2548#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
     2549#endif
     2550
    23262551/* External symbol declarations for the compiler. */\
    23272552"
     
    23332558
    23342559          # Add our own program objects to the symbol list.
    2335           progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     2560          progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
    23362561          for progfile in $progfiles; do
    23372562            func_verbose "extracting global C symbols from \`$progfile'"
     
    23722597              eval '$MV "$nlist"T "$nlist"'
    23732598              case $host in
    2374                 *cygwin | *mingw* | *cegcc* )
     2599                *cygwin* | *mingw* | *cegcc* )
    23752600                  eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
    23762601                  eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
     
    24162641            eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
    24172642          else
    2418             $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
     2643            echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
    24192644          fi
    24202645
    2421           $ECHO >> "$output_objdir/$my_dlsyms" "\
     2646          echo >> "$output_objdir/$my_dlsyms" "\
    24222647
    24232648/* The mapping between symbol names and symbols.  */
     
    24292654          case $host in
    24302655          *cygwin* | *mingw* | *cegcc* )
    2431             $ECHO >> "$output_objdir/$my_dlsyms" "\
     2656            echo >> "$output_objdir/$my_dlsyms" "\
    24322657/* DATA imports from DLLs on WIN32 con't be const, because
    24332658   runtime relocations are performed -- see ld's documentation
     
    24422667          esac
    24432668
    2444           $ECHO >> "$output_objdir/$my_dlsyms" "\
     2669          echo >> "$output_objdir/$my_dlsyms" "\
    24452670extern $lt_dlsym_const lt_dlsymlist
    24462671lt_${my_prefix}_LTX_preloaded_symbols[];
     
    24582683            ;;
    24592684          esac
    2460           $ECHO >> "$output_objdir/$my_dlsyms" "\
     2685          echo >> "$output_objdir/$my_dlsyms" "\
    24612686  {0, (void *) 0}
    24622687};
     
    25162741        *cygwin* | *mingw* | *cegcc* )
    25172742          if test -f "$output_objdir/$my_outputname.def"; then
    2518             compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
    2519             finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
     2743            compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
     2744            finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
    25202745          else
    2521             compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
    2522             finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
     2746            compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
     2747            finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
    25232748          fi
    25242749          ;;
    25252750        *)
    2526           compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
    2527           finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
     2751          compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
     2752          finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
    25282753          ;;
    25292754        esac
     
    25392764
    25402765      # Nullify the symbol file.
    2541       compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
    2542       finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
     2766      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
     2767      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
    25432768    fi
    25442769}
     
    25502775# Has to be a shell function in order to 'eat' the argument
    25512776# that is supplied when $file_magic_command is called.
     2777# Despite the name, also deal with 64 bit binaries.
    25522778func_win32_libid ()
    25532779{
     
    25602786    ;;
    25612787  *ar\ archive*) # could be an import, or static
     2788    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
    25622789    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
    2563        $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
     2790       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
    25642791      win32_nmres=`eval $NM -f posix -A $1 |
    25652792        $SED -n -e '
     
    25992826    f_ex_an_ar_dir="$1"; shift
    26002827    f_ex_an_ar_oldlib="$1"
    2601     func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
     2828    if test "$lock_old_archive_extraction" = yes; then
     2829      lockfile=$f_ex_an_ar_oldlib.lock
     2830      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
     2831        func_echo "Waiting for $lockfile to be removed"
     2832        sleep 2
     2833      done
     2834    fi
     2835    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
     2836                   'stat=$?; rm -f "$lockfile"; exit $stat'
     2837    if test "$lock_old_archive_extraction" = yes; then
     2838      $opt_dry_run || rm -f "$lockfile"
     2839    fi
    26022840    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
    26032841     :
     
    26702908            darwin_files=
    26712909            for darwin_file in $darwin_filelist; do
    2672               darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
     2910              darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
    26732911              $LIPO -create -output "$darwin_file" $darwin_files
    26742912            done # $darwin_filelist
     
    26852923        ;;
    26862924      esac
    2687       my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
     2925      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
    26882926    done
    26892927
    26902928    func_extract_archives_result="$my_oldobjs"
    26912929}
    2692 
    2693 
    2694 
    2695 # func_emit_wrapper_part1 [arg=no]
    2696 #
    2697 # Emit the first part of a libtool wrapper script on stdout.
    2698 # For more information, see the description associated with
    2699 # func_emit_wrapper(), below.
    2700 func_emit_wrapper_part1 ()
    2701 {
    2702         func_emit_wrapper_part1_arg1=no
    2703         if test -n "$1" ; then
    2704           func_emit_wrapper_part1_arg1=$1
    2705         fi
    2706 
    2707         $ECHO "\
    2708 #! $SHELL
    2709 
    2710 # $output - temporary wrapper script for $objdir/$outputname
    2711 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
    2712 #
    2713 # The $output program cannot be directly executed until all the libtool
    2714 # libraries that it depends on are installed.
    2715 #
    2716 # This wrapper script should never be moved out of the build directory.
    2717 # If it is, it will not operate correctly.
    2718 
    2719 # Sed substitution that helps us do robust quoting.  It backslashifies
    2720 # metacharacters that are still active within double-quoted strings.
    2721 Xsed='${SED} -e 1s/^X//'
    2722 sed_quote_subst='$sed_quote_subst'
    2723 
    2724 # Be Bourne compatible
    2725 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
    2726   emulate sh
    2727   NULLCMD=:
    2728   # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
    2729   # is contrary to our usage.  Disable this feature.
    2730   alias -g '\${1+\"\$@\"}'='\"\$@\"'
    2731   setopt NO_GLOB_SUBST
    2732 else
    2733   case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
    2734 fi
    2735 BIN_SH=xpg4; export BIN_SH # for Tru64
    2736 DUALCASE=1; export DUALCASE # for MKS sh
    2737 
    2738 # The HP-UX ksh and POSIX shell print the target directory to stdout
    2739 # if CDPATH is set.
    2740 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    2741 
    2742 relink_command=\"$relink_command\"
    2743 
    2744 # This environment variable determines our operation mode.
    2745 if test \"\$libtool_install_magic\" = \"$magic\"; then
    2746   # install mode needs the following variables:
    2747   generated_by_libtool_version='$macro_version'
    2748   notinst_deplibs='$notinst_deplibs'
    2749 else
    2750   # When we are sourced in execute mode, \$file and \$ECHO are already set.
    2751   if test \"\$libtool_execute_magic\" != \"$magic\"; then
    2752     ECHO=\"$qecho\"
    2753     file=\"\$0\"
    2754     # Make sure echo works.
    2755     if test \"X\$1\" = X--no-reexec; then
    2756       # Discard the --no-reexec flag, and continue.
    2757       shift
    2758     elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
    2759       # Yippee, \$ECHO works!
    2760       :
    2761     else
    2762       # Restart under the correct shell, and then maybe \$ECHO will work.
    2763       exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
    2764     fi
    2765   fi\
    2766 "
    2767         $ECHO "\
    2768 
    2769   # Find the directory that this script lives in.
    2770   thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
    2771   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
    2772 
    2773   # Follow symbolic links until we get to the real thisdir.
    2774   file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
    2775   while test -n \"\$file\"; do
    2776     destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
    2777 
    2778     # If there was a directory component, then change thisdir.
    2779     if test \"x\$destdir\" != \"x\$file\"; then
    2780       case \"\$destdir\" in
    2781       [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
    2782       *) thisdir=\"\$thisdir/\$destdir\" ;;
    2783       esac
    2784     fi
    2785 
    2786     file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
    2787     file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
    2788   done
    2789 "
    2790 }
    2791 # end: func_emit_wrapper_part1
    2792 
    2793 # func_emit_wrapper_part2 [arg=no]
    2794 #
    2795 # Emit the second part of a libtool wrapper script on stdout.
    2796 # For more information, see the description associated with
    2797 # func_emit_wrapper(), below.
    2798 func_emit_wrapper_part2 ()
    2799 {
    2800         func_emit_wrapper_part2_arg1=no
    2801         if test -n "$1" ; then
    2802           func_emit_wrapper_part2_arg1=$1
    2803         fi
    2804 
    2805         $ECHO "\
    2806 
    2807   # Usually 'no', except on cygwin/mingw when embedded into
    2808   # the cwrapper.
    2809   WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
    2810   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
    2811     # special case for '.'
    2812     if test \"\$thisdir\" = \".\"; then
    2813       thisdir=\`pwd\`
    2814     fi
    2815     # remove .libs from thisdir
    2816     case \"\$thisdir\" in
    2817     *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
    2818     $objdir )   thisdir=. ;;
    2819     esac
    2820   fi
    2821 
    2822   # Try to get the absolute directory name.
    2823   absdir=\`cd \"\$thisdir\" && pwd\`
    2824   test -n \"\$absdir\" && thisdir=\"\$absdir\"
    2825 "
    2826 
    2827         if test "$fast_install" = yes; then
    2828           $ECHO "\
    2829   program=lt-'$outputname'$exeext
    2830   progdir=\"\$thisdir/$objdir\"
    2831 
    2832   if test ! -f \"\$progdir/\$program\" ||
    2833      { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
    2834        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
    2835 
    2836     file=\"\$\$-\$program\"
    2837 
    2838     if test ! -d \"\$progdir\"; then
    2839       $MKDIR \"\$progdir\"
    2840     else
    2841       $RM \"\$progdir/\$file\"
    2842     fi"
    2843 
    2844           $ECHO "\
    2845 
    2846     # relink executable if necessary
    2847     if test -n \"\$relink_command\"; then
    2848       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
    2849       else
    2850         $ECHO \"\$relink_command_output\" >&2
    2851         $RM \"\$progdir/\$file\"
    2852         exit 1
    2853       fi
    2854     fi
    2855 
    2856     $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
    2857     { $RM \"\$progdir/\$program\";
    2858       $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
    2859     $RM \"\$progdir/\$file\"
    2860   fi"
    2861         else
    2862           $ECHO "\
    2863   program='$outputname'
    2864   progdir=\"\$thisdir/$objdir\"
    2865 "
    2866         fi
    2867 
    2868         $ECHO "\
    2869 
    2870   if test -f \"\$progdir/\$program\"; then"
    2871 
    2872         # Export our shlibpath_var if we have one.
    2873         if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
    2874           $ECHO "\
    2875     # Add our own library path to $shlibpath_var
    2876     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
    2877 
    2878     # Some systems cannot cope with colon-terminated $shlibpath_var
    2879     # The second colon is a workaround for a bug in BeOS R4 sed
    2880     $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
    2881 
    2882     export $shlibpath_var
    2883 "
    2884         fi
    2885 
    2886         # fixup the dll searchpath if we need to.
    2887         if test -n "$dllsearchpath"; then
    2888           $ECHO "\
    2889     # Add the dll search path components to the executable PATH
    2890     PATH=$dllsearchpath:\$PATH
    2891 "
    2892         fi
    2893 
    2894         $ECHO "\
    2895     if test \"\$libtool_execute_magic\" != \"$magic\"; then
    2896       # Run the actual program with our arguments.
    2897 "
    2898         case $host in
    2899         # Backslashes separate directories on plain windows
    2900         *-*-mingw | *-*-os2* | *-cegcc*)
    2901           $ECHO "\
    2902       exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
    2903 "
    2904           ;;
    2905 
    2906         *)
    2907           $ECHO "\
    2908       exec \"\$progdir/\$program\" \${1+\"\$@\"}
    2909 "
    2910           ;;
    2911         esac
    2912         $ECHO "\
    2913       \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
    2914       exit 1
    2915     fi
    2916   else
    2917     # The program doesn't exist.
    2918     \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
    2919     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
    2920     $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
    2921     exit 1
    2922   fi
    2923 fi\
    2924 "
    2925 }
    2926 # end: func_emit_wrapper_part2
    29272930
    29282931
     
    29432946func_emit_wrapper ()
    29442947{
    2945         func_emit_wrapper_arg1=no
    2946         if test -n "$1" ; then
    2947           func_emit_wrapper_arg1=$1
     2948        func_emit_wrapper_arg1=${1-no}
     2949
     2950        $ECHO "\
     2951#! $SHELL
     2952
     2953# $output - temporary wrapper script for $objdir/$outputname
     2954# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
     2955#
     2956# The $output program cannot be directly executed until all the libtool
     2957# libraries that it depends on are installed.
     2958#
     2959# This wrapper script should never be moved out of the build directory.
     2960# If it is, it will not operate correctly.
     2961
     2962# Sed substitution that helps us do robust quoting.  It backslashifies
     2963# metacharacters that are still active within double-quoted strings.
     2964sed_quote_subst='$sed_quote_subst'
     2965
     2966# Be Bourne compatible
     2967if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
     2968  emulate sh
     2969  NULLCMD=:
     2970  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
     2971  # is contrary to our usage.  Disable this feature.
     2972  alias -g '\${1+\"\$@\"}'='\"\$@\"'
     2973  setopt NO_GLOB_SUBST
     2974else
     2975  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
     2976fi
     2977BIN_SH=xpg4; export BIN_SH # for Tru64
     2978DUALCASE=1; export DUALCASE # for MKS sh
     2979
     2980# The HP-UX ksh and POSIX shell print the target directory to stdout
     2981# if CDPATH is set.
     2982(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
     2983
     2984relink_command=\"$relink_command\"
     2985
     2986# This environment variable determines our operation mode.
     2987if test \"\$libtool_install_magic\" = \"$magic\"; then
     2988  # install mode needs the following variables:
     2989  generated_by_libtool_version='$macro_version'
     2990  notinst_deplibs='$notinst_deplibs'
     2991else
     2992  # When we are sourced in execute mode, \$file and \$ECHO are already set.
     2993  if test \"\$libtool_execute_magic\" != \"$magic\"; then
     2994    file=\"\$0\""
     2995
     2996    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
     2997    $ECHO "\
     2998
     2999# A function that is used when there is no print builtin or printf.
     3000func_fallback_echo ()
     3001{
     3002  eval 'cat <<_LTECHO_EOF
     3003\$1
     3004_LTECHO_EOF'
     3005}
     3006    ECHO=\"$qECHO\"
     3007  fi
     3008
     3009# Very basic option parsing. These options are (a) specific to
     3010# the libtool wrapper, (b) are identical between the wrapper
     3011# /script/ and the wrapper /executable/ which is used only on
     3012# windows platforms, and (c) all begin with the string "--lt-"
     3013# (application programs are unlikely to have options which match
     3014# this pattern).
     3015#
     3016# There are only two supported options: --lt-debug and
     3017# --lt-dump-script. There is, deliberately, no --lt-help.
     3018#
     3019# The first argument to this parsing function should be the
     3020# script's $0 value, followed by "$@".
     3021lt_option_debug=
     3022func_parse_lt_options ()
     3023{
     3024  lt_script_arg0=\$0
     3025  shift
     3026  for lt_opt
     3027  do
     3028    case \"\$lt_opt\" in
     3029    --lt-debug) lt_option_debug=1 ;;
     3030    --lt-dump-script)
     3031        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
     3032        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
     3033        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
     3034        cat \"\$lt_dump_D/\$lt_dump_F\"
     3035        exit 0
     3036      ;;
     3037    --lt-*)
     3038        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
     3039        exit 1
     3040      ;;
     3041    esac
     3042  done
     3043
     3044  # Print the debug banner immediately:
     3045  if test -n \"\$lt_option_debug\"; then
     3046    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
     3047  fi
     3048}
     3049
     3050# Used when --lt-debug. Prints its arguments to stdout
     3051# (redirection is the responsibility of the caller)
     3052func_lt_dump_args ()
     3053{
     3054  lt_dump_args_N=1;
     3055  for lt_arg
     3056  do
     3057    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
     3058    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
     3059  done
     3060}
     3061
     3062# Core function for launching the target application
     3063func_exec_program_core ()
     3064{
     3065"
     3066  case $host in
     3067  # Backslashes separate directories on plain windows
     3068  *-*-mingw | *-*-os2* | *-cegcc*)
     3069    $ECHO "\
     3070      if test -n \"\$lt_option_debug\"; then
     3071        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
     3072        func_lt_dump_args \${1+\"\$@\"} 1>&2
     3073      fi
     3074      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
     3075"
     3076    ;;
     3077
     3078  *)
     3079    $ECHO "\
     3080      if test -n \"\$lt_option_debug\"; then
     3081        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
     3082        func_lt_dump_args \${1+\"\$@\"} 1>&2
     3083      fi
     3084      exec \"\$progdir/\$program\" \${1+\"\$@\"}
     3085"
     3086    ;;
     3087  esac
     3088  $ECHO "\
     3089      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
     3090      exit 1
     3091}
     3092
     3093# A function to encapsulate launching the target application
     3094# Strips options in the --lt-* namespace from \$@ and
     3095# launches target application with the remaining arguments.
     3096func_exec_program ()
     3097{
     3098  for lt_wr_arg
     3099  do
     3100    case \$lt_wr_arg in
     3101    --lt-*) ;;
     3102    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
     3103    esac
     3104    shift
     3105  done
     3106  func_exec_program_core \${1+\"\$@\"}
     3107}
     3108
     3109  # Parse options
     3110  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
     3111
     3112  # Find the directory that this script lives in.
     3113  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
     3114  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
     3115
     3116  # Follow symbolic links until we get to the real thisdir.
     3117  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
     3118  while test -n \"\$file\"; do
     3119    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
     3120
     3121    # If there was a directory component, then change thisdir.
     3122    if test \"x\$destdir\" != \"x\$file\"; then
     3123      case \"\$destdir\" in
     3124      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
     3125      *) thisdir=\"\$thisdir/\$destdir\" ;;
     3126      esac
     3127    fi
     3128
     3129    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
     3130    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
     3131  done
     3132
     3133  # Usually 'no', except on cygwin/mingw when embedded into
     3134  # the cwrapper.
     3135  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
     3136  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
     3137    # special case for '.'
     3138    if test \"\$thisdir\" = \".\"; then
     3139      thisdir=\`pwd\`
     3140    fi
     3141    # remove .libs from thisdir
     3142    case \"\$thisdir\" in
     3143    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
     3144    $objdir )   thisdir=. ;;
     3145    esac
     3146  fi
     3147
     3148  # Try to get the absolute directory name.
     3149  absdir=\`cd \"\$thisdir\" && pwd\`
     3150  test -n \"\$absdir\" && thisdir=\"\$absdir\"
     3151"
     3152
     3153        if test "$fast_install" = yes; then
     3154          $ECHO "\
     3155  program=lt-'$outputname'$exeext
     3156  progdir=\"\$thisdir/$objdir\"
     3157
     3158  if test ! -f \"\$progdir/\$program\" ||
     3159     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
     3160       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
     3161
     3162    file=\"\$\$-\$program\"
     3163
     3164    if test ! -d \"\$progdir\"; then
     3165      $MKDIR \"\$progdir\"
     3166    else
     3167      $RM \"\$progdir/\$file\"
     3168    fi"
     3169
     3170          $ECHO "\
     3171
     3172    # relink executable if necessary
     3173    if test -n \"\$relink_command\"; then
     3174      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
     3175      else
     3176        $ECHO \"\$relink_command_output\" >&2
     3177        $RM \"\$progdir/\$file\"
     3178        exit 1
     3179      fi
     3180    fi
     3181
     3182    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
     3183    { $RM \"\$progdir/\$program\";
     3184      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
     3185    $RM \"\$progdir/\$file\"
     3186  fi"
     3187        else
     3188          $ECHO "\
     3189  program='$outputname'
     3190  progdir=\"\$thisdir/$objdir\"
     3191"
    29483192        fi
    29493193
    2950         # split this up so that func_emit_cwrapperexe_src
    2951         # can call each part independently.
    2952         func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
    2953         func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
     3194        $ECHO "\
     3195
     3196  if test -f \"\$progdir/\$program\"; then"
     3197
     3198        # Export our shlibpath_var if we have one.
     3199        if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
     3200          $ECHO "\
     3201    # Add our own library path to $shlibpath_var
     3202    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
     3203
     3204    # Some systems cannot cope with colon-terminated $shlibpath_var
     3205    # The second colon is a workaround for a bug in BeOS R4 sed
     3206    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
     3207
     3208    export $shlibpath_var
     3209"
     3210        fi
     3211
     3212        # fixup the dll searchpath if we need to.
     3213        if test -n "$dllsearchpath"; then
     3214          $ECHO "\
     3215    # Add the dll search path components to the executable PATH
     3216    PATH=$dllsearchpath:\$PATH
     3217"
     3218        fi
     3219
     3220        $ECHO "\
     3221    if test \"\$libtool_execute_magic\" != \"$magic\"; then
     3222      # Run the actual program with our arguments.
     3223      func_exec_program \${1+\"\$@\"}
     3224    fi
     3225  else
     3226    # The program doesn't exist.
     3227    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
     3228    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
     3229    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     3230    exit 1
     3231  fi
     3232fi\
     3233"
    29543234}
    29553235
     
    29793259{
    29803260  func_to_host_path_result="$1"
    2981   if test -n "$1" ; then
     3261  if test -n "$1"; then
    29823262    case $host in
    29833263      *mingw* )
     
    29863266          *mingw* ) # actually, msys
    29873267            # awkward: cmd appends spaces to result
    2988             lt_sed_strip_trailing_spaces="s/[ ]*\$//"
    2989             func_to_host_path_tmp1=`( cmd //c echo "$1" |\
    2990               $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
    2991             func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
    2992               $SED -e "$lt_sed_naive_backslashify"`
     3268            func_to_host_path_result=`( cmd //c echo "$1" ) 2>/dev/null |
     3269              $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
    29933270            ;;
    29943271          *cygwin* )
    2995             func_to_host_path_tmp1=`cygpath -w "$1"`
    2996             func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
    2997               $SED -e "$lt_sed_naive_backslashify"`
     3272            func_to_host_path_result=`cygpath -w "$1" |
     3273              $SED -e "$lt_sed_naive_backslashify"`
    29983274            ;;
    29993275          * )
     
    30073283            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
    30083284            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
    3009               func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
     3285              func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |
    30103286                $SED -e "$lt_sed_naive_backslashify"`
    30113287            else
    30123288              # Allow warning below.
    3013               func_to_host_path_result=""
     3289              func_to_host_path_result=
    30143290            fi
    30153291            ;;
     
    30173293        if test -z "$func_to_host_path_result" ; then
    30183294          func_error "Could not determine host path corresponding to"
    3019           func_error "  '$1'"
     3295          func_error "  \`$1'"
    30203296          func_error "Continuing, but uninstalled executables may not work."
    30213297          # Fallback:
     
    30503326{
    30513327  func_to_host_pathlist_result="$1"
    3052   if test -n "$1" ; then
     3328  if test -n "$1"; then
    30533329    case $host in
    30543330      *mingw* )
     
    30573333        # ARG. msys behavior is inconsistent here, cygpath turns them
    30583334        # into '.;' and ';.', and winepath ignores them completely.
    3059         func_to_host_pathlist_tmp2="$1"
    3060         # Once set for this call, this variable should not be
    3061         # reassigned. It is used in tha fallback case.
    3062         func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
    3063           $SED -e 's|^:*||' -e 's|:*$||'`
     3335        func_stripname : : "$1"
     3336        func_to_host_pathlist_tmp1=$func_stripname_result
    30643337        case $build in
    30653338          *mingw* ) # Actually, msys.
    30663339            # Awkward: cmd appends spaces to result.
    3067             lt_sed_strip_trailing_spaces="s/[ ]*\$//"
    3068             func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
    3069               $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
    3070             func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
    3071               $SED -e "$lt_sed_naive_backslashify"`
     3340            func_to_host_pathlist_result=`
     3341              ( cmd //c echo "$func_to_host_pathlist_tmp1" ) 2>/dev/null |
     3342              $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
    30723343            ;;
    30733344          *cygwin* )
    3074             func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
    3075             func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
     3345            func_to_host_pathlist_result=`cygpath -w -p "$func_to_host_pathlist_tmp1" |
    30763346              $SED -e "$lt_sed_naive_backslashify"`
    30773347            ;;
     
    30893359                    func_to_host_pathlist_result="$func_to_host_path_result"
    30903360                  else
    3091                     func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
     3361                    func_append func_to_host_pathlist_result ";$func_to_host_path_result"
    30923362                  fi
    30933363                fi
    30943364              fi
    3095               IFS=:
    30963365            done
    30973366            IFS=$func_to_host_pathlist_oldIFS
    30983367            ;;
    30993368        esac
    3100         if test -z "$func_to_host_pathlist_result" ; then
     3369        if test -z "$func_to_host_pathlist_result"; then
    31013370          func_error "Could not determine the host path(s) corresponding to"
    3102           func_error "  '$1'"
     3371          func_error "  \`$1'"
    31033372          func_error "Continuing, but uninstalled executables may not work."
    31043373          # Fallback. This may break if $1 contains DOS-style drive
     
    31173386        esac
    31183387        case "$1" in
    3119           *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
     3388          *: ) func_append func_to_host_pathlist_result ";"
    31203389            ;;
    31213390        esac
     
    31423411   This wrapper executable should never be moved out of the build directory.
    31433412   If it is, it will not operate correctly.
    3144 
    3145    Currently, it simply execs the wrapper *script* "$SHELL $output",
    3146    but could eventually absorb all of the scripts functionality and
    3147    exec $objdir/$outputname directly.
    31483413*/
    31493414EOF
    31503415            cat <<"EOF"
     3416#ifdef _MSC_VER
     3417# define _CRT_SECURE_NO_DEPRECATE 1
     3418#endif
    31513419#include <stdio.h>
    31523420#include <stdlib.h>
     
    31553423# include <process.h>
    31563424# include <io.h>
    3157 # define setmode _setmode
    31583425#else
    31593426# include <unistd.h>
     
    31613428# ifdef __CYGWIN__
    31623429#  include <io.h>
    3163 #  define HAVE_SETENV
    3164 #  ifdef __STRICT_ANSI__
    3165 char *realpath (const char *, char *);
    3166 int putenv (char *);
    3167 int setenv (const char *, const char *, int);
    3168 #  endif
    31693430# endif
    31703431#endif
     
    31783439#include <sys/stat.h>
    31793440
     3441/* declarations of non-ANSI functions */
     3442#if defined(__MINGW32__)
     3443# ifdef __STRICT_ANSI__
     3444int _putenv (const char *);
     3445# endif
     3446#elif defined(__CYGWIN__)
     3447# ifdef __STRICT_ANSI__
     3448char *realpath (const char *, char *);
     3449int putenv (char *);
     3450int setenv (const char *, const char *, int);
     3451# endif
     3452/* #elif defined (other platforms) ... */
     3453#endif
     3454
     3455/* portability defines, excluding path handling macros */
     3456#if defined(_MSC_VER)
     3457# define setmode _setmode
     3458# define stat    _stat
     3459# define chmod   _chmod
     3460# define getcwd  _getcwd
     3461# define putenv  _putenv
     3462# define S_IXUSR _S_IEXEC
     3463# ifndef _INTPTR_T_DEFINED
     3464#  define _INTPTR_T_DEFINED
     3465#  define intptr_t int
     3466# endif
     3467#elif defined(__MINGW32__)
     3468# define setmode _setmode
     3469# define stat    _stat
     3470# define chmod   _chmod
     3471# define getcwd  _getcwd
     3472# define putenv  _putenv
     3473#elif defined(__CYGWIN__)
     3474# define HAVE_SETENV
     3475# define FOPEN_WB "wb"
     3476/* #elif defined (other platforms) ... */
     3477#endif
     3478
    31803479#if defined(PATH_MAX)
    31813480# define LT_PATHMAX PATH_MAX
     
    31933492#endif
    31943493
    3195 #ifdef _MSC_VER
    3196 # define S_IXUSR _S_IEXEC
    3197 # define stat _stat
    3198 # ifndef _INTPTR_T_DEFINED
    3199 #  define intptr_t int
    3200 # endif
    3201 #endif
    3202 
     3494/* path handling portability macros */
    32033495#ifndef DIR_SEPARATOR
    32043496# define DIR_SEPARATOR '/'
     
    32313523#endif /* PATH_SEPARATOR_2 */
    32323524
    3233 #ifdef __CYGWIN__
    3234 # define FOPEN_WB "wb"
    3235 #endif
    3236 
    32373525#ifndef FOPEN_WB
    32383526# define FOPEN_WB "w"
     
    32473535} while (0)
    32483536
    3249 #undef LTWRAPPER_DEBUGPRINTF
    3250 #if defined DEBUGWRAPPER
    3251 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
    3252 static void
    3253 ltwrapper_debugprintf (const char *fmt, ...)
    3254 {
    3255     va_list args;
    3256     va_start (args, fmt);
    3257     (void) vfprintf (stderr, fmt, args);
    3258     va_end (args);
    3259 }
     3537#if defined(LT_DEBUGWRAPPER)
     3538static int lt_debug = 1;
    32603539#else
    3261 # define LTWRAPPER_DEBUGPRINTF(args)
     3540static int lt_debug = 0;
    32623541#endif
    32633542
    3264 const char *program_name = NULL;
     3543const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
    32653544
    32663545void *xmalloc (size_t num);
     
    32723551int check_executable (const char *path);
    32733552char *strendzap (char *str, const char *pat);
    3274 void lt_fatal (const char *message, ...);
     3553void lt_debugprintf (const char *file, int line, const char *fmt, ...);
     3554void lt_fatal (const char *file, int line, const char *message, ...);
     3555static const char *nonnull (const char *s);
     3556static const char *nonempty (const char *s);
    32753557void lt_setenv (const char *name, const char *value);
    32763558char *lt_extend_str (const char *orig_value, const char *add, int to_end);
    3277 void lt_opt_process_env_set (const char *arg);
    3278 void lt_opt_process_env_prepend (const char *arg);
    3279 void lt_opt_process_env_append (const char *arg);
    3280 int lt_split_name_value (const char *arg, char** name, char** value);
    32813559void lt_update_exe_path (const char *name, const char *value);
    32823560void lt_update_lib_path (const char *name, const char *value);
    3283 
    3284 static const char *script_text_part1 =
     3561char **prepare_spawn (char **argv);
     3562void lt_dump_script (FILE *f);
    32853563EOF
    3286 
    3287             func_emit_wrapper_part1 yes |
    3288                 $SED -e 's/\([\\"]\)/\\\1/g' \
    3289                      -e 's/^/  "/' -e 's/$/\\n"/'
    3290             echo ";"
    3291             cat <<EOF
    3292 
    3293 static const char *script_text_part2 =
    3294 EOF
    3295             func_emit_wrapper_part2 yes |
    3296                 $SED -e 's/\([\\"]\)/\\\1/g' \
    3297                      -e 's/^/  "/' -e 's/$/\\n"/'
    3298             echo ";"
    32993564
    33003565            cat <<EOF
     
    33413606
    33423607#define LTWRAPPER_OPTION_PREFIX         "--lt-"
    3343 #define LTWRAPPER_OPTION_PREFIX_LENGTH  5
    3344 
    3345 static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
     3608
    33463609static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
    3347 
    33483610static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
    3349 
    3350 static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
    3351 static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
    3352   /* argument is putenv-style "foo=bar", value of foo is set to bar */
    3353 
    3354 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
    3355 static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
    3356   /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
    3357 
    3358 static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
    3359 static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
    3360   /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
     3611static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
    33613612
    33623613int
     
    33753626
    33763627  program_name = (char *) xstrdup (base_name (argv[0]));
    3377   LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
    3378   LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
    3379 
    3380   /* very simple arg parsing; don't want to rely on getopt */
     3628  newargz = XMALLOC (char *, argc + 1);
     3629
     3630  /* very simple arg parsing; don't want to rely on getopt
     3631   * also, copy all non cwrapper options to newargz, except
     3632   * argz[0], which is handled differently
     3633   */
     3634  newargc=0;
    33813635  for (i = 1; i < argc; i++)
    33823636    {
     
    33923646
    33933647            cat <<"EOF"
    3394           printf ("%s", script_text_part1);
    3395           printf ("%s", script_text_part2);
     3648          lt_dump_script (stdout);
    33963649          return 0;
    33973650        }
     3651      if (strcmp (argv[i], debug_opt) == 0)
     3652        {
     3653          lt_debug = 1;
     3654          continue;
     3655        }
     3656      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
     3657        {
     3658          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
     3659             namespace, but it is not one of the ones we know about and
     3660             have already dealt with, above (inluding dump-script), then
     3661             report an error. Otherwise, targets might begin to believe
     3662             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
     3663             namespace. The first time any user complains about this, we'll
     3664             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
     3665             or a configure.ac-settable value.
     3666           */
     3667          lt_fatal (__FILE__, __LINE__,
     3668                    "unrecognized %s option: '%s'",
     3669                    ltwrapper_option_prefix, argv[i]);
     3670        }
     3671      /* otherwise ... */
     3672      newargz[++newargc] = xstrdup (argv[i]);
    33983673    }
    3399 
    3400   newargz = XMALLOC (char *, argc + 1);
     3674  newargz[++newargc] = NULL;
     3675
     3676EOF
     3677            cat <<EOF
     3678  /* The GNU banner must be the first non-error debug message */
     3679  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
     3680EOF
     3681            cat <<"EOF"
     3682  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
     3683  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
     3684
    34013685  tmp_pathspec = find_executable (argv[0]);
    34023686  if (tmp_pathspec == NULL)
    3403     lt_fatal ("Couldn't find %s", argv[0]);
    3404   LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
    3405                           tmp_pathspec));
     3687    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
     3688  lt_debugprintf (__FILE__, __LINE__,
     3689                  "(main) found exe (before symlink chase) at: %s\n",
     3690                  tmp_pathspec);
    34063691
    34073692  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
    3408   LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
    3409                           actual_cwrapper_path));
     3693  lt_debugprintf (__FILE__, __LINE__,
     3694                  "(main) found exe (after symlink chase) at: %s\n",
     3695                  actual_cwrapper_path);
    34103696  XFREE (tmp_pathspec);
    34113697
    3412   actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
     3698  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
    34133699  strendzap (actual_cwrapper_path, actual_cwrapper_name);
    34143700
     
    34283714  tmp_pathspec = 0;
    34293715
    3430   LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
    3431                           target_name));
     3716  lt_debugprintf (__FILE__, __LINE__,
     3717                  "(main) libtool target name: %s\n",
     3718                  target_name);
    34323719EOF
    34333720
     
    34823769  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
    34833770
    3484   newargc=0;
    3485   for (i = 1; i < argc; i++)
    3486     {
    3487       if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
    3488         {
    3489           if (argv[i][env_set_opt_len] == '=')
    3490             {
    3491               const char *p = argv[i] + env_set_opt_len + 1;
    3492               lt_opt_process_env_set (p);
    3493             }
    3494           else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
    3495             {
    3496               lt_opt_process_env_set (argv[++i]); /* don't copy */
    3497             }
    3498           else
    3499             lt_fatal ("%s missing required argument", env_set_opt);
    3500           continue;
    3501         }
    3502       if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
    3503         {
    3504           if (argv[i][env_prepend_opt_len] == '=')
    3505             {
    3506               const char *p = argv[i] + env_prepend_opt_len + 1;
    3507               lt_opt_process_env_prepend (p);
    3508             }
    3509           else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
    3510             {
    3511               lt_opt_process_env_prepend (argv[++i]); /* don't copy */
    3512             }
    3513           else
    3514             lt_fatal ("%s missing required argument", env_prepend_opt);
    3515           continue;
    3516         }
    3517       if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
    3518         {
    3519           if (argv[i][env_append_opt_len] == '=')
    3520             {
    3521               const char *p = argv[i] + env_append_opt_len + 1;
    3522               lt_opt_process_env_append (p);
    3523             }
    3524           else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
    3525             {
    3526               lt_opt_process_env_append (argv[++i]); /* don't copy */
    3527             }
    3528           else
    3529             lt_fatal ("%s missing required argument", env_append_opt);
    3530           continue;
    3531         }
    3532       if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
    3533         {
    3534           /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
    3535              namespace, but it is not one of the ones we know about and
    3536              have already dealt with, above (inluding dump-script), then
    3537              report an error. Otherwise, targets might begin to believe
    3538              they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
    3539              namespace. The first time any user complains about this, we'll
    3540              need to make LTWRAPPER_OPTION_PREFIX a configure-time option
    3541              or a configure.ac-settable value.
    3542            */
    3543           lt_fatal ("Unrecognized option in %s namespace: '%s'",
    3544                     ltwrapper_option_prefix, argv[i]);
    3545         }
    3546       /* otherwise ... */
    3547       newargz[++newargc] = xstrdup (argv[i]);
    3548     }
    3549   newargz[++newargc] = NULL;
    3550 
    3551   LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
     3771  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
     3772                  nonnull (lt_argv_zero));
    35523773  for (i = 0; i < newargc; i++)
    35533774    {
    3554       LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
     3775      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
     3776                      i, nonnull (newargz[i]));
    35553777    }
    35563778
     
    35613783                cat <<"EOF"
    35623784  /* execv doesn't actually work on mingw as expected on unix */
     3785  newargz = prepare_spawn (newargz);
    35633786  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
    35643787  if (rval == -1)
    35653788    {
    35663789      /* failed to start process */
    3567       LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
     3790      lt_debugprintf (__FILE__, __LINE__,
     3791                      "(main) failed to launch target \"%s\": %s\n",
     3792                      lt_argv_zero, nonnull (strerror (errno)));
    35683793      return 127;
    35693794    }
     
    35873812  void *p = (void *) malloc (num);
    35883813  if (!p)
    3589     lt_fatal ("Memory exhausted");
     3814    lt_fatal (__FILE__, __LINE__, "memory exhausted");
    35903815
    35913816  return p;
     
    36213846  struct stat st;
    36223847
    3623   LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
    3624                           path ? (*path ? path : "EMPTY!") : "NULL!"));
     3848  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
     3849                  nonempty (path));
    36253850  if ((!path) || (!*path))
    36263851    return 0;
     
    36393864  struct stat st;
    36403865
    3641   LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
    3642                           path ? (*path ? path : "EMPTY!") : "NULL!"));
     3866  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
     3867                  nonempty (path));
    36433868  if ((!path) || (!*path))
    36443869    return 0;
     
    36663891  char *concat_name;
    36673892
    3668   LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
    3669                           wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
     3893  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
     3894                  nonempty (wrapper));
    36703895
    36713896  if ((wrapper == NULL) || (*wrapper == '\0'))
     
    37203945                  /* empty path: current directory */
    37213946                  if (getcwd (tmp, LT_PATHMAX) == NULL)
    3722                     lt_fatal ("getcwd failed");
     3947                    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
     3948                              nonnull (strerror (errno)));
    37233949                  tmp_len = strlen (tmp);
    37243950                  concat_name =
     
    37453971  /* Relative path | not found in path: prepend cwd */
    37463972  if (getcwd (tmp, LT_PATHMAX) == NULL)
    3747     lt_fatal ("getcwd failed");
     3973    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
     3974              nonnull (strerror (errno)));
    37483975  tmp_len = strlen (tmp);
    37493976  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
     
    37713998  while (strlen (tmp_pathspec) && !has_symlinks)
    37723999    {
    3773       LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
    3774                               tmp_pathspec));
     4000      lt_debugprintf (__FILE__, __LINE__,
     4001                      "checking path component for symlinks: %s\n",
     4002                      tmp_pathspec);
    37754003      if (lstat (tmp_pathspec, &s) == 0)
    37764004        {
     
    37944022      else
    37954023        {
    3796           char *errstr = strerror (errno);
    3797           lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
     4024          lt_fatal (__FILE__, __LINE__,
     4025                    "error accessing file \"%s\": %s",
     4026                    tmp_pathspec, nonnull (strerror (errno)));
    37984027        }
    37994028    }
     
    38084037  if (tmp_pathspec == 0)
    38094038    {
    3810       lt_fatal ("Could not follow symlinks for %s", pathspec);
     4039      lt_fatal (__FILE__, __LINE__,
     4040                "could not follow symlinks for %s", pathspec);
    38114041    }
    38124042  return xstrdup (tmp_pathspec);
     
    38344064}
    38354065
     4066void
     4067lt_debugprintf (const char *file, int line, const char *fmt, ...)
     4068{
     4069  va_list args;
     4070  if (lt_debug)
     4071    {
     4072      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
     4073      va_start (args, fmt);
     4074      (void) vfprintf (stderr, fmt, args);
     4075      va_end (args);
     4076    }
     4077}
     4078
    38364079static void
    3837 lt_error_core (int exit_status, const char *mode,
     4080lt_error_core (int exit_status, const char *file,
     4081               int line, const char *mode,
    38384082               const char *message, va_list ap)
    38394083{
    3840   fprintf (stderr, "%s: %s: ", program_name, mode);
     4084  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
    38414085  vfprintf (stderr, message, ap);
    38424086  fprintf (stderr, ".\n");
     
    38474091
    38484092void
    3849 lt_fatal (const char *message, ...)
     4093lt_fatal (const char *file, int line, const char *message, ...)
    38504094{
    38514095  va_list ap;
    38524096  va_start (ap, message);
    3853   lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
     4097  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
    38544098  va_end (ap);
     4099}
     4100
     4101static const char *
     4102nonnull (const char *s)
     4103{
     4104  return s ? s : "(null)";
     4105}
     4106
     4107static const char *
     4108nonempty (const char *s)
     4109{
     4110  return (s && !*s) ? "(empty)" : nonnull (s);
    38554111}
    38564112
     
    38584114lt_setenv (const char *name, const char *value)
    38594115{
    3860   LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
    3861                           (name ? name : "<NULL>"),
    3862                           (value ? value : "<NULL>")));
     4116  lt_debugprintf (__FILE__, __LINE__,
     4117                  "(lt_setenv) setting '%s' to '%s'\n",
     4118                  nonnull (name), nonnull (value));
    38634119  {
    38644120#ifdef HAVE_SETENV
     
    39054161}
    39064162
    3907 int
    3908 lt_split_name_value (const char *arg, char** name, char** value)
    3909 {
    3910   const char *p;
    3911   int len;
    3912   if (!arg || !*arg)
    3913     return 1;
    3914 
    3915   p = strchr (arg, (int)'=');
    3916 
    3917   if (!p)
    3918     return 1;
    3919 
    3920   *value = xstrdup (++p);
    3921 
    3922   len = strlen (arg) - strlen (*value);
    3923   *name = XMALLOC (char, len);
    3924   strncpy (*name, arg, len-1);
    3925   (*name)[len - 1] = '\0';
    3926 
    3927   return 0;
    3928 }
    3929 
    3930 void
    3931 lt_opt_process_env_set (const char *arg)
    3932 {
    3933   char *name = NULL;
    3934   char *value = NULL;
    3935 
    3936   if (lt_split_name_value (arg, &name, &value) != 0)
    3937     {
    3938       XFREE (name);
    3939       XFREE (value);
    3940       lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
    3941     }
    3942 
    3943   lt_setenv (name, value);
    3944   XFREE (name);
    3945   XFREE (value);
    3946 }
    3947 
    3948 void
    3949 lt_opt_process_env_prepend (const char *arg)
    3950 {
    3951   char *name = NULL;
    3952   char *value = NULL;
    3953   char *new_value = NULL;
    3954 
    3955   if (lt_split_name_value (arg, &name, &value) != 0)
    3956     {
    3957       XFREE (name);
    3958       XFREE (value);
    3959       lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
    3960     }
    3961 
    3962   new_value = lt_extend_str (getenv (name), value, 0);
    3963   lt_setenv (name, new_value);
    3964   XFREE (new_value);
    3965   XFREE (name);
    3966   XFREE (value);
    3967 }
    3968 
    3969 void
    3970 lt_opt_process_env_append (const char *arg)
    3971 {
    3972   char *name = NULL;
    3973   char *value = NULL;
    3974   char *new_value = NULL;
    3975 
    3976   if (lt_split_name_value (arg, &name, &value) != 0)
    3977     {
    3978       XFREE (name);
    3979       XFREE (value);
    3980       lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
    3981     }
    3982 
    3983   new_value = lt_extend_str (getenv (name), value, 1);
    3984   lt_setenv (name, new_value);
    3985   XFREE (new_value);
    3986   XFREE (name);
    3987   XFREE (value);
    3988 }
    3989 
    39904163void
    39914164lt_update_exe_path (const char *name, const char *value)
    39924165{
    3993   LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
    3994                           (name ? name : "<NULL>"),
    3995                           (value ? value : "<NULL>")));
     4166  lt_debugprintf (__FILE__, __LINE__,
     4167                  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
     4168                  nonnull (name), nonnull (value));
    39964169
    39974170  if (name && *name && value && *value)
     
    40124185lt_update_lib_path (const char *name, const char *value)
    40134186{
    4014   LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
    4015                           (name ? name : "<NULL>"),
    4016                           (value ? value : "<NULL>")));
     4187  lt_debugprintf (__FILE__, __LINE__,
     4188                  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
     4189                  nonnull (name), nonnull (value));
    40174190
    40184191  if (name && *name && value && *value)
     
    40244197}
    40254198
    4026 
     4199EOF
     4200            case $host_os in
     4201              mingw*)
     4202                cat <<"EOF"
     4203
     4204/* Prepares an argument vector before calling spawn().
     4205   Note that spawn() does not by itself call the command interpreter
     4206     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
     4207      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
     4208         GetVersionEx(&v);
     4209         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
     4210      }) ? "cmd.exe" : "command.com").
     4211   Instead it simply concatenates the arguments, separated by ' ', and calls
     4212   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
     4213   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
     4214   special way:
     4215   - Space and tab are interpreted as delimiters. They are not treated as
     4216     delimiters if they are surrounded by double quotes: "...".
     4217   - Unescaped double quotes are removed from the input. Their only effect is
     4218     that within double quotes, space and tab are treated like normal
     4219     characters.
     4220   - Backslashes not followed by double quotes are not special.
     4221   - But 2*n+1 backslashes followed by a double quote become
     4222     n backslashes followed by a double quote (n >= 0):
     4223       \" -> "
     4224       \\\" -> \"
     4225       \\\\\" -> \\"
     4226 */
     4227#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
     4228#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
     4229char **
     4230prepare_spawn (char **argv)
     4231{
     4232  size_t argc;
     4233  char **new_argv;
     4234  size_t i;
     4235
     4236  /* Count number of arguments.  */
     4237  for (argc = 0; argv[argc] != NULL; argc++)
     4238    ;
     4239
     4240  /* Allocate new argument vector.  */
     4241  new_argv = XMALLOC (char *, argc + 1);
     4242
     4243  /* Put quoted arguments into the new argument vector.  */
     4244  for (i = 0; i < argc; i++)
     4245    {
     4246      const char *string = argv[i];
     4247
     4248      if (string[0] == '\0')
     4249        new_argv[i] = xstrdup ("\"\"");
     4250      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
     4251        {
     4252          int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
     4253          size_t length;
     4254          unsigned int backslashes;
     4255          const char *s;
     4256          char *quoted_string;
     4257          char *p;
     4258
     4259          length = 0;
     4260          backslashes = 0;
     4261          if (quote_around)
     4262            length++;
     4263          for (s = string; *s != '\0'; s++)
     4264            {
     4265              char c = *s;
     4266              if (c == '"')
     4267                length += backslashes + 1;
     4268              length++;
     4269              if (c == '\\')
     4270                backslashes++;
     4271              else
     4272                backslashes = 0;
     4273            }
     4274          if (quote_around)
     4275            length += backslashes + 1;
     4276
     4277          quoted_string = XMALLOC (char, length + 1);
     4278
     4279          p = quoted_string;
     4280          backslashes = 0;
     4281          if (quote_around)
     4282            *p++ = '"';
     4283          for (s = string; *s != '\0'; s++)
     4284            {
     4285              char c = *s;
     4286              if (c == '"')
     4287                {
     4288                  unsigned int j;
     4289                  for (j = backslashes + 1; j > 0; j--)
     4290                    *p++ = '\\';
     4291                }
     4292              *p++ = c;
     4293              if (c == '\\')
     4294                backslashes++;
     4295              else
     4296                backslashes = 0;
     4297            }
     4298          if (quote_around)
     4299            {
     4300              unsigned int j;
     4301              for (j = backslashes; j > 0; j--)
     4302                *p++ = '\\';
     4303              *p++ = '"';
     4304            }
     4305          *p = '\0';
     4306
     4307          new_argv[i] = quoted_string;
     4308        }
     4309      else
     4310        new_argv[i] = (char *) string;
     4311    }
     4312  new_argv[argc] = NULL;
     4313
     4314  return new_argv;
     4315}
     4316EOF
     4317                ;;
     4318            esac
     4319
     4320            cat <<"EOF"
     4321void lt_dump_script (FILE* f)
     4322{
     4323EOF
     4324            func_emit_wrapper yes |
     4325              $SED -e 's/\([\\"]\)/\\\1/g' \
     4326                   -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
     4327
     4328            cat <<"EOF"
     4329}
    40274330EOF
    40284331}
    40294332# end: func_emit_cwrapperexe_src
     4333
     4334# func_win32_import_lib_p ARG
     4335# True if ARG is an import lib, as indicated by $file_magic_cmd
     4336func_win32_import_lib_p ()
     4337{
     4338    $opt_debug
     4339    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     4340    *import*) : ;;
     4341    *) false ;;
     4342    esac
     4343}
    40304344
    40314345# func_mode_link arg...
     
    40734387
    40744388    avoid_version=no
     4389    bindir=
    40754390    dlfiles=
    40764391    dlprefiles=
     
    41654480
    41664481        case $prev in
     4482        bindir)
     4483          bindir="$arg"
     4484          prev=
     4485          continue
     4486          ;;
    41674487        dlfiles|dlprefiles)
    41684488          if test "$preload" = no; then
     
    44264746        ;;
    44274747
     4748      -bindir)
     4749        prev=bindir
     4750        continue
     4751        ;;
     4752
    44284753      -dlopen)
    44294754        prev=dlfiles
     
    45044829        case $host in
    45054830        *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
    4506           testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
     4831          testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
    45074832          case :$dllsearchpath: in
    45084833          *":$dir:"*) ;;
     
    45234848        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
    45244849          case $host in
    4525           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
     4850          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
    45264851            # These systems don't actually have a C or math library (as such)
    45274852            continue
     
    47095034          IFS="$save_ifs"
    47105035          func_quote_for_eval "$flag"
    4711           arg="$arg $wl$func_quote_for_eval_result"
     5036          arg="$arg $func_quote_for_eval_result"
    47125037          compiler_flags="$compiler_flags $func_quote_for_eval_result"
    47135038        done
     
    47555080        ;;
    47565081
    4757       # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
    4758       # -r[0-9][0-9]* specifies the processor on the SGI compiler
    4759       # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
    4760       # +DA*, +DD* enable 64-bit mode on the HP compiler
    4761       # -q* pass through compiler args for the IBM compiler
    4762       # -m*, -t[45]*, -txscale* pass through architecture-specific
    4763       # compiler args for GCC
    4764       # -F/path gives path to uninstalled frameworks, gcc on darwin
    4765       # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
    4766       # @file GCC response files
     5082      # Flags to be passed through unchanged, with rationale:
     5083      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
     5084      # -r[0-9][0-9]*        specify processor for the SGI compiler
     5085      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
     5086      # +DA*, +DD*           enable 64-bit mode for the HP compiler
     5087      # -q*                  compiler args for the IBM compiler
     5088      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
     5089      # -F/path              path to uninstalled frameworks, gcc on darwin
     5090      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
     5091      # @file                GCC response files
     5092      # -tp=*                Portland pgcc target processor selection
    47675093      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
    4768       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
     5094      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*)
    47695095        func_quote_for_eval "$arg"
    47705096        arg="$func_quote_for_eval_result"
     
    49265252    if test -n "$shlibpath_var"; then
    49275253      # get the directories listed in $shlibpath_var
    4928       eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
     5254      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
    49295255    else
    49305256      shlib_search_path=
     
    50345360        dlopen) libs="$dlfiles" ;;
    50355361        dlpreopen) libs="$dlprefiles" ;;
    5036         link)
    5037           libs="$deplibs %DEPLIBS%"
    5038           test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
    5039           ;;
     5362        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
    50405363        esac
    50415364      fi
     
    50525375          # has declared as weak libs
    50535376          for deplib in $dependency_libs; do
    5054             deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
     5377            func_basename "$deplib"
     5378            deplib_base=$func_basename_result
    50555379            case " $weak_libs " in
    50565380            *" $deplib_base "*) ;;
     
    52315555                  set dummy $deplibs_check_method; shift
    52325556                  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
    5233                   if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
     5557                  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
    52345558                    | $EGREP "$match_pattern_regex" > /dev/null; then
    52355559                    valid_a_lib=yes
     
    52415565              esac
    52425566              if test "$valid_a_lib" != yes; then
    5243                 $ECHO
     5567                echo
    52445568                $ECHO "*** Warning: Trying to link with static lib archive $deplib."
    5245                 $ECHO "*** I have the capability to make that library automatically link in when"
    5246                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    5247                 $ECHO "*** shared version of the library, which you do not appear to have"
    5248                 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
    5249                 $ECHO "*** that it is just a static archive that I should not use here."
     5569                echo "*** I have the capability to make that library automatically link in when"
     5570                echo "*** you link to this library.  But I can only do this if you have a"
     5571                echo "*** shared version of the library, which you do not appear to have"
     5572                echo "*** because the file extensions .$libext of this argument makes me believe"
     5573                echo "*** that it is just a static archive that I should not use here."
    52505574              else
    5251                 $ECHO
     5575                echo
    52525576                $ECHO "*** Warning: Linking the shared library $output against the"
    52535577                $ECHO "*** static library $deplib is not portable!"
     
    53225646        # Convert "-framework foo" to "foo.ltframework"
    53235647        if test -n "$inherited_linker_flags"; then
    5324           tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
     5648          tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
    53255649          for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
    53265650            case " $new_inherited_linker_flags " in
     
    53305654          done
    53315655        fi
    5332         dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     5656        dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    53335657        if test "$linkmode,$pass" = "lib,link" ||
    53345658           test "$linkmode,$pass" = "prog,scan" ||
     
    53485672            convenience="$convenience $ladir/$objdir/$old_library"
    53495673            old_convenience="$old_convenience $ladir/$objdir/$old_library"
    5350             tmp_libs=
    5351             for deplib in $dependency_libs; do
    5352               deplibs="$deplib $deplibs"
    5353               if $opt_duplicate_deps ; then
    5354                 case "$tmp_libs " in
    5355                 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
    5356                 esac
    5357               fi
    5358               tmp_libs="$tmp_libs $deplib"
    5359             done
    53605674          elif test "$linkmode" != prog && test "$linkmode" != lib; then
    53615675            func_fatal_error "\`$lib' is not a convenience library"
    53625676          fi
     5677          tmp_libs=
     5678          for deplib in $dependency_libs; do
     5679            deplibs="$deplib $deplibs"
     5680            if $opt_duplicate_deps ; then
     5681              case "$tmp_libs " in
     5682              *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     5683              esac
     5684            fi
     5685            tmp_libs="$tmp_libs $deplib"
     5686          done
    53635687          continue
    53645688        fi # $pass = conv
     
    55845908          done
    55855909          if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
    5586             $ECHO
     5910            echo
    55875911            if test "$linkmode" = prog; then
    55885912              $ECHO "*** Warning: Linking the executable $output against the loadable module"
     
    56876011                        $ECHO "*** Warning: lib $linklib is a module, not a shared library"
    56886012                        if test -z "$old_library" ; then
    5689                           $ECHO
    5690                           $ECHO "*** And there doesn't seem to be a static archive available"
    5691                           $ECHO "*** The link will probably fail, sorry"
     6013                          echo
     6014                          echo "*** And there doesn't seem to be a static archive available"
     6015                          echo "*** The link will probably fail, sorry"
    56926016                        else
    56936017                          add="$dir/$old_library"
     
    58296153            # Just print a warning and add the library to dependency_libs so
    58306154            # that the program can be linked against the static library.
    5831             $ECHO
     6155            echo
    58326156            $ECHO "*** Warning: This system can not link to static lib archive $lib."
    5833             $ECHO "*** I have the capability to make that library automatically link in when"
    5834             $ECHO "*** you link to this library.  But I can only do this if you have a"
    5835             $ECHO "*** shared version of the library, which you do not appear to have."
     6157            echo "*** I have the capability to make that library automatically link in when"
     6158            echo "*** you link to this library.  But I can only do this if you have a"
     6159            echo "*** shared version of the library, which you do not appear to have."
    58366160            if test "$module" = yes; then
    5837               $ECHO "*** But as you try to build a module library, libtool will still create "
    5838               $ECHO "*** a static module, that should work as long as the dlopening application"
    5839               $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
     6161              echo "*** But as you try to build a module library, libtool will still create "
     6162              echo "*** a static module, that should work as long as the dlopening application"
     6163              echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
    58406164              if test -z "$global_symbol_pipe"; then
    5841                 $ECHO
    5842                 $ECHO "*** However, this would only work if libtool was able to extract symbol"
    5843                 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
    5844                 $ECHO "*** not find such a program.  So, this module is probably useless."
    5845                 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
     6165                echo
     6166                echo "*** However, this would only work if libtool was able to extract symbol"
     6167                echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
     6168                echo "*** not find such a program.  So, this module is probably useless."
     6169                echo "*** \`nm' from GNU binutils and a full rebuild may help."
    58466170              fi
    58476171              if test "$build_old_libs" = no; then
     
    59636287          finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
    59646288        else
    5965           compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     6289          compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    59666290        fi
    59676291      fi
     
    61316455          func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
    61326456        else
    6133           $ECHO
     6457          echo
    61346458          $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
    61356459          $ECHO "*** objects $objs is not portable!"
     
    61996523            revision="$number_revision"
    62006524            ;;
    6201           freebsd-aout|freebsd-elf|sunos)
     6525          freebsd-aout|freebsd-elf|qnx|sunos)
    62026526            current="$number_major"
    62036527            revision="$number_minor"
     
    62106534            revision="$number_minor"
    62116535            lt_irix_increment=no
    6212             ;;
    6213           *)
    6214             func_fatal_configuration "$modename: unknown library version type \`$version_type'"
    62156536            ;;
    62166537          esac
     
    64366757
    64376758        # Transform .lo files to .o files.
    6438         oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
     6759        oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
    64396760      fi
    64406761
    64416762      # Eliminate all temporary directories.
    64426763      #for path in $notinst_path; do
    6443       # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
    6444       # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
    6445       # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
     6764      # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
     6765      # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
     6766      # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
    64466767      #done
    64476768
     
    64846805        if test -n "$rpath"; then
    64856806          case $host in
    6486           *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
     6807          *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
    64876808            # these systems don't actually have a c library (as such)!
    64886809            ;;
     
    65696890                  else
    65706891                    droppeddeps=yes
    6571                     $ECHO
     6892                    echo
    65726893                    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
    6573                     $ECHO "*** I have the capability to make that library automatically link in when"
    6574                     $ECHO "*** you link to this library.  But I can only do this if you have a"
    6575                     $ECHO "*** shared version of the library, which I believe you do not have"
    6576                     $ECHO "*** because a test_compile did reveal that the linker did not use it for"
    6577                     $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
     6894                    echo "*** I have the capability to make that library automatically link in when"
     6895                    echo "*** you link to this library.  But I can only do this if you have a"
     6896                    echo "*** shared version of the library, which I believe you do not have"
     6897                    echo "*** because a test_compile did reveal that the linker did not use it for"
     6898                    echo "*** its dynamic dependency list that programs get resolved with at runtime."
    65786899                  fi
    65796900                fi
     
    66126933                    else
    66136934                      droppeddeps=yes
    6614                       $ECHO
     6935                      echo
    66156936                      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
    6616                       $ECHO "*** I have the capability to make that library automatically link in when"
    6617                       $ECHO "*** you link to this library.  But I can only do this if you have a"
    6618                       $ECHO "*** shared version of the library, which you do not appear to have"
    6619                       $ECHO "*** because a test_compile did reveal that the linker did not use this one"
    6620                       $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
     6937                      echo "*** I have the capability to make that library automatically link in when"
     6938                      echo "*** you link to this library.  But I can only do this if you have a"
     6939                      echo "*** shared version of the library, which you do not appear to have"
     6940                      echo "*** because a test_compile did reveal that the linker did not use this one"
     6941                      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
    66216942                    fi
    66226943                  fi
    66236944                else
    66246945                  droppeddeps=yes
    6625                   $ECHO
     6946                  echo
    66266947                  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
    6627                   $ECHO "*** make it link in!  You will probably need to install it or some"
    6628                   $ECHO "*** library that it depends on before this library will be fully"
    6629                   $ECHO "*** functional.  Installing it before continuing would be even better."
     6948                  echo "*** make it link in!  You will probably need to install it or some"
     6949                  echo "*** library that it depends on before this library will be fully"
     6950                  echo "*** functional.  Installing it before continuing would be even better."
    66306951                fi
    66316952                ;;
     
    66736994                        case $potliblink in
    66746995                        [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
    6675                         *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
     6996                        *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
    66766997                        esac
    66776998                      done
     
    66887009              if test -n "$a_deplib" ; then
    66897010                droppeddeps=yes
    6690                 $ECHO
     7011                echo
    66917012                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
    6692                 $ECHO "*** I have the capability to make that library automatically link in when"
    6693                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    6694                 $ECHO "*** shared version of the library, which you do not appear to have"
    6695                 $ECHO "*** because I did check the linker path looking for a file starting"
     7013                echo "*** I have the capability to make that library automatically link in when"
     7014                echo "*** you link to this library.  But I can only do this if you have a"
     7015                echo "*** shared version of the library, which you do not appear to have"
     7016                echo "*** because I did check the linker path looking for a file starting"
    66967017                if test -z "$potlib" ; then
    66977018                  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
     
    67317052                  for potent_lib in $potential_libs; do
    67327053                    potlib="$potent_lib" # see symlink-check above in file_magic test
    6733                     if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
     7054                    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
    67347055                       $EGREP "$match_pattern_regex" > /dev/null; then
    67357056                      newdeplibs="$newdeplibs $a_deplib"
     
    67427063              if test -n "$a_deplib" ; then
    67437064                droppeddeps=yes
    6744                 $ECHO
     7065                echo
    67457066                $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
    6746                 $ECHO "*** I have the capability to make that library automatically link in when"
    6747                 $ECHO "*** you link to this library.  But I can only do this if you have a"
    6748                 $ECHO "*** shared version of the library, which you do not appear to have"
    6749                 $ECHO "*** because I did check the linker path looking for a file starting"
     7067                echo "*** I have the capability to make that library automatically link in when"
     7068                echo "*** you link to this library.  But I can only do this if you have a"
     7069                echo "*** shared version of the library, which you do not appear to have"
     7070                echo "*** because I did check the linker path looking for a file starting"
    67507071                if test -z "$potlib" ; then
    67517072                  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
     
    67657086        none | unknown | *)
    67667087          newdeplibs=""
    6767           tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
    6768               -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
     7088          tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
    67697089          if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
    67707090            for i in $predeps $postdeps ; do
    67717091              # can't use Xsed below, because $i might contain '/'
    6772               tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
     7092              tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
    67737093            done
    67747094          fi
    6775           if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[      ]//g' |
    6776              $GREP . >/dev/null; then
    6777             $ECHO
     7095          case $tmp_deplibs in
     7096          *[!\  \ ]*)
     7097            echo
    67787098            if test "X$deplibs_check_method" = "Xnone"; then
    6779               $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
     7099              echo "*** Warning: inter-library dependencies are not supported in this platform."
    67807100            else
    6781               $ECHO "*** Warning: inter-library dependencies are not known to be supported."
     7101              echo "*** Warning: inter-library dependencies are not known to be supported."
    67827102            fi
    6783             $ECHO "*** All declared inter-library dependencies are being dropped."
     7103            echo "*** All declared inter-library dependencies are being dropped."
    67847104            droppeddeps=yes
    6785           fi
     7105            ;;
     7106          esac
    67867107          ;;
    67877108        esac
     
    67957116        *-*-rhapsody* | *-*-darwin1.[012])
    67967117          # On Rhapsody replace the C library with the System framework
    6797           newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
     7118          newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
    67987119          ;;
    67997120        esac
     
    68017122        if test "$droppeddeps" = yes; then
    68027123          if test "$module" = yes; then
    6803             $ECHO
    6804             $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
     7124            echo
     7125            echo "*** Warning: libtool could not satisfy all declared inter-library"
    68057126            $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
    6806             $ECHO "*** a static module, that should work as long as the dlopening"
    6807             $ECHO "*** application is linked with the -dlopen flag."
     7127            echo "*** a static module, that should work as long as the dlopening"
     7128            echo "*** application is linked with the -dlopen flag."
    68087129            if test -z "$global_symbol_pipe"; then
    6809               $ECHO
    6810               $ECHO "*** However, this would only work if libtool was able to extract symbol"
    6811               $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
    6812               $ECHO "*** not find such a program.  So, this module is probably useless."
    6813               $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
     7130              echo
     7131              echo "*** However, this would only work if libtool was able to extract symbol"
     7132              echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
     7133              echo "*** not find such a program.  So, this module is probably useless."
     7134              echo "*** \`nm' from GNU binutils and a full rebuild may help."
    68147135            fi
    68157136            if test "$build_old_libs" = no; then
     
    68217142            fi
    68227143          else
    6823             $ECHO "*** The inter-library dependencies that have been dropped here will be"
    6824             $ECHO "*** automatically added whenever a program is linked with this library"
    6825             $ECHO "*** or is declared to -dlopen it."
     7144            echo "*** The inter-library dependencies that have been dropped here will be"
     7145            echo "*** automatically added whenever a program is linked with this library"
     7146            echo "*** or is declared to -dlopen it."
    68267147
    68277148            if test "$allow_undefined" = no; then
    6828               $ECHO
    6829               $ECHO "*** Since this library must not contain undefined symbols,"
    6830               $ECHO "*** because either the platform does not support them or"
    6831               $ECHO "*** it was explicitly requested with -no-undefined,"
    6832               $ECHO "*** libtool will only create a static version of it."
     7149              echo
     7150              echo "*** Since this library must not contain undefined symbols,"
     7151              echo "*** because either the platform does not support them or"
     7152              echo "*** it was explicitly requested with -no-undefined,"
     7153              echo "*** libtool will only create a static version of it."
    68337154              if test "$build_old_libs" = no; then
    68347155                oldlibs="$output_objdir/$libname.$libext"
     
    68477168      case $host in
    68487169        *-*-darwin*)
    6849           newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    6850           new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    6851           deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     7170          newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     7171          new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     7172          deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    68527173          ;;
    68537174      esac
     
    69717292
    69727293        # Use standard objects if they are pic
    6973         test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     7294        test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
    69747295        test "X$libobjs" = "X " && libobjs=
    69757296
     
    70377358          tmp_export_symbols="$export_symbols"
    70387359          test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
    7039           $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
     7360          $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
    70407361        fi
    70417362
     
    71387459          fi
    71397460          save_output=$output
    7140           output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
     7461          func_basename "$output"
     7462          output_la=$func_basename_result
    71417463
    71427464          # Clear the reloadable object creation command queue and
     
    71517473            output=${output_objdir}/${output_la}.lnkscript
    71527474            func_verbose "creating GNU ld script: $output"
    7153             $ECHO 'INPUT (' > $output
     7475            echo 'INPUT (' > $output
    71547476            for obj in $save_libobjs
    71557477            do
    71567478              $ECHO "$obj" >> $output
    71577479            done
    7158             $ECHO ')' >> $output
     7480            echo ')' >> $output
    71597481            delfiles="$delfiles $output"
    71607482          elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
     
    71987520                  if test "$k" -eq 1 ; then
    71997521                    # The first file doesn't have a previous command to add.
    7200                     eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
     7522                    reload_objs=$objlist
     7523                    eval concat_cmds=\"$reload_cmds\"
    72017524                  else
    72027525                    # All subsequent reloadable object files will link in
    72037526                    # the last one created.
    7204                     eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
     7527                    reload_objs="$objlist $last_robj"
     7528                    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
    72057529                  fi
    72067530                  last_robj=$output_objdir/$output_la-${k}.$objext
     
    72087532                  k=$func_arith_result
    72097533                  output=$output_objdir/$output_la-${k}.$objext
    7210                   objlist=$obj
     7534                  objlist=" $obj"
    72117535                  func_len " $last_robj"
    72127536                  func_arith $len0 + $func_len_result
     
    72187542              # files will link in the last one created.
    72197543              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
    7220               eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
     7544              reload_objs="$objlist $last_robj"
     7545              eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
    72217546              if test -n "$last_robj"; then
    72227547                eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
     
    72777602              tmp_export_symbols="$export_symbols"
    72787603              test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
    7279               $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
     7604              $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
    72807605            fi
    72817606
     
    74427767        if test -n "$whole_archive_flag_spec"; then
    74437768          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
    7444           reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
     7769          reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
    74457770        else
    74467771          gentop="$output_objdir/${obj}x"
     
    74537778
    74547779      # Create the old-style object.
    7455       reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
     7780      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
    74567781
    74577782      output="$obj"
     
    75137838      *-*-rhapsody* | *-*-darwin1.[012])
    75147839        # On Rhapsody replace the C library is the System framework
    7515         compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
    7516         finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
     7840        compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
     7841        finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
    75177842        ;;
    75187843      esac
     
    75317856        fi
    75327857        # Time to change all our "foo.ltframework" stuff back to "-framework foo"
    7533         compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
    7534         finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
     7858        compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
     7859        finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
    75357860        ;;
    75367861      esac
     
    76697994      if test -n "$libobjs" && test "$build_old_libs" = yes; then
    76707995        # Transform all the library objects into standard objects.
    7671         compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
    7672         finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
     7996        compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
     7997        finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
    76737998      fi
    76747999
     
    76828007      wrappers_required=yes
    76838008      case $host in
     8009      *cegcc* | *mingw32ce*)
     8010        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
     8011        wrappers_required=no
     8012        ;;
    76848013      *cygwin* | *mingw* )
    76858014        if test "$build_libtool_libs" != yes; then
    76868015          wrappers_required=no
    76878016        fi
    7688         ;;
    7689       *cegcc)
    7690         # Disable wrappers for cegcc, we are cross compiling anyway.
    7691         wrappers_required=no
    76928017        ;;
    76938018      *)
     
    76998024      if test "$wrappers_required" = no; then
    77008025        # Replace the output file specification.
    7701         compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     8026        compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
    77028027        link_command="$compile_command$compile_rpath"
    77038028
     
    77468071        link_command="$compile_var$compile_command$compile_rpath"
    77478072        # Replace the output file specification.
    7748         link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
     8073        link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
    77498074        # Delete the old output file.
    77508075        $opt_dry_run || $RM $output
     
    77658090          link_command="$finalize_var$compile_command$finalize_rpath"
    77668091          if test "$fast_install" = yes; then
    7767             relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
     8092            relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
    77688093          else
    77698094            # fast_install is set to needless
     
    77778102
    77788103      # Replace the output file specification.
    7779       link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
     8104      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
    77808105
    77818106      # Delete the old output files.
     
    78018126        done
    78028127        relink_command="(cd `pwd`; $relink_command)"
    7803         relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    7804       fi
    7805 
    7806       # Quote $ECHO for shipping.
    7807       if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
    7808         case $progpath in
    7809         [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
    7810         *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
    7811         esac
    7812         qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
    7813       else
    7814         qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
     8128        relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
    78158129      fi
    78168130
     
    79338247          :
    79348248        else
    7935           $ECHO "copying selected object files to avoid basename conflicts..."
     8249          echo "copying selected object files to avoid basename conflicts..."
    79368250          gentop="$output_objdir/${outputname}x"
    79378251          generated="$generated $gentop"
     
    80448358      # Quote the link command for shipping.
    80458359      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    8046       relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     8360      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
    80478361      if test "$hardcode_automatic" = yes ; then
    80488362        relink_command=
     
    81298443          $RM $output
    81308444          # place dlname in correct position for cygwin
     8445          # In fact, it would be nice if we could use this code for all target
     8446          # systems that can't hard-code library paths into their executables
     8447          # and that have no shared library path variable independent of PATH,
     8448          # but it turns out we can't easily determine that from inspecting
     8449          # libtool variables, so we have to hard-code the OSs to which it
     8450          # applies here; at the moment, that means platforms that use the PE
     8451          # object format with DLL files.  See the long comment at the top of
     8452          # tests/bindir.at for full details.
    81318453          tdlname=$dlname
    81328454          case $host,$output,$installed,$module,$dlname in
    8133             *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
     8455            *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
     8456              # If a -bindir argument was supplied, place the dll there.
     8457              if test "x$bindir" != x ;
     8458              then
     8459                func_relative_path "$install_libdir" "$bindir"
     8460                tdlname=$func_relative_path_result$dlname
     8461              else
     8462                # Otherwise fall back on heuristic.
     8463                tdlname=../bin/$dlname
     8464              fi
     8465              ;;
    81348466          esac
    81358467          $ECHO > $output "\
Note: See TracChangeset for help on using the changeset viewer.