IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3765


Ignore:
Timestamp:
Apr 22, 2005, 4:07:27 PM (21 years ago)
Author:
desonia
Message:

fixed problem that broke Linux.

Location:
trunk/psLib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/config.guess

    r3764 r3765  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    5 
    6 timestamp='2003-02-22'
     4#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     5
     6timestamp='2004-08-11'
    77
    88# This file is free software; you can redistribute it and/or modify it
     
    5454
    5555Originally written by Per Bothner.
    56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     56Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    5757Free Software Foundation, Inc.
    5858
     
    107107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    108108 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
     109 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    109110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
    110111dummy=$tmp/dummy ;
     
    135136UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    136137UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
     138
     139case "${UNAME_MACHINE}" in
     140    i?86)
     141        test -z "$VENDOR" && VENDOR=pc
     142        ;;
     143    *)
     144        test -z "$VENDOR" && VENDOR=unknown
     145        ;;
     146esac
     147test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
    137148
    138149# Note: order is significant - the case branches are not exclusive.
     
    197208        echo "${machine}-${os}${release}"
    198209        exit 0 ;;
     210    amd64:OpenBSD:*:*)
     211        echo x86_64-unknown-openbsd${UNAME_RELEASE}
     212        exit 0 ;;
    199213    amiga:OpenBSD:*:*)
    200214        echo m68k-unknown-openbsd${UNAME_RELEASE}
     
    203217        echo mipsel-unknown-openbsd${UNAME_RELEASE}
    204218        exit 0 ;;
     219    cats:OpenBSD:*:*)
     220        echo arm-unknown-openbsd${UNAME_RELEASE}
     221        exit 0 ;;
    205222    hp300:OpenBSD:*:*)
    206223        echo m68k-unknown-openbsd${UNAME_RELEASE}
    207224        exit 0 ;;
     225    luna88k:OpenBSD:*:*)
     226        echo m88k-unknown-openbsd${UNAME_RELEASE}
     227        exit 0 ;;
    208228    mac68k:OpenBSD:*:*)
    209229        echo m68k-unknown-openbsd${UNAME_RELEASE}
     
    236256        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
    237257        exit 0 ;;
     258    *:ekkoBSD:*:*)
     259        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
     260        exit 0 ;;
     261    macppc:MirBSD:*:*)
     262        echo powerppc-unknown-mirbsd${UNAME_RELEASE}
     263        exit 0 ;;
     264    *:MirBSD:*:*)
     265        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
     266        exit 0 ;;
    238267    alpha:OSF1:*:*)
    239         if test $UNAME_RELEASE = "V4.0"; then
     268        case $UNAME_RELEASE in
     269        *4.0)
    240270                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    241         fi
     271                ;;
     272        *5.*)
     273                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
     274                ;;
     275        esac
    242276        # According to Compaq, /usr/sbin/psrinfo has been available on
    243277        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     
    277311                UNAME_MACHINE="alphaev79" ;;
    278312        esac
     313        # A Pn.n version is a patched version.
    279314        # A Vn.n version is a released version.
    280315        # A Tn.n version is a released field test version.
    281316        # A Xn.n version is an unreleased experimental baselevel.
    282317        # 1.2 uses "1.2" for uname -r.
    283         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     318        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    284319        exit 0 ;;
    285320    Alpha\ *:Windows_NT*:*)
     
    303338    *:OS/390:*:*)
    304339        echo i370-ibm-openedition
     340        exit 0 ;;
     341    *:OS400:*:*)
     342        echo powerpc-ibm-os400
    305343        exit 0 ;;
    306344    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
     
    321359        echo pyramid-pyramid-svr4
    322360        exit 0 ;;
     361    DRS?6000:unix:4.0:6*)
     362        echo sparc-icl-nx6
     363        exit 0 ;;
    323364    DRS?6000:UNIX_SV:4.2*:7*)
    324365        case `/usr/bin/uname -p` in
     
    393434        echo m68k-unknown-mint${UNAME_RELEASE}
    394435        exit 0 ;;
     436    m68k:machten:*:*)
     437        echo m68k-apple-machten${UNAME_RELEASE}
     438        exit 0 ;;
    395439    powerpc:machten:*:*)
    396440        echo powerpc-apple-machten${UNAME_RELEASE}
     
    728772        exit 0 ;;
    729773    *:UNICOS/mp:*:*)
    730         echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     774        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    731775        exit 0 ;;
    732776    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     
    736780        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    737781        exit 0 ;;
     782    5000:UNIX_System_V:4.*:*)
     783        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     784        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     785        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     786        exit 0 ;;
    738787    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    739788        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
     
    746795        exit 0 ;;
    747796    *:FreeBSD:*:*)
    748         # Determine whether the default compiler uses glibc.
    749         eval $set_cc_for_build
    750         sed 's/^        //' << EOF >$dummy.c
    751         #include <features.h>
    752         #if __GLIBC__ >= 2
    753         LIBC=gnu
    754         #else
    755         LIBC=
    756         #endif
    757 EOF
    758         eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    759         echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
     797        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    760798        exit 0 ;;
    761799    i*:CYGWIN*:*)
     
    768806        echo ${UNAME_MACHINE}-pc-pw32
    769807        exit 0 ;;
    770     x86:Interix*:3*)
    771         echo i586-pc-interix3
     808    x86:Interix*:[34]*)
     809        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
    772810        exit 0 ;;
    773811    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     
    790828        exit 0 ;;
    791829    *:GNU:*:*)
     830        # the GNU system
    792831        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
     832        exit 0 ;;
     833    *:GNU/*:*:*)
     834        # other systems with GNU libc and userland
     835        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
    793836        exit 0 ;;
    794837    i*86:Minix:*:*)
     
    796839        exit 0 ;;
    797840    arm*:Linux:*:*)
    798         echo ${UNAME_MACHINE}-unknown-linux-gnu
     841        echo ${UNAME_MACHINE}-${VENDOR}-linux
     842        exit 0 ;;
     843    cris:Linux:*:*)
     844        echo cris-axis-linux
    799845        exit 0 ;;
    800846    ia64:Linux:*:*)
    801         echo ${UNAME_MACHINE}-unknown-linux-gnu
     847        echo ${UNAME_MACHINE}-${VENDOR}-linux
     848        exit 0 ;;
     849    m32r*:Linux:*:*)
     850        echo ${UNAME_MACHINE}-${VENDOR}-linux
    802851        exit 0 ;;
    803852    m68*:Linux:*:*)
    804         echo ${UNAME_MACHINE}-unknown-linux-gnu
     853        echo ${UNAME_MACHINE}-${VENDOR}-linux
    805854        exit 0 ;;
    806855    mips:Linux:*:*)
     
    821870EOF
    822871        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    823         test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     872        test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
    824873        ;;
    825874    mips64:Linux:*:*)
     
    840889EOF
    841890        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    842         test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     891        test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
    843892        ;;
    844893    ppc:Linux:*:*)
    845         echo powerpc-unknown-linux-gnu
     894        echo powerpc-${VENDOR}-linux
    846895        exit 0 ;;
    847896    ppc64:Linux:*:*)
    848         echo powerpc64-unknown-linux-gnu
     897        echo powerpc64-${VENDOR}-linux
    849898        exit 0 ;;
    850899    alpha:Linux:*:*)
     
    859908        esac
    860909        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
    861         if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    862         echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     910        if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
     911        echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
    863912        exit 0 ;;
    864913    parisc:Linux:*:* | hppa:Linux:*:*)
    865914        # Look for CPU level
    866915        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
    867           PA7*) echo hppa1.1-unknown-linux-gnu ;;
    868           PA8*) echo hppa2.0-unknown-linux-gnu ;;
    869           *)    echo hppa-unknown-linux-gnu ;;
     916          PA7*) echo hppa1.1-${VENDOR}-linux ;;
     917          PA8*) echo hppa2.0-${VENDOR}-linux ;;
     918          *)    echo hppa-${VENDOR}-linux ;;
    870919        esac
    871920        exit 0 ;;
    872921    parisc64:Linux:*:* | hppa64:Linux:*:*)
    873         echo hppa64-unknown-linux-gnu
     922        echo hppa64-${VENDOR}-linux
    874923        exit 0 ;;
    875924    s390:Linux:*:* | s390x:Linux:*:*)
    876925        echo ${UNAME_MACHINE}-ibm-linux
    877926        exit 0 ;;
     927    sh64*:Linux:*:*)
     928        echo ${UNAME_MACHINE}-${VENDOR}-linux
     929        exit 0 ;;
    878930    sh*:Linux:*:*)
    879         echo ${UNAME_MACHINE}-unknown-linux-gnu
     931        echo ${UNAME_MACHINE}-${VENDOR}-linux
    880932        exit 0 ;;
    881933    sparc:Linux:*:* | sparc64:Linux:*:*)
    882         echo ${UNAME_MACHINE}-unknown-linux-gnu
     934        echo ${UNAME_MACHINE}-${VENDOR}-linux
    883935        exit 0 ;;
    884936    x86_64:Linux:*:*)
    885         echo x86_64-unknown-linux-gnu
     937        echo x86_64-${VENDOR}-linux
    886938        exit 0 ;;
    887939    i*86:Linux:*:*)
     
    898950        case "$ld_supported_targets" in
    899951          elf32-i386)
    900                 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
     952                TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
    901953                ;;
    902954          a.out-i386-linux)
    903                 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     955                echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
    904956                exit 0 ;;
    905957          coff-i386)
    906                 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     958                echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
    907959                exit 0 ;;
    908960          "")
    909                 # Either a pre-BFD a.out linker (linux-gnuoldld) or
     961                # Either a pre-BFD a.out linker (linuxoldld) or
    910962                # one that does not give us useful --help.
    911                 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     963                echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
    912964                exit 0 ;;
    913965        esac
     
    933985        #endif
    934986        #endif
     987        #ifdef __dietlibc__
     988        LIBC=dietlibc
     989        #endif
    935990EOF
    936991        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    937         test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
     992        test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
    938993        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    939994        ;;
     
    9621017    i*86:atheos:*:*)
    9631018        echo ${UNAME_MACHINE}-unknown-atheos
     1019        exit 0 ;;
     1020        i*86:syllable:*:*)
     1021        echo ${UNAME_MACHINE}-pc-syllable
    9641022        exit 0 ;;
    9651023    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     
    10321090        echo m68k-diab-dnix
    10331091        exit 0 ;;
    1034     M68*:*:R3V[567]*:*)
     1092    M68*:*:R3V[5678]*:*)
    10351093        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1036     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
     1094    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
    10371095        OS_REL=''
    10381096        test -r /etc/.relid \
     
    11321190        exit 0 ;;
    11331191    *:Darwin:*:*)
    1134         case `uname -p` in
     1192        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1193        case $UNAME_PROCESSOR in
    11351194            *86) UNAME_PROCESSOR=i686 ;;
    1136             powerpc) UNAME_PROCESSOR=powerpc ;;
     1195            unknown) UNAME_PROCESSOR=powerpc ;;
    11371196        esac
    11381197        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     
    11491208        echo i386-pc-qnx
    11501209        exit 0 ;;
    1151     NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
     1210    NSR-?:NONSTOP_KERNEL:*:*)
    11521211        echo nsr-tandem-nsk${UNAME_RELEASE}
    11531212        exit 0 ;;
     
    11901249        echo pdp10-unknown-its
    11911250        exit 0 ;;
     1251    SEI:*:*:SEIUX)
     1252        echo mips-sei-seiux${UNAME_RELEASE}
     1253        exit 0 ;;
     1254    *:DragonFly:*:*)
     1255        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1256        exit 0 ;;
     1257    *:*VMS:*:*)
     1258        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1259        case "${UNAME_MACHINE}" in
     1260            A*) echo alpha-dec-vms && exit 0 ;;
     1261            I*) echo ia64-dec-vms && exit 0 ;;
     1262            V*) echo vax-dec-vms && exit 0 ;;
     1263        esac
    11921264esac
    11931265
  • trunk/psLib/config.sub

    r3764 r3765  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    5 
    6 timestamp='2003-02-22'
     4#   2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
     5
     6timestamp='2004-06-24'
    77
    88# This file is (in principle) common to ALL GNU software.
     
    7171GNU config.sub ($timestamp)
    7272
    73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     73Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    7474Free Software Foundation, Inc.
    7575
     
    119119maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    120120case $maybe_os in
    121   nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     121  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
     122  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
    122123    os=-$maybe_os
    123124    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    145146        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    146147        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    147         -apple | -axis)
     148        -apple | -axis | -knuth | -cray)
    148149                os=
    149150                basic_machine=$1
     
    229230        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    230231        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
     232        | am33_2.0 \
    231233        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
    232         | clipper \
     234        | c4x | clipper \
    233235        | d10v | d30v | dlx | dsp16xx \
    234236        | fr30 | frv \
    235237        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    236238        | i370 | i860 | i960 | ia64 \
    237         | ip2k \
    238         | m32r | m68000 | m68k | m88k | mcore \
     239        | ip2k | iq2000 \
     240        | m32r | m32rle | m68000 | m68k | m88k | mcore \
    239241        | mips | mipsbe | mipseb | mipsel | mipsle \
    240242        | mips16 \
     
    248250        | mipsisa32r2 | mipsisa32r2el \
    249251        | mipsisa64 | mipsisa64el \
     252        | mipsisa64r2 | mipsisa64r2el \
    250253        | mipsisa64sb1 | mipsisa64sb1el \
    251254        | mipsisa64sr71k | mipsisa64sr71kel \
     
    260263        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    261264        | sh64 | sh64le \
    262         | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     265        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
    263266        | strongarm \
    264         | tahoe | thumb | tic80 | tron \
     267        | tahoe | thumb | tic4x | tic80 | tron \
    265268        | v850 | v850e \
    266269        | we32k \
     
    298301        | bs2000-* \
    299302        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    300         | clipper-* | cydra-* \
     303        | clipper-* | craynv-* | cydra-* \
    301304        | d10v-* | d30v-* | dlx-* \
    302305        | elxsi-* \
     
    305308        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    306309        | i*86-* | i860-* | i960-* | ia64-* \
    307         | ip2k-* \
    308         | m32r-* \
     310        | ip2k-* | iq2000-* \
     311        | m32r-* | m32rle-* \
    309312        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    310313        | m88110-* | m88k-* | mcore-* \
     
    320323        | mipsisa32r2-* | mipsisa32r2el-* \
    321324        | mipsisa64-* | mipsisa64el-* \
     325        | mipsisa64r2-* | mipsisa64r2el-* \
    322326        | mipsisa64sb1-* | mipsisa64sb1el-* \
    323327        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    324328        | mipstx39-* | mipstx39el-* \
     329        | mmix-* \
    325330        | msp430-* \
    326         | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
     331        | none-* | np1-* | ns16k-* | ns32k-* \
    327332        | orion-* \
    328333        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     
    333338        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    334339        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    335         | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     340        | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    336341        | tahoe-* | thumb-* \
    337342        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     
    360365                os=-udi
    361366                ;;
     367        abacus)
     368                basic_machine=abacus-unknown
     369                ;;
    362370        adobe68k)
    363371                basic_machine=m68010-adobe
     
    374382                os=-bsd
    375383                ;;
     384        amd64)
     385                basic_machine=x86_64-pc
     386                ;;
     387        amd64-*)
     388                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     389                ;;
    376390        amdahl)
    377391                basic_machine=580-amdahl
     
    433447                os=-unicos
    434448                ;;
     449        craynv)
     450                basic_machine=craynv-cray
     451                os=-unicosmp
     452                ;;
     453        cr16c)
     454                basic_machine=cr16c-unknown
     455                os=-elf
     456                ;;
    435457        crds | unos)
    436458                basic_machine=m68k-crds
     
    438460        cris | cris-* | etrax*)
    439461                basic_machine=cris-axis
     462                ;;
     463        crx)
     464                basic_machine=crx-unknown
     465                os=-elf
    440466                ;;
    441467        da30 | da30-*)
     
    638664        mips3*)
    639665                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    640                 ;;
    641         mmix*)
    642                 basic_machine=mmix-knuth
    643                 os=-mmixware
    644666                ;;
    645667        monitor)
     
    723745                basic_machine=np1-gould
    724746                ;;
    725         nv1)
    726                 basic_machine=nv1-cray
    727                 os=-unicosmp
    728                 ;;
    729747        nsr-tandem)
    730748                basic_machine=nsr-tandem
     
    738756                os=-coff
    739757                ;;
     758        os400)
     759                basic_machine=powerpc-ibm
     760                os=-os400
     761                ;;
    740762        OSE68000 | ose68000)
    741763                basic_machine=m68000-ericsson
     
    769791                basic_machine=i686-pc
    770792                ;;
    771         pentiumii | pentium2)
     793        pentiumii | pentium2 | pentiumiii | pentium3)
    772794                basic_machine=i686-pc
     795                ;;
     796        pentium4)
     797                basic_machine=i786-pc
    773798                ;;
    774799        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    778803                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    779804                ;;
    780         pentiumii-* | pentium2-*)
     805        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    781806                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     807                ;;
     808        pentium4-*)
     809                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    782810                ;;
    783811        pn)
     
    839867                basic_machine=mipsisa64sb1el-unknown
    840868                ;;
     869        sei)
     870                basic_machine=mips-sei
     871                os=-seiux
     872                ;;
    841873        sequent)
    842874                basic_machine=i386-sequent
     
    846878                os=-hms
    847879                ;;
     880        sh64)
     881                basic_machine=sh64-unknown
     882                ;;
    848883        sparclite-wrs | simso-wrs)
    849884                basic_machine=sparclite-wrs
     
    920955                os=-unicos
    921956                ;;
    922         tic4x | c4x*)
    923                 basic_machine=tic4x-unknown
    924                 os=-coff
    925                 ;;
    926957        tic54x | c54x*)
    927958                basic_machine=tic54x-unknown
     
    948979        tower | tower-32)
    949980                basic_machine=m68k-ncr
     981                ;;
     982        tpf)
     983                basic_machine=s390x-ibm
     984                os=-tpf
    950985                ;;
    951986        udi29k)
     
    10221057                basic_machine=romp-ibm
    10231058                ;;
     1059        mmix)
     1060                basic_machine=mmix-knuth
     1061                ;;
    10241062        rs6000)
    10251063                basic_machine=rs6000-ibm
     
    10441082                basic_machine=sh64-unknown
    10451083                ;;
    1046         sparc | sparcv9 | sparcv9b)
     1084        sparc | sparcv8 | sparcv9 | sparcv9b)
    10471085                basic_machine=sparc-sun
    10481086                ;;
     
    11171155              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    11181156              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1119               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    1120               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1157              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
     1158              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1159              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    11211160              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    11221161              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    11231162              | -chorusos* | -chorusrdb* \
    11241163              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1125               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
     1164              | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
    11261165              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11271166              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     
    11291168              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    11301169              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    1131               | -powermax* | -dnix*)
     1170              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
    11321171        # Remember, each alternative MUST END IN *, to match a version number.
    11331172                ;;
     
    11531192                os=`echo $os | sed -e 's|mac|macos|'`
    11541193                ;;
    1155         -linux*)
    1156                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
     1194        -linux-dietlibc)
     1195                os=-linux-dietlibc
    11571196                ;;
    11581197        -sunos5*)
     
    11651204                os=-openedition
    11661205                ;;
     1206        -os400*)
     1207                os=-os400
     1208                ;;
    11671209        -wince*)
    11681210                os=-wince
     
    11851227        -atheos*)
    11861228                os=-atheos
     1229                ;;
     1230        -syllable*)
     1231                os=-syllable
    11871232                ;;
    11881233        -386bsd)
     
    12071252        -sinix*)
    12081253                os=-sysv4
     1254                ;;
     1255        -tpf*)
     1256                os=-tpf
    12091257                ;;
    12101258        -triton*)
     
    12751323                os=-aout
    12761324                ;;
     1325    c4x-* | tic4x-*)
     1326        os=-coff
     1327        ;;
    12771328        # This must come before the *-dec entry.
    12781329        pdp10-*)
     
    13201371        *-ibm)
    13211372                os=-aix
     1373                ;;
     1374        *-knuth)
     1375                os=-mmixware
    13221376                ;;
    13231377        *-wec)
     
    14531507                                vendor=ibm
    14541508                                ;;
     1509                        -os400*)
     1510                                vendor=ibm
     1511                                ;;
    14551512                        -ptx*)
    14561513                                vendor=sequent
     1514                                ;;
     1515                        -tpf*)
     1516                                vendor=ibm
    14571517                                ;;
    14581518                        -vxsim* | -vxworks* | -windiss*)
  • trunk/psLib/configure.ac

    r3764 r3765  
    1 AC_INIT([pslib],[0.6],[www.pan-starrs.org/bugzilla])
     1AC_INIT([pslib],[0.6],[http://www.pan-starrs.org/bugzilla])
    22AC_CANONICAL_TARGET
    33AM_CONFIG_HEADER(src/config.h)
    4 AM_INIT_AUTOMAKE(0.6)
     4AM_INIT_AUTOMAKE(1.6)
    55
    66PSLIB_LT_VERSION="0:5:0"
     
    2424  *-apple-darwin*)
    2525    CFLAGS="${CFLAGS=} -Wno-long-double"
    26     AC_CHECK_LIB(g2c,main,[FLIBS="${FLIBS} -lg2c"])
     26    FLIBS="${FLIBS} -lg2c"
    2727    ;;
    2828esac
     
    5959dnl MYSQL_LDFLAGS="-L${libdir}/mysql"
    6060dnl MYSQL_CFLAGS="-I${includedir}/mysql"
    61 AC_ARG_ENABLE(mysql, 
     61AC_ARG_ENABLE(mysql,
    6262 [AC_HELP_STRING([--disable-mysql],[Disable MySQL functionality])],
    6363 [MYSQL_REQ=$enableval],
     
    8484  PSLIB_LIBS="${PSLIB_LIBS=} ${MYSQL_LDFLAGS}"
    8585  AC_SUBST(TST_PSDB,"tst_psDB") dnl enable the test for psDB
    86  
     86
    8787  AC_RUN_IFELSE([AC_LANG_PROGRAM(
    8888[[#include <stdlib.h>
     
    151151dnl LDFLAGS="${LDFLAGS=} `${GSL_CONFIG} --libs`"
    152152PSLIB_LIBS="${PSLIB_LIBS=} `${GSL_CONFIG} --libs`"
    153    
     153
    154154dnl ------------------- XML2 options ---------------------
    155155AC_ARG_WITH(xml2-config,
     
    167167
    168168dnl ------------------- SWIG options ---------------------
    169 AC_ARG_ENABLE(perlmodule, 
     169AC_ARG_ENABLE(perlmodule,
    170170 [AC_HELP_STRING([--disable-perlmodule],[Disable creation of perl module])],
    171171 [SWIG_REQ="$enableval"],
     
    235235AC_CONFIG_FILES([ src/sysUtils/Makefile ])
    236236
    237 if test "$SWIG_REQ" == "yes" 
     237if test "$SWIG_REQ" == "yes"
    238238then
    239239  AC_CONFIG_FILES([ swig/Makefile ])
  • trunk/psLib/ltmain.sh

    r3764 r3765  
    22# NOTE: Changing this file will not affect anything until you rerun configure.
    33#
    4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
     4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
    55# Free Software Foundation, Inc.
    66# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
     
    2525# the same distribution terms that you use for the rest of that program.
    2626
     27basename="s,^.*/,,g"
     28
     29# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
     30# is ksh but when the shell is invoked as "sh" and the current value of
     31# the _XPG environment variable is not equal to 1 (one), the special
     32# positional parameter $0, within a function call, is the name of the
     33# function.
     34progpath="$0"
     35
     36# The name of this program:
     37progname=`echo "$progpath" | $SED $basename`
     38modename="$progname"
     39
     40# Global variables:
     41EXIT_SUCCESS=0
     42EXIT_FAILURE=1
     43
     44PROGRAM=ltmain.sh
     45PACKAGE=libtool
     46VERSION=1.5.8
     47TIMESTAMP=" (1.1220.2.118 2004/08/07 12:24:38)"
     48
     49# See if we are running on zsh, and set the options which allow our
     50# commands through without removal of \ escapes.
     51if test -n "${ZSH_VERSION+set}" ; then
     52  setopt NO_GLOB_SUBST
     53fi
     54
    2755# Check that we have a working $echo.
    2856if test "X$1" = X--no-reexec; then
     
    3765else
    3866  # Restart under the correct shell, and then maybe $echo will work.
    39   exec $SHELL "$0" --no-reexec ${1+"$@"}
     67  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
    4068fi
    4169
     
    4674$*
    4775EOF
    48   exit 0
     76  exit $EXIT_SUCCESS
    4977fi
    50 
    51 # The name of this program.
    52 progname=`$echo "$0" | ${SED} 's%^.*/%%'`
    53 modename="$progname"
    54 
    55 # Constants.
    56 PROGRAM=ltmain.sh
    57 PACKAGE=libtool
    58 VERSION=1.5
    59 TIMESTAMP=" (1.1220 2003/04/05 19:32:58)"
    6078
    6179default_mode=
     
    7189sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
    7290# test EBCDIC or ASCII
    73 case `echo A|od -x` in
    74  *[Cc]1*) # EBCDIC based system
     91case `echo A|tr A '\301'` in
     92 A) # EBCDIC based system
    7593  SP2NL="tr '\100' '\n'"
    7694  NL2SP="tr '\r\n' '\100\100'"
     
    95113
    96114# Make sure IFS has a sensible default
    97 : ${IFS="       "}
     115: ${IFS="       
     116"}
    98117
    99118if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    100119  $echo "$modename: not configured to build any kind of library" 1>&2
    101120  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
    102   exit 1
     121  exit $EXIT_FAILURE
    103122fi
    104123
     
    119138# This seems to be the best place for them
    120139
     140# func_win32_libid arg
     141# return the library type of file 'arg'
     142#
    121143# Need a lot of goo to handle *both* DLLs and import libs
    122144# Has to be a shell function in order to 'eat' the argument
    123145# that is supplied when $file_magic_command is called.
    124 win32_libid () {
     146func_win32_libid () {
    125147  win32_libid_type="unknown"
    126148  win32_fileres=`file -L $1 2>/dev/null`
     
    131153  *ar\ archive*) # could be an import, or static
    132154    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
    133       grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
     155      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
    134156      win32_nmres=`eval $NM -f posix -A $1 | \
    135157        sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
     
    141163    fi
    142164    ;;
    143   *DLL*) 
     165  *DLL*)
    144166    win32_libid_type="x86 DLL"
    145167    ;;
     
    155177}
    156178
     179
     180# func_infer_tag arg
     181# Infer tagged configuration to use if any are available and
     182# if one wasn't chosen via the "--tag" command line option.
     183# Only attempt this if the compiler in the base compile
     184# command doesn't match the default compiler.
     185# arg is usually of the form 'gcc ...'
     186func_infer_tag () {
     187    if test -n "$available_tags" && test -z "$tagname"; then
     188      CC_quoted=
     189      for arg in $CC; do
     190        case $arg in
     191          *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
     192          arg="\"$arg\""
     193          ;;
     194        esac
     195        CC_quoted="$CC_quoted $arg"
     196      done
     197      case $@ in
     198      # Blanks in the command may have been stripped by the calling shell,
     199      # but not from the CC environment variable when configure was run.
     200      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
     201      # Blanks at the start of $base_compile will cause this to fail
     202      # if we don't check for them as well.
     203      *)
     204        for z in $available_tags; do
     205          if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
     206            # Evaluate the configuration.
     207            eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
     208            CC_quoted=
     209            for arg in $CC; do
     210            # Double-quote args containing other shell metacharacters.
     211            case $arg in
     212              *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
     213              arg="\"$arg\""
     214              ;;
     215            esac
     216            CC_quoted="$CC_quoted $arg"
     217          done
     218            case "$@ " in
     219              " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
     220              # The compiler in the base compile command matches
     221              # the one in the tagged configuration.
     222              # Assume this is the tagged configuration we want.
     223              tagname=$z
     224              break
     225              ;;
     226            esac
     227          fi
     228        done
     229        # If $tagname still isn't set, then no tagged configuration
     230        # was found and let the user know that the "--tag" command
     231        # line option must be used.
     232        if test -z "$tagname"; then
     233          $echo "$modename: unable to infer tagged configuration"
     234          $echo "$modename: specify a tag with \`--tag'" 1>&2
     235          exit $EXIT_FAILURE
     236#        else
     237#          $echo "$modename: using $tagname tagged configuration"
     238        fi
     239        ;;
     240      esac
     241    fi
     242}
     243
     244
     245# func_extract_archives gentop oldlib ...
     246func_extract_archives () {
     247    my_gentop="$1"; shift
     248    my_oldlibs=${1+"$@"}
     249    my_oldobjs=""
     250    my_xlib=""
     251    my_xabs=""
     252    my_xdir=""
     253    my_status=""
     254
     255    $show "${rm}r $my_gentop"
     256    $run ${rm}r "$my_gentop"
     257    $show "$mkdir $my_gentop"
     258    $run $mkdir "$my_gentop"
     259    my_status=$?
     260    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
     261      exit $my_status
     262    fi
     263
     264    for my_xlib in $my_oldlibs; do
     265      # Extract the objects.
     266      case $my_xlib in
     267        [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
     268        *) my_xabs=`pwd`"/$my_xlib" ;;
     269      esac
     270      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
     271      my_xdir="$my_gentop/$my_xlib"
     272
     273      $show "${rm}r $my_xdir"
     274      $run ${rm}r "$my_xdir"
     275      $show "$mkdir $my_xdir"
     276      $run $mkdir "$my_xdir"
     277      status=$?
     278      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
     279        exit $status
     280      fi
     281      case $host in
     282      *-darwin*)
     283        $show "Extracting $my_xabs"
     284        # Do not bother doing anything if just a dry run
     285        if test -z "$run"; then
     286          darwin_orig_dir=`pwd`
     287          cd $my_xdir || exit $?
     288          darwin_archive=$my_xabs
     289          darwin_curdir=`pwd`
     290          darwin_base_archive=`basename $darwin_archive`
     291          darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
     292          if test -n "$darwin_arches"; then
     293            darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
     294            darwin_arch=
     295            $show "$darwin_base_archive has multiple architectures $darwin_arches"
     296            for darwin_arch in  $darwin_arches ; do
     297              mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
     298              lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
     299              # Remove the table of contents from the thin files.
     300              $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
     301              $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
     302              cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
     303              $AR -xo "${darwin_base_archive}"
     304              rm "${darwin_base_archive}"
     305              cd "$darwin_curdir"
     306            done # $darwin_arches
     307      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
     308            darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
     309            darwin_file=
     310            darwin_files=
     311            for darwin_file in $darwin_filelist; do
     312              darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
     313              lipo -create -output "$darwin_file" $darwin_files
     314            done # $darwin_filelist
     315            rm -rf unfat-$$
     316            cd "$darwin_orig_dir"
     317          else
     318            cd $darwin_orig_dir
     319            (cd $my_xdir && $AR x $my_xabs) || exit $?
     320          fi # $darwin_arches
     321        fi # $run
     322      ;;
     323      *)
     324        # We will extract separately just the conflicting names and we will
     325        # no longer touch any unique names. It is faster to leave these
     326        # extract automatically by $AR in one run.
     327        $show "(cd $my_xdir && $AR x $my_xabs)"
     328        $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
     329        if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
     330          :
     331        else
     332          $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
     333          $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
     334          $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
     335          do
     336            i=1
     337            while test "$i" -le "$count"
     338            do
     339              # Put our $i before any first dot (extension)
     340              # Never overwrite any file
     341              name_to="$name"
     342              while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
     343              do
     344                name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
     345              done
     346              $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
     347              $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
     348              i=`expr $i + 1`
     349            done
     350          done
     351        fi
     352        ;;
     353      esac
     354      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
     355    done
     356
     357    func_extract_archives_result="$my_oldobjs"
     358}
    157359# End of Shell function definitions
    158360#####################################
     361
     362# Darwin sucks
     363eval std_shrext=\"$shrext_cmds\"
    159364
    160365# Parse our command line options once, thoroughly.
     
    177382    tag)
    178383      tagname="$arg"
     384      preserve_args="${preserve_args}=$arg"
    179385
    180386      # Check whether tagname contains only valid characters
     
    182388      *[!-_A-Za-z0-9,/]*)
    183389        $echo "$progname: invalid tag name: $tagname" 1>&2
    184         exit 1
     390        exit $EXIT_FAILURE
    185391        ;;
    186392      esac
     
    192398        ;;
    193399      *)
    194         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
     400        if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
    195401          taglist="$taglist $tagname"
    196402          # Evaluate the configuration.
    197           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
     403          eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
    198404        else
    199405          $echo "$progname: ignoring unknown tag $tagname" 1>&2
     
    224430    $echo "This is free software; see the source for copying conditions.  There is NO"
    225431    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    226     exit 0
     432    exit $EXIT_SUCCESS
    227433    ;;
    228434
    229435  --config)
    230     ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
     436    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
    231437    # Now print the configurations for the tags.
    232438    for tagname in $taglist; do
    233       ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
     439      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
    234440    done
    235     exit 0
     441    exit $EXIT_SUCCESS
    236442    ;;
    237443
     
    239445    $echo "$progname: enabling shell trace mode"
    240446    set -x
     447    preserve_args="$preserve_args $arg"
    241448    ;;
    242449
     
    257464      $echo "disable static libraries"
    258465    fi
    259     exit 0
     466    exit $EXIT_SUCCESS
    260467    ;;
    261468
     
    269476  --quiet | --silent)
    270477    show=:
     478    preserve_args="$preserve_args $arg"
    271479    ;;
    272480
     
    276484    shift
    277485    prev=tag
     486    preserve_args="$preserve_args --tag"
    278487    ;;
    279488
     
    286495    $echo "$modename: unrecognized option \`$arg'" 1>&2
    287496    $echo "$help" 1>&2
    288     exit 1
     497    exit $EXIT_FAILURE
    289498    ;;
    290499
     
    299508  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
    300509  $echo "$help" 1>&2
    301   exit 1
     510  exit $EXIT_FAILURE
    302511fi
    303512
     
    308517
    309518if test -z "$show_help"; then
    310   archargs=
    311   case $host in
    312   *-*-darwin*)
    313     # For darwin, separate arch arguments and apply them to all compile/link
    314     # commands
    315     doarch=
    316     for arg; do
    317       if test -n "$doarch"; then
    318         archargs="$archargs -arch $arg"
    319         doarch=
    320         continue
    321       fi
    322       case $arg in
    323       -arch) doarch=y;;
    324       esac
    325     done
    326   esac
    327519
    328520  # Infer the operation mode.
     
    372564    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
    373565    $echo "$help" 1>&2
    374     exit 1
     566    exit $EXIT_FAILURE
    375567  fi
    376568
     
    387579    base_compile=
    388580    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
     581    suppress_opt=yes
    389582    suppress_output=
    390583    arg_mode=normal
    391584    libobj=
     585    later=
    392586
    393587    for arg
     
    412606          if test -n "$libobj" ; then
    413607            $echo "$modename: you cannot specify \`-o' more than once" 1>&2
    414             exit 1
     608            exit $EXIT_FAILURE
    415609          fi
    416610          arg_mode=target
     
    418612          ;;
    419613
    420         -static)
    421           build_old_libs=yes
     614        -static | -prefer-pic | -prefer-non-pic)
     615          later="$later $arg"
    422616          continue
    423617          ;;
    424618
    425         -prefer-pic)
    426           pic_mode=yes
    427           continue
    428           ;;
    429 
    430         -prefer-non-pic)
    431           pic_mode=no
     619        -no-suppress)
     620          suppress_opt=no
    432621          continue
    433622          ;;
     
    442631          lastarg=
    443632          save_ifs="$IFS"; IFS=','
    444           for arg in $args; do
     633          for arg in $args; do
    445634            IFS="$save_ifs"
    446635
     
    492681    arg)
    493682      $echo "$modename: you must specify an argument for -Xcompile"
    494       exit 1
     683      exit $EXIT_FAILURE
    495684      ;;
    496685    target)
    497686      $echo "$modename: you must specify a target with \`-o'" 1>&2
    498       exit 1
     687      exit $EXIT_FAILURE
    499688      ;;
    500689    *)
     
    529718    *)
    530719      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
    531       exit 1
     720      exit $EXIT_FAILURE
    532721      ;;
    533722    esac
    534723
    535     # Infer tagged configuration to use if any are available and
    536     # if one wasn't chosen via the "--tag" command line option.
    537     # Only attempt this if the compiler in the base compile
    538     # command doesn't match the default compiler.
    539     if test -n "$available_tags" && test -z "$tagname"; then
    540       case $base_compile in
    541       # Blanks in the command may have been stripped by the calling shell,
    542       # but not from the CC environment variable when configure was run.
    543       " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
    544       # Blanks at the start of $base_compile will cause this to fail
    545       # if we don't check for them as well.
    546       *)
    547         for z in $available_tags; do
    548           if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
    549             # Evaluate the configuration.
    550             eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
    551             case "$base_compile " in
    552             "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
    553               # The compiler in the base compile command matches
    554               # the one in the tagged configuration.
    555               # Assume this is the tagged configuration we want.
    556               tagname=$z
    557               break
    558               ;;
    559             esac
    560           fi
    561         done
    562         # If $tagname still isn't set, then no tagged configuration
    563         # was found and let the user know that the "--tag" command
    564         # line option must be used.
    565         if test -z "$tagname"; then
    566           $echo "$modename: unable to infer tagged configuration"
    567           $echo "$modename: specify a tag with \`--tag'" 1>&2
    568           exit 1
    569 #        else
    570 #          $echo "$modename: using $tagname tagged configuration"
    571         fi
     724    func_infer_tag $base_compile
     725
     726    for arg in $later; do
     727      case $arg in
     728      -static)
     729        build_old_libs=yes
     730        continue
     731        ;;
     732
     733      -prefer-pic)
     734        pic_mode=yes
     735        continue
     736        ;;
     737
     738      -prefer-non-pic)
     739        pic_mode=no
     740        continue
    572741        ;;
    573742      esac
    574     fi
     743    done
    575744
    576745    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
     
    586755      $echo "$modename: you must specify a compilation command" 1>&2
    587756      $echo "$help" 1>&2
    588       exit 1
     757      exit $EXIT_FAILURE
    589758    fi
    590759
     
    597766
    598767    $run $rm $removelist
    599     trap "$run $rm $removelist; exit 1" 1 2 15
     768    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
    600769
    601770    # On Cygwin there's no "real" PIC flag so we must build both object types
     
    616785      lockfile="$output_obj.lock"
    617786      removelist="$removelist $output_obj $lockfile"
    618       trap "$run $rm $removelist; exit 1" 1 2 15
     787      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
    619788    else
    620789      output_obj=
     
    626795    # We use this script file to make the link, it avoids creating a new file
    627796    if test "$need_locks" = yes; then
    628       until $run ln "$0" "$lockfile" 2>/dev/null; do
     797      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
    629798        $show "Waiting for $lockfile to be removed"
    630799        sleep 2
     
    644813
    645814        $run $rm $removelist
    646         exit 1
     815        exit $EXIT_FAILURE
    647816      fi
    648817      $echo $srcfile > "$lockfile"
     
    699868      else
    700869        test -n "$output_obj" && $run $rm $removelist
    701         exit 1
     870        exit $EXIT_FAILURE
    702871      fi
    703872
     
    719888
    720889        $run $rm $removelist
    721         exit 1
     890        exit $EXIT_FAILURE
    722891      fi
    723892
     
    740909
    741910      # Allow error messages only from the first compilation.
    742       suppress_output=' >/dev/null 2>&1'
     911      if test "$suppress_opt" = yes; then
     912        suppress_output=' >/dev/null 2>&1'
     913      fi
    743914    else
    744915      # No PIC object so indicate it doesn't exist in the libtool
     
    769940      else
    770941        $run $rm $removelist
    771         exit 1
     942        exit $EXIT_FAILURE
    772943      fi
    773944
     
    789960
    790961        $run $rm $removelist
    791         exit 1
     962        exit $EXIT_FAILURE
    792963      fi
    793964
     
    827998    fi
    828999
    829     exit 0
     1000    exit $EXIT_SUCCESS
    8301001    ;;
    8311002
     
    8531024    esac
    8541025    libtool_args="$nonopt"
    855     base_compile="$nonopt"
     1026    base_compile="$nonopt $@"
    8561027    compile_command="$nonopt"
    8571028    finalize_command="$nonopt"
     
    8851056    objs=
    8861057    non_pic_objects=
     1058    precious_files_regex=
    8871059    prefer_static_libs=no
    8881060    preload=no
     
    8981070    vinfo_number=no
    8991071
     1072    func_infer_tag $base_compile
     1073
    9001074    # We need to know -static, to get the right output filenames.
    9011075    for arg
     
    9291103    while test "$#" -gt 0; do
    9301104      arg="$1"
    931       base_compile="$base_compile $arg"
    9321105      shift
    9331106      case $arg in
     
    9931166          if test ! -f "$arg"; then
    9941167            $echo "$modename: symbol file \`$arg' does not exist"
    995             exit 1
     1168            exit $EXIT_FAILURE
    9961169          fi
    9971170          prev=
     
    10051178        inst_prefix)
    10061179          inst_prefix_dir="$arg"
     1180          prev=
     1181          continue
     1182          ;;
     1183        precious_regex)
     1184          precious_files_regex="$arg"
    10071185          prev=
    10081186          continue
     
    10401218                   test "$non_pic_object" = none; then
    10411219                  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
    1042                   exit 1
     1220                  exit $EXIT_FAILURE
    10431221                fi
    10441222
     
    10931271                if test -z "$run"; then
    10941272                  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
    1095                   exit 1
     1273                  exit $EXIT_FAILURE
    10961274                else
    10971275                  # Dry-run case.
     
    11141292          else
    11151293            $echo "$modename: link input file \`$save_arg' does not exist"
    1116             exit 1
     1294            exit $EXIT_FAILURE
    11171295          fi
    11181296          arg=$save_arg
     
    11261304          *)
    11271305            $echo "$modename: only absolute run-paths are allowed" 1>&2
    1128             exit 1
     1306            exit $EXIT_FAILURE
    11291307            ;;
    11301308          esac
     
    11661344          continue
    11671345          ;;
     1346        shrext)
     1347          shrext_cmds="$arg"
     1348          prev=
     1349          continue
     1350          ;;
    11681351        *)
    11691352          eval "$prev=\"\$arg\""
     
    12141397        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
    12151398          $echo "$modename: more than one -exported-symbols argument is not allowed"
    1216           exit 1
     1399          exit $EXIT_FAILURE
    12171400        fi
    12181401        if test "X$arg" = "X-export-symbols"; then
     
    12501433          if test -z "$absdir"; then
    12511434            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
    1252             exit 1
     1435            exit $EXIT_FAILURE
    12531436          fi
    12541437          dir="$absdir"
     
    13051488        ;;
    13061489
     1490     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     1491        deplibs="$deplibs $arg"
     1492        continue
     1493        ;;
     1494
    13071495      -module)
    13081496        module=yes
     
    13691557      -o) prev=output ;;
    13701558
     1559      -precious-files-regex)
     1560        prev=precious_regex
     1561        continue
     1562        ;;
     1563
    13711564      -release)
    13721565        prev=release
     
    13911584        *)
    13921585          $echo "$modename: only absolute run-paths are allowed" 1>&2
    1393           exit 1
     1586          exit $EXIT_FAILURE
    13941587          ;;
    13951588        esac
     
    15141707             test "$non_pic_object" = none; then
    15151708            $echo "$modename: cannot find name of object for \`$arg'" 1>&2
    1516             exit 1
     1709            exit $EXIT_FAILURE
    15171710          fi
    15181711
     
    15671760          if test -z "$run"; then
    15681761            $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
    1569             exit 1
     1762            exit $EXIT_FAILURE
    15701763          else
    15711764            # Dry-run case.
     
    16341827      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
    16351828      $echo "$help" 1>&2
    1636       exit 1
    1637     fi
    1638 
    1639     # Infer tagged configuration to use if any are available and
    1640     # if one wasn't chosen via the "--tag" command line option.
    1641     # Only attempt this if the compiler in the base link
    1642     # command doesn't match the default compiler.
    1643     if test -n "$available_tags" && test -z "$tagname"; then
    1644       case $base_compile in
    1645       # Blanks in the command may have been stripped by the calling shell,
    1646       # but not from the CC environment variable when configure was run.
    1647       "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
    1648       # Blanks at the start of $base_compile will cause this to fail
    1649       # if we don't check for them as well.
    1650       *)
    1651         for z in $available_tags; do
    1652           if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
    1653             # Evaluate the configuration.
    1654             eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
    1655             case $base_compile in
    1656             "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
    1657               # The compiler in $compile_command matches
    1658               # the one in the tagged configuration.
    1659               # Assume this is the tagged configuration we want.
    1660               tagname=$z
    1661               break
    1662               ;;
    1663             esac
    1664           fi
    1665         done
    1666         # If $tagname still isn't set, then no tagged configuration
    1667         # was found and let the user know that the "--tag" command
    1668         # line option must be used.
    1669         if test -z "$tagname"; then
    1670           $echo "$modename: unable to infer tagged configuration"
    1671           $echo "$modename: specify a tag with \`--tag'" 1>&2
    1672           exit 1
    1673 #       else
    1674 #         $echo "$modename: using $tagname tagged configuration"
    1675         fi
    1676         ;;
    1677       esac
     1829      exit $EXIT_FAILURE
    16781830    fi
    16791831
     
    17191871      $echo "$modename: you must specify an output file" 1>&2
    17201872      $echo "$help" 1>&2
    1721       exit 1
     1873      exit $EXIT_FAILURE
    17221874      ;;
    17231875    *.$libext) linkmode=oldlib ;;
     
    17291881    case $host in
    17301882    *cygwin* | *mingw* | *pw32*)
    1731       # don't eliminate duplcations in $postdeps and $predeps
     1883      # don't eliminate duplications in $postdeps and $predeps
    17321884      duplicate_compiler_generated_deps=yes
    17331885      ;;
     
    17821934          *)
    17831935            $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
    1784             exit 1
     1936            exit $EXIT_FAILURE
    17851937            ;;
    17861938          esac
     
    18201972        found=no
    18211973        case $deplib in
     1974        -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
     1975          if test "$linkmode,$pass" = "prog,link"; then
     1976            compile_deplibs="$deplib $compile_deplibs"
     1977            finalize_deplibs="$deplib $finalize_deplibs"
     1978          else
     1979            deplibs="$deplib $deplibs"
     1980          fi
     1981          continue
     1982          ;;
    18221983        -l*)
    18231984          if test "$linkmode" != lib && test "$linkmode" != prog; then
     
    18311992          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
    18321993          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
    1833             # Search the libtool library
    1834             lib="$searchdir/lib${name}.la"
    1835             if test -f "$lib"; then
    1836               found=yes
    1837               break
    1838             fi
     1994            for search_ext in .la $std_shrext .so .a; do
     1995              # Search the libtool library
     1996              lib="$searchdir/lib${name}${search_ext}"
     1997              if test -f "$lib"; then
     1998                if test "$search_ext" = ".la"; then
     1999                  found=yes
     2000                else
     2001                  found=no
     2002                fi
     2003                break 2
     2004              fi
     2005            done
    18392006          done
    18402007          if test "$found" != yes; then
     
    19012068            if test "$pass" = scan; then
    19022069              deplibs="$deplib $deplibs"
    1903               newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    19042070            else
    19052071              compile_deplibs="$deplib $compile_deplibs"
    19062072              finalize_deplibs="$deplib $finalize_deplibs"
    19072073            fi
     2074            newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    19082075            ;;
    19092076          *)
     
    19332100          case $linkmode in
    19342101          lib)
    1935             if test "$deplibs_check_method" != pass_all; then
     2102            valid_a_lib=no
     2103            case $deplibs_check_method in
     2104              match_pattern*)
     2105                set dummy $deplibs_check_method
     2106                match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
     2107                if eval $echo \"$deplib\" 2>/dev/null \
     2108                    | $SED 10q \
     2109                    | $EGREP "$match_pattern_regex" > /dev/null; then
     2110                  valid_a_lib=yes
     2111                fi
     2112                ;;
     2113              pass_all)
     2114                valid_a_lib=yes
     2115                ;;
     2116            esac
     2117            if test "$valid_a_lib" != yes; then
    19362118              $echo
    19372119              $echo "*** Warning: Trying to link with static lib archive $deplib."
     
    19842166        else
    19852167          $echo "$modename: cannot find the library \`$lib'" 1>&2
    1986           exit 1
     2168          exit $EXIT_FAILURE
    19872169        fi
    19882170
     
    19912173        else
    19922174          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    1993           exit 1
     2175          exit $EXIT_FAILURE
    19942176        fi
    19952177
     
    20272209            if test -z "$old_library"; then
    20282210              $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
    2029               exit 1
     2211              exit $EXIT_FAILURE
    20302212            fi
    20312213            # It is a libtool convenience library, so add in its objects.
     
    20442226          elif test "$linkmode" != prog && test "$linkmode" != lib; then
    20452227            $echo "$modename: \`$lib' is not a convenience library" 1>&2
    2046             exit 1
     2228            exit $EXIT_FAILURE
    20472229          fi
    20482230          continue
    20492231        fi # $pass = conv
    20502232
    2051    
     2233
    20522234        # Get the name of the library we link against.
    20532235        linklib=
     
    20572239        if test -z "$linklib"; then
    20582240          $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
    2059           exit 1
     2241          exit $EXIT_FAILURE
    20602242        fi
    20612243
     
    20642246          if test -z "$libdir"; then
    20652247            $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
    2066             exit 1
    2067           fi
    2068           if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
     2248            exit $EXIT_FAILURE
     2249          fi
     2250          if test -z "$dlname" ||
     2251             test "$dlopen_support" != yes ||
     2252             test "$build_libtool_libs" = no; then
    20692253            # If there is no dlname, no dlopen support or we're linking
    20702254            # statically, we need to preload.  We also need to preload any
     
    21042288          fi
    21052289        else
    2106           dir="$ladir/$objdir"
    2107           absdir="$abs_ladir/$objdir"
    2108           # Remove this search path later
    2109           notinst_path="$notinst_path $abs_ladir"
     2290          if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
     2291            dir="$ladir"
     2292            absdir="$abs_ladir"
     2293            # Remove this search path later
     2294            notinst_path="$notinst_path $abs_ladir"
     2295          else
     2296            dir="$ladir/$objdir"
     2297            absdir="$abs_ladir/$objdir"
     2298            # Remove this search path later
     2299            notinst_path="$notinst_path $abs_ladir"
     2300          fi
    21102301        fi # $installed = yes
    21112302        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
     
    21152306          if test -z "$libdir"; then
    21162307            $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
    2117             exit 1
     2308            exit $EXIT_FAILURE
    21182309          fi
    21192310          # Prefer using a static library (so that no silly _DYNAMIC symbols
     
    21422333        fi
    21432334
    2144    
     2335
    21452336        if test "$linkmode" = prog && test "$pass" != link; then
    21462337          newlib_search_path="$newlib_search_path $ladir"
     
    22292420          fi
    22302421          # This is a shared library
    2231        
    2232       # Warn about portability, can't link against -module's on some systems (darwin)
    2233       if test "$shouldnotlink" = yes && test "$pass" = link ; then
     2422
     2423          # Warn about portability, can't link against -module's on
     2424          # some systems (darwin)
     2425          if test "$shouldnotlink" = yes && test "$pass" = link ; then
    22342426            $echo
    22352427            if test "$linkmode" = prog; then
     
    22382430              $echo "*** Warning: Linking the shared library $output against the loadable module"
    22392431            fi
    2240             $echo "*** $linklib is not portable!"   
    2241       fi         
     2432            $echo "*** $linklib is not portable!"
     2433          fi
    22422434          if test "$linkmode" = lib &&
    22432435             test "$hardcode_into_libs" = yes; then
     
    22962488            else
    22972489              $show "extracting exported symbol list from \`$soname'"
    2298               save_ifs="$IFS"; IFS=$_S_
    2299               eval cmds=\"$extract_expsyms_cmds\"
     2490              save_ifs="$IFS"; IFS='~'
     2491              cmds=$extract_expsyms_cmds
    23002492              for cmd in $cmds; do
    23012493                IFS="$save_ifs"
     2494                eval cmd=\"$cmd\"
    23022495                $show "$cmd"
    23032496                $run eval "$cmd" || exit $?
     
    23092502            if test -f "$output_objdir/$newlib"; then :; else
    23102503              $show "generating import library for \`$soname'"
    2311               save_ifs="$IFS"; IFS=$_S_
    2312               eval cmds=\"$old_archive_from_expsyms_cmds\"
     2504              save_ifs="$IFS"; IFS='~'
     2505              cmds=$old_archive_from_expsyms_cmds
    23132506              for cmd in $cmds; do
    23142507                IFS="$save_ifs"
     2508                eval cmd=\"$cmd\"
    23152509                $show "$cmd"
    23162510                $run eval "$cmd" || exit $?
     
    23352529                  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
    23362530                  *-*-darwin* )
    2337                     # if the lib is a module then we can not link against it, someone
    2338                     # is ignoring the new warnings I added
    2339                     if /usr/bin/file -L $add 2> /dev/null | grep "bundle" >/dev/null ; then
     2531                    # if the lib is a module then we can not link against
     2532                    # it, someone is ignoring the new warnings I added
     2533                    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
    23402534                      $echo "** Warning, lib $linklib is a module, not a shared library"
    23412535                      if test -z "$old_library" ; then
     
    23452539                      else
    23462540                        add="$dir/$old_library"
    2347                       fi 
     2541                      fi
    23482542                    fi
    23492543                esac
     
    23702564                  case "$libdir" in
    23712565                    [\\/]*)
    2372                       add_dir="-L$inst_prefix_dir$libdir $add_dir"
     2566                      add_dir="$add_dir -L$inst_prefix_dir$libdir"
    23732567                      ;;
    23742568                  esac
     
    23872581            if test "$lib_linked" != yes; then
    23882582              $echo "$modename: configuration error: unsupported hardcode properties"
    2389               exit 1
     2583              exit $EXIT_FAILURE
    23902584            fi
    23912585
     
    24302624              add="-l$name"
    24312625            elif test "$hardcode_automatic" = yes; then
    2432               if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then
     2626              if test -n "$inst_prefix_dir" &&
     2627                 test -f "$inst_prefix_dir$libdir/$linklib" ; then
    24332628                add="$inst_prefix_dir$libdir/$linklib"
    24342629              else
     
    24422637                case "$libdir" in
    24432638                  [\\/]*)
    2444                     add_dir="-L$inst_prefix_dir$libdir $add_dir"
     2639                    add_dir="$add_dir -L$inst_prefix_dir$libdir"
    24452640                    ;;
    24462641                esac
     
    25102705        if test "$linkmode" = lib; then
    25112706          if test -n "$dependency_libs" &&
    2512              { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
     2707             { test "$hardcode_into_libs" != yes ||
     2708               test "$build_old_libs" = yes ||
    25132709               test "$link_static" = yes; }; then
    25142710            # Extract -R from dependency_libs
     
    25672763                  if test -z "$libdir"; then
    25682764                    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    2569                     exit 1
     2765                    exit $EXIT_FAILURE
    25702766                  fi
    25712767                  if test "$absdir" != "$libdir"; then
     
    25772773                case $host in
    25782774                *-*-darwin*)
    2579                   # we do not want to link against static libs, but need to link against shared
     2775                  # we do not want to link against static libs,
     2776                  # but need to link against shared
    25802777                  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
    25812778                  if test -n "$deplibrary_names" ; then
     
    25852782                    if test -f "$path/$depdepl" ; then
    25862783                      depdepl="$path/$depdepl"
    2587                    fi
    2588                     newlib_search_path="$newlib_search_path $path"
    2589                     path=""
     2784                    fi
     2785                    # do not add paths which are already there
     2786                    case " $newlib_search_path " in
     2787                    *" $path "*) ;;
     2788                    *) newlib_search_path="$newlib_search_path $path";;
     2789                    esac
    25902790                  fi
     2791                  path=""
    25912792                  ;;
    25922793                *)
    2593                 path="-L$path"
     2794                  path="-L$path"
     2795                  ;;
     2796                esac
    25942797                ;;
    2595                 esac
    2596                
    2597                 ;;
    2598                   -l*)
     2798              -l*)
    25992799                case $host in
    26002800                *-*-darwin*)
    2601                  # Again, we only want to link against shared libraries
    2602                  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
    2603                  for tmp in $newlib_search_path ; do
    2604                      if test -f "$tmp/lib$tmp_libs.dylib" ; then
    2605                        eval depdepl="$tmp/lib$tmp_libs.dylib"
    2606                        break
    2607                      fi 
    2608          done
    2609          path=""
     2801                  # Again, we only want to link against shared libraries
     2802                  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
     2803                  for tmp in $newlib_search_path ; do
     2804                    if test -f "$tmp/lib$tmp_libs.dylib" ; then
     2805                      eval depdepl="$tmp/lib$tmp_libs.dylib"
     2806                      break
     2807                    fi
     2808                  done
     2809                  path=""
    26102810                  ;;
    26112811                *) continue ;;
    2612                 esac             
     2812                esac
    26132813                ;;
    26142814              *) continue ;;
     
    26162816              case " $deplibs " in
    26172817              *" $depdepl "*) ;;
    2618               *) deplibs="$deplibs $depdepl" ;;
    2619               esac           
     2818              *) deplibs="$depdepl $deplibs" ;;
     2819              esac
    26202820              case " $deplibs " in
    26212821              *" $path "*) ;;
     
    27072907        done # for var
    27082908      fi
    2709       # Last step: remove runtime libs from dependency_libs (they stay in deplibs)
     2909      # Last step: remove runtime libs from dependency_libs
     2910      # (they stay in deplibs)
    27102911      tmp_libs=
    27112912      for i in $dependency_libs ; do
     
    27672968      lib*)
    27682969        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
    2769         eval shared_ext=\"$shrext\"
     2970        eval shared_ext=\"$shrext_cmds\"
    27702971        eval libname=\"$libname_spec\"
    27712972        ;;
     
    27742975          $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
    27752976          $echo "$help" 1>&2
    2776           exit 1
     2977          exit $EXIT_FAILURE
    27772978        fi
    27782979        if test "$need_lib_prefix" != no; then
    27792980          # Add the "lib" prefix for modules if required
    27802981          name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
    2781           eval shared_ext=\"$shrext\"
     2982          eval shared_ext=\"$shrext_cmds\"
    27822983          eval libname=\"$libname_spec\"
    27832984        else
     
    27902991        if test "$deplibs_check_method" != pass_all; then
    27912992          $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
    2792           exit 1
     2993          exit $EXIT_FAILURE
    27932994        else
    27942995          $echo
     
    28383039          $echo "$modename: too many parameters to \`-version-info'" 1>&2
    28393040          $echo "$help" 1>&2
    2840           exit 1
     3041          exit $EXIT_FAILURE
    28413042        fi
    28423043
     
    28443045        # this retains compatibility with .la files and attempts
    28453046        # to make the code below a bit more comprehensible
    2846        
     3047
    28473048        case $vinfo_number in
    28483049        yes)
     
    28883089          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
    28893090          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2890           exit 1
     3091          exit $EXIT_FAILURE
    28913092          ;;
    28923093        esac
     
    28973098          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
    28983099          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2899           exit 1
     3100          exit $EXIT_FAILURE
    29003101          ;;
    29013102        esac
     
    29063107          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
    29073108          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2908           exit 1
     3109          exit $EXIT_FAILURE
    29093110          ;;
    29103111        esac
     
    29133114          $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
    29143115          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2915           exit 1
     3116          exit $EXIT_FAILURE
    29163117        fi
    29173118
     
    29303131          # Darwin ld doesn't like 0 for these options...
    29313132          minor_current=`expr $current + 1`
    2932           verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
     3133          verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
    29333134          ;;
    29343135
     
    30023203          $echo "$modename: unknown library version type \`$version_type'" 1>&2
    30033204          $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
    3004           exit 1
     3205          exit $EXIT_FAILURE
    30053206          ;;
    30063207        esac
     
    30563257               ;;
    30573258            $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
     3259               if test "X$precious_files_regex" != "X"; then
     3260                 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
     3261                 then
     3262                   continue
     3263                 fi
     3264               fi
    30583265               removelist="$removelist $p"
    30593266               ;;
     
    31763383EOF
    31773384          $rm conftest
    3178           $LTCC $archargs -o conftest conftest.c $deplibs
     3385          $LTCC -o conftest conftest.c $deplibs
    31793386          if test "$?" -eq 0 ; then
    31803387            ldd_output=`ldd conftest`
     
    32213428              if test "$name" != "" && test "$name" != "0"; then
    32223429                $rm conftest
    3223                 $LTCC $archargs -o conftest conftest.c $i
     3430                $LTCC -o conftest conftest.c $i
    32243431                # Did it work?
    32253432                if test "$?" -eq 0 ; then
     
    35353742
    35363743        # Get the real and link names of the library.
    3537         eval shared_ext=\"$shrext\"
     3744        eval shared_ext=\"$shrext_cmds\"
    35383745        eval library_names=\"$library_names_spec\"
    35393746        set dummy $library_names
     
    35653772            export_symbols="$output_objdir/$libname.exp"
    35663773            $run $rm $export_symbols
    3567             eval cmds=\"$export_symbols_cmds\"
    3568             save_ifs="$IFS"; IFS=$_S_
     3774            cmds=$export_symbols_cmds
     3775            save_ifs="$IFS"; IFS='~'
    35693776            for cmd in $cmds; do
    35703777              IFS="$save_ifs"
     3778              eval cmd=\"$cmd\"
    35713779              if len=`expr "X$cmd" : ".*"` &&
    35723780               test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
     
    35983806                case " $convenience " in
    35993807                *" $test_deplib "*) ;;
    3600                 *) 
     3808                *)
    36013809                        tmp_deplibs="$tmp_deplibs $test_deplib"
    36023810                        ;;
    36033811                esac
    36043812        done
    3605         deplibs="$tmp_deplibs" 
     3813        deplibs="$tmp_deplibs"
    36063814
    36073815        if test -n "$convenience"; then
     
    36113819          else
    36123820            gentop="$output_objdir/${outputname}x"
    3613             $show "${rm}r $gentop"
    3614             $run ${rm}r "$gentop"
    3615             $show "$mkdir $gentop"
    3616             $run $mkdir "$gentop"
    3617             status=$?
    3618             if test "$status" -ne 0 && test ! -d "$gentop"; then
    3619               exit $status
    3620             fi
    36213821            generated="$generated $gentop"
    36223822
    3623             for xlib in $convenience; do
    3624               # Extract the objects.
    3625               case $xlib in
    3626               [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    3627               *) xabs=`pwd`"/$xlib" ;;
    3628               esac
    3629               xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    3630               xdir="$gentop/$xlib"
    3631 
    3632               $show "${rm}r $xdir"
    3633               $run ${rm}r "$xdir"
    3634               $show "$mkdir $xdir"
    3635               $run $mkdir "$xdir"
    3636               status=$?
    3637               if test "$status" -ne 0 && test ! -d "$xdir"; then
    3638                 exit $status
    3639               fi
    3640               case $host in
    3641               *-*-darwin*)
    3642                 # ranlib-ed archives of fat binaries are converted to a fat xabs that
    3643                 # ar can't use.  So we to split the fat xabs into non-fat ones to unpack.
    3644                 # We can't deal with duplicate names, since 'ar xN' and 'uniq -cd' don't work.
    3645                 d_archs=`lipo -info $xabs 2> /dev/null | grep '^Architectures' | sed 's/^.*: //'`
    3646                 if test -n "$d_archs"; then
    3647                   $echo "$modename: manually unpacking fat archive $xabs" 1>&2
    3648                   d_name=`basename $xabs`
    3649                   d_dir="/tmp/fat_ar.$$"
    3650                   d_files=''
    3651 
    3652                   for d_arch in $d_archs; do
    3653                     d_archdir="$d_dir/$d_arch"
    3654                     $show "$mkdir -p $d_archdir"
    3655                     $run $mkdir -p "$d_archdir"
    3656 
    3657                     $show "lipo -thin $d_arch $xabs -o $d_dir/$d_name"
    3658                     $run lipo -thin $d_arch "$xabs" -o "$d_dir/$d_name"
    3659 
    3660                     $show "(cd $d_archdir && $AR x $d_dir/$d_name)"
    3661                     $run eval "(cd \$d_archdir && \$AR x \$d_dir/\$d_name)" || exit $?
    3662 
    3663                     $show "${rm} $d_dir/$d_name"
    3664                     $run ${rm} "$d_dir/$d_name"
    3665                   done
    3666 
    3667                   # Can't deal with blanks in file names
    3668                   $run eval "d_files=\`find \$d_dir -type f | sed -e 's,.*/,,' -e '/ /d' | sort -u\`" || exit $?
    3669 
    3670                   for d_file in $d_files; do
    3671                     $run eval "d_f=\`find \$d_dir -name \$d_file -print\`" || exit $?
    3672                     $show "lipo -create $d_f -o $xdir/$d_file"
    3673                     $run eval "lipo -create \$d_f -o \"\$xdir/\$d_file\"" || exit $?
    3674                   done
    3675 
    3676                   $show "${rm}r $d_dir"
    3677                   $run ${rm}r "$d_dir"
    3678                 else
    3679                   $show "(cd $xdir && $AR x $xabs)"
    3680                   $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    3681                 fi
    3682                 ;;
    3683               *)
    3684                 # We will extract separately just the conflicting names and we will no
    3685                 # longer touch any unique names. It is faster to leave these extract
    3686                 # automatically by $AR in one run.
    3687                 $show "(cd $xdir && $AR x $xabs)"
    3688                 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    3689                 if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    3690                   :
    3691                 else
    3692                   $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    3693                   $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    3694                   $AR t "$xabs" | sort | uniq -cd | while read -r count name
    3695                   do
    3696                     i=1
    3697                     while test "$i" -le "$count"
    3698                     do
    3699                      # Put our $i before any first dot (extension)
    3700                      # Never overwrite any file
    3701                      name_to="$name"
    3702                      while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    3703                      do
    3704                        name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    3705                      done
    3706                      $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    3707                      $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    3708                      i=`expr $i + 1`
    3709                     done
    3710                   done
    3711                 fi
    3712                 ;;
    3713               esac
    3714 
    3715               libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
    3716             done
    3717           fi
    3718         fi
    3719 
     3823            func_extract_archives $gentop $convenience
     3824            libobjs="$libobjs $func_extract_archives_result"
     3825          fi
     3826        fi
     3827       
    37203828        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
    37213829          eval flag=\"$thread_safe_flag_spec\"
     
    37313839        if test "$module" = yes && test -n "$module_cmds" ; then
    37323840          if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
    3733             eval cmds=\"$module_expsym_cmds\"
     3841            eval test_cmds=\"$module_expsym_cmds\"
     3842            cmds=$module_expsym_cmds
    37343843          else
    3735             eval cmds=\"$module_cmds\"
     3844            eval test_cmds=\"$module_cmds\"
     3845            cmds=$module_cmds
    37363846          fi
    37373847        else
    37383848        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
    3739           eval cmds=\"$archive_expsym_cmds\"
     3849          eval test_cmds=\"$archive_expsym_cmds\"
     3850          cmds=$archive_expsym_cmds
    37403851        else
    3741           eval cmds=\"$archive_cmds\"
    3742           fi
    3743         fi
    3744 
    3745         if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` &&
     3852          eval test_cmds=\"$archive_cmds\"
     3853          cmds=$archive_cmds
     3854          fi
     3855        fi
     3856
     3857        if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
    37463858           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
    37473859          :
     
    37893901                # All subsequent reloadable object files will link in
    37903902                # the last one created.
    3791                 eval concat_cmds=\"\$concat_cmds${_S_}$reload_cmds $objlist $last_robj\"
     3903                eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
    37923904              fi
    37933905              last_robj=$output_objdir/$save_output-${k}.$objext
     
    38013913          # reloadable object file.  All subsequent reloadable object
    38023914          # files will link in the last one created.
    3803           test -z "$concat_cmds" || concat_cmds=$concat_cmds${_S_}
     3915          test -z "$concat_cmds" || concat_cmds=$concat_cmds~
    38043916          eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
    38053917
     
    38103922            libobjs=$output
    38113923            # Append the command to create the export file.
    3812             eval concat_cmds=\"\$concat_cmds${_S_}$export_symbols_cmds\"
     3924            eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
    38133925          fi
    38143926
     
    38253937
    38263938          # Loop through the commands generated above and execute them.
    3827           save_ifs="$IFS"; IFS=$_S_
     3939          save_ifs="$IFS"; IFS='~'
    38283940          for cmd in $concat_cmds; do
    38293941            IFS="$save_ifs"
     
    38443956
    38453957          # Do each of the archive commands.
     3958          if test "$module" = yes && test -n "$module_cmds" ; then
     3959            if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
     3960              cmds=$module_expsym_cmds
     3961            else
     3962              cmds=$module_cmds
     3963            fi
     3964          else
    38463965          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
    3847             eval cmds=\"$archive_expsym_cmds\"
     3966            cmds=$archive_expsym_cmds
    38483967          else
    3849             eval cmds=\"$archive_cmds\"
     3968            cmds=$archive_cmds
     3969            fi
    38503970          fi
    38513971
    38523972          # Append the command to remove the reloadable object files
    38533973          # to the just-reset $cmds.
    3854           eval cmds=\"\$cmds${_S_}$rm $delfiles\"
    3855         fi
    3856         save_ifs="$IFS"; IFS=$_S_
     3974          eval cmds=\"\$cmds~\$rm $delfiles\"
     3975        fi
     3976        save_ifs="$IFS"; IFS='~'
    38573977        for cmd in $cmds; do
    38583978          IFS="$save_ifs"
     3979          eval cmd=\"$cmd\"
    38593980          $show "$cmd"
    38603981          $run eval "$cmd" || exit $?
     
    38653986        if test "$mode" = relink; then
    38663987          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
    3867           exit 0
     3988          exit $EXIT_SUCCESS
    38683989        fi
    38693990
     
    39134034        if test -n "$objs$old_deplibs"; then
    39144035          $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
    3915           exit 1
     4036          exit $EXIT_FAILURE
    39164037        fi
    39174038        libobj="$output"
     
    39424063        else
    39434064          gentop="$output_objdir/${obj}x"
    3944           $show "${rm}r $gentop"
    3945           $run ${rm}r "$gentop"
    3946           $show "$mkdir $gentop"
    3947           $run $mkdir "$gentop"
    3948           status=$?
    3949           if test "$status" -ne 0 && test ! -d "$gentop"; then
    3950             exit $status
    3951           fi
    39524065          generated="$generated $gentop"
    39534066
    3954           for xlib in $convenience; do
    3955             # Extract the objects.
    3956             case $xlib in
    3957             [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    3958             *) xabs=`pwd`"/$xlib" ;;
    3959             esac
    3960             xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    3961             xdir="$gentop/$xlib"
    3962 
    3963             $show "${rm}r $xdir"
    3964             $run ${rm}r "$xdir"
    3965             $show "$mkdir $xdir"
    3966             $run $mkdir "$xdir"
    3967             status=$?
    3968             if test "$status" -ne 0 && test ! -d "$xdir"; then
    3969               exit $status
    3970             fi
    3971             case $host in
    3972             *-*-darwin*)
    3973               # ranlib-ed archives of fat binaries are converted to a fat xabs that
    3974               # ar can't use.  So we to split the fat xabs into non-fat ones to unpack.
    3975               # We can't deal with duplicate names, since 'ar xN' and 'uniq -cd' don't work.
    3976               d_archs=`lipo -info $xabs 2> /dev/null | grep '^Architectures' | sed 's/^.*: //'`
    3977               if test -n "$d_archs"; then
    3978                 $echo "$modename: manually unpacking fat archive $xabs" 1>&2
    3979                 d_name=`basename $xabs`
    3980                 d_dir="/tmp/fat_ar.$$"
    3981                 d_files=''
    3982 
    3983                 for d_arch in $d_archs; do
    3984                   d_archdir="$d_dir/$d_arch"
    3985                   $show "$mkdir -p $d_archdir"
    3986                   $run $mkdir -p "$d_archdir"
    3987 
    3988                   $show "lipo -thin $d_arch $xabs -o $d_dir/$d_name"
    3989                   $run lipo -thin $d_arch "$xabs" -o "$d_dir/$d_name"
    3990 
    3991                   $show "(cd $d_archdir && $AR x $d_dir/$d_name)"
    3992                   $run eval "(cd \$d_archdir && \$AR x \$d_dir/\$d_name)" || exit $?
    3993 
    3994                   $show "${rm} $d_dir/$d_name"
    3995                   $run ${rm} "$d_dir/$d_name"
    3996                 done
    3997 
    3998                 # Can't deal with blanks in file names
    3999                 $run eval "d_files=\`find \$d_dir -type f | sed -e 's,.*/,,' -e '/ /d' | sort -u\`" || exit $?
    4000 
    4001                 for d_file in $d_files; do
    4002                   $run eval "d_f=\`find \$d_dir -name \$d_file -print\`" || exit $?
    4003                   $show "lipo -create $d_f -o $xdir/$d_file"
    4004                   $run eval "lipo -create \$d_f -o \"\$xdir/\$d_file\"" || exit $?
    4005                 done
    4006 
    4007                 $show "${rm}r $d_dir"
    4008                 $run ${rm}r "$d_dir"
    4009               else
    4010                 $show "(cd $xdir && $AR x $xabs)"
    4011                 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    4012               fi
    4013               ;;
    4014             *)
    4015               # We will extract separately just the conflicting names and we will no
    4016               # longer touch any unique names. It is faster to leave these extract
    4017               # automatically by $AR in one run.
    4018               $show "(cd $xdir && $AR x $xabs)"
    4019               $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    4020               if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    4021                 :
    4022               else
    4023                 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    4024                 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    4025                 $AR t "$xabs" | sort | uniq -cd | while read -r count name
    4026                 do
    4027                   i=1
    4028                   while test "$i" -le "$count"
    4029                   do
    4030                    # Put our $i before any first dot (extension)
    4031                    # Never overwrite any file
    4032                    name_to="$name"
    4033                    while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    4034                    do
    4035                      name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    4036                    done
    4037                    $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    4038                    $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    4039                    i=`expr $i + 1`
    4040                   done
    4041                 done
    4042               fi
    4043               ;;
    4044             esac
    4045 
    4046             reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
    4047           done
     4067          func_extract_archives $gentop $convenience
     4068          reload_conv_objs="$reload_objs $func_extract_archives_result"
    40484069        fi
    40494070      fi
     
    40534074
    40544075      output="$obj"
    4055       eval cmds=\"$reload_cmds\"
    4056       save_ifs="$IFS"; IFS=$_S_
     4076      cmds=$reload_cmds
     4077      save_ifs="$IFS"; IFS='~'
    40574078      for cmd in $cmds; do
    40584079        IFS="$save_ifs"
     4080        eval cmd=\"$cmd\"
    40594081        $show "$cmd"
    40604082        $run eval "$cmd" || exit $?
     
    40694091        fi
    40704092
    4071         exit 0
     4093        exit $EXIT_SUCCESS
    40724094      fi
    40734095
     
    40824104        # $show "echo timestamp > $libobj"
    40834105        # $run eval "echo timestamp > $libobj" || exit $?
    4084         exit 0
     4106        exit $EXIT_SUCCESS
    40854107      fi
    40864108
     
    40894111        reload_objs="$libobjs $reload_conv_objs"
    40904112        output="$libobj"
    4091         eval cmds=\"$reload_cmds\"
    4092         save_ifs="$IFS"; IFS=$_S_
     4113        cmds=$reload_cmds
     4114        save_ifs="$IFS"; IFS='~'
    40934115        for cmd in $cmds; do
    40944116          IFS="$save_ifs"
     4117          eval cmd=\"$cmd\"
    40954118          $show "$cmd"
    40964119          $run eval "$cmd" || exit $?
     
    41044127      fi
    41054128
    4106       exit 0
     4129      exit $EXIT_SUCCESS
    41074130      ;;
    41084131
     
    44094432
    44104433          # Now compile the dynamic symbol file.
    4411           $show "(cd $output_objdir && $LTCC $archargs -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
    4412           $run eval '(cd $output_objdir && $LTCC $archargs -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
     4434          $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
     4435          $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
    44134436
    44144437          # Clean up the generated files.
     
    44224445        *)
    44234446          $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
    4424           exit 1
     4447          exit $EXIT_FAILURE
    44254448          ;;
    44264449        esac
     
    45104533        $show "$link_command"
    45114534        $run eval "$link_command" || exit $?
    4512         exit 0
     4535        exit $EXIT_SUCCESS
    45134536      fi
    45144537
     
    45654588
    45664589      # Quote $echo for shipping.
    4567       if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
    4568         case $0 in
    4569         [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
    4570         *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
     4590      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
     4591        case $progpath in
     4592        [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
     4593        *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
    45714594        esac
    45724595        qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
     
    45944617            cwrapper=`$echo ${output}.exe`
    45954618            $rm $cwrappersource $cwrapper
    4596             trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
     4619            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
    45974620
    45984621            cat > $cwrappersource <<EOF
     
    46034626   The $output program cannot be directly executed until all the libtool
    46044627   libraries that it depends on are installed.
    4605    
     4628
    46064629   This wrapper executable should never be moved out of the build directory.
    46074630   If it is, it will not operate correctly.
     
    46354658  defined (__OS2__)
    46364659#define HAVE_DOS_BASED_FILE_SYSTEM
    4637 #ifndef DIR_SEPARATOR_2 
     4660#ifndef DIR_SEPARATOR_2
    46384661#define DIR_SEPARATOR_2 '\\'
    46394662#endif
     
    46664689  char **newargz;
    46674690  int i;
    4668  
     4691
    46694692  program_name = (char *) xstrdup ((char *) basename (argv[0]));
    46704693  newargz = XMALLOC(char *, argc+2);
     
    46794702  /* we know the script has the same name, without the .exe */
    46804703  /* so make sure newargz[1] doesn't end in .exe */
    4681   strendzap(newargz[1],".exe"); 
     4704  strendzap(newargz[1],".exe");
    46824705  for (i = 1; i < argc; i++)
    46834706    newargz[i+1] = xstrdup(argv[i]);
     
    47024725}
    47034726
    4704 char * 
     4727char *
    47054728xstrdup (const char *string)
    47064729{
     
    47164739#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    47174740  /* Skip over the disk name in MSDOS pathnames. */
    4718   if (isalpha (name[0]) && name[1] == ':') 
     4741  if (isalpha (name[0]) && name[1] == ':')
    47194742    name += 2;
    47204743#endif
     
    47264749}
    47274750
    4728 char * 
     4751char *
    47294752fnqualify(const char *path)
    47304753{
     
    47544777
    47554778char *
    4756 strendzap(char *str, const char *pat) 
     4779strendzap(char *str, const char *pat)
    47574780{
    47584781  size_t len, patlen;
     
    47744797
    47754798static void
    4776 lt_error_core (int exit_status, const char * mode, 
     4799lt_error_core (int exit_status, const char * mode,
    47774800          const char * message, va_list ap)
    47784801{
     
    47994822          # Since the "real" binary is built for $host, then this
    48004823          # wrapper might as well be built for $host, too.
    4801           $run $LTCC $archargs -s -o $cwrapper $cwrappersource
     4824          $run $LTCC -s -o $cwrapper $cwrappersource
    48024825          ;;
    48034826        esac
    48044827        $rm $output
    4805         trap "$rm $output; exit 1" 1 2 15
     4828        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
    48064829
    48074830        $echo > $output "\
     
    48244847# The HP-UX ksh and POSIX shell print the target directory to stdout
    48254848# if CDPATH is set.
    4826 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
     4849(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    48274850
    48284851relink_command=\"$relink_command\"
     
    49034926        $echo \"\$relink_command_output\" >&2
    49044927        $rm \"\$progdir/\$file\"
    4905         exit 1
     4928        exit $EXIT_FAILURE
    49064929      fi
    49074930    fi
     
    49654988        $echo >> $output "\
    49664989      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
    4967       exit 1
     4990      exit $EXIT_FAILURE
    49684991    fi
    49694992  else
     
    49724995    \$echo \"This script is just a wrapper for \$program.\" 1>&2
    49734996    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
    4974     exit 1
     4997    exit $EXIT_FAILURE
    49754998  fi
    49764999fi\
     
    49785001        chmod +x $output
    49795002      fi
    4980       exit 0
     5003      exit $EXIT_SUCCESS
    49815004      ;;
    49825005    esac
     
    50015024      if test -n "$addlibs"; then
    50025025        gentop="$output_objdir/${outputname}x"
    5003         $show "${rm}r $gentop"
    5004         $run ${rm}r "$gentop"
    5005         $show "$mkdir $gentop"
    5006         $run $mkdir "$gentop"
    5007         status=$?
    5008         if test "$status" -ne 0 && test ! -d "$gentop"; then
    5009           exit $status
    5010         fi
    50115026        generated="$generated $gentop"
    50125027
    5013         # Add in members from convenience archives.
    5014         for xlib in $addlibs; do
    5015           # Extract the objects.
    5016           case $xlib in
    5017           [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    5018           *) xabs=`pwd`"/$xlib" ;;
    5019           esac
    5020           xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    5021           xdir="$gentop/$xlib"
    5022 
    5023           $show "${rm}r $xdir"
    5024           $run ${rm}r "$xdir"
    5025           $show "$mkdir $xdir"
    5026           $run $mkdir "$xdir"
    5027           status=$?
    5028           if test "$status" -ne 0 && test ! -d "$xdir"; then
    5029             exit $status
    5030           fi
    5031           case $host in
    5032           *-*-darwin*)
    5033             # ranlib-ed archives of fat binaries are converted to a fat xabs that
    5034             # ar can't use.  So we to split the fat xabs into non-fat ones to unpack.
    5035             # We can't deal with duplicate names, since 'ar xN' and 'uniq -cd' don't work.
    5036             d_archs=`lipo -info $xabs 2> /dev/null | grep '^Architectures' | sed 's/^.*: //'`
    5037             if test -n "$d_archs"; then
    5038               $echo "$modename: manually unpacking fat archive $xabs" 1>&2
    5039               d_name=`basename $xabs`
    5040               d_dir="/tmp/fat_ar.$$"
    5041               d_files=''
    5042 
    5043               for d_arch in $d_archs; do
    5044                 d_archdir="$d_dir/$d_arch"
    5045                 $show "$mkdir -p $d_archdir"
    5046                 $run $mkdir -p "$d_archdir"
    5047 
    5048                 $show "lipo -thin $d_arch $xabs -o $d_dir/$d_name"
    5049                 $run lipo -thin $d_arch "$xabs" -o "$d_dir/$d_name"
    5050 
    5051                 $show "(cd $d_archdir && $AR x $d_dir/$d_name)"
    5052                 $run eval "(cd \$d_archdir && \$AR x \$d_dir/\$d_name)" || exit $?
    5053 
    5054                 $show "${rm} $d_dir/$d_name"
    5055                 $run ${rm} "$d_dir/$d_name"
    5056               done
    5057 
    5058               # Can't deal with blanks in file names
    5059               $run eval "d_files=\`find \$d_dir -type f | sed -e 's,.*/,,' -e '/ /d' | sort -u\`" || exit $?
    5060 
    5061               for d_file in $d_files; do
    5062                 $run eval "d_f=\`find \$d_dir -name \$d_file -print\`" || exit $?
    5063                 $show "lipo -create $d_f -o $xdir/$d_file"
    5064                 $run eval "lipo -create \$d_f -o \"\$xdir/\$d_file\"" || exit $?
    5065               done
    5066 
    5067               $show "${rm}r $d_dir"
    5068               $run ${rm}r "$d_dir"
    5069             else
    5070               $show "(cd $xdir && $AR x $xabs)"
    5071               $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    5072             fi
    5073             ;;
    5074           *)
    5075             # We will extract separately just the conflicting names and we will no
    5076             # longer touch any unique names. It is faster to leave these extract
    5077             # automatically by $AR in one run.
    5078             $show "(cd $xdir && $AR x $xabs)"
    5079             $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    5080             if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    5081               :
    5082             else
    5083               $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    5084               $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    5085               $AR t "$xabs" | sort | uniq -cd | while read -r count name
    5086               do
    5087                 i=1
    5088                 while test "$i" -le "$count"
    5089                 do
    5090                  # Put our $i before any first dot (extension)
    5091                  # Never overwrite any file
    5092                  name_to="$name"
    5093                  while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    5094                  do
    5095                    name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    5096                  done
    5097                  $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    5098                  $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    5099                  i=`expr $i + 1`
    5100                 done
    5101               done
    5102             fi
    5103             ;;
    5104           esac
    5105 
    5106           oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
    5107         done
     5028        func_extract_archives $gentop $addlibs
     5029        oldobjs="$oldobjs $func_extract_archives_result"
    51085030      fi
    51095031
    51105032      # Do each command in the archive commands.
    51115033      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
    5112         eval cmds=\"$old_archive_from_new_cmds\"
     5034       cmds=$old_archive_from_new_cmds
    51135035      else
    51145036        eval cmds=\"$old_archive_cmds\"
     
    51165038        if len=`expr "X$cmds" : ".*"` &&
    51175039             test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
    5118           :
     5040          cmds=$old_archive_cmds
    51195041        else
    51205042          # the command line is too long to link in one step, link in parts
     
    51435065          do
    51445066            last_oldobj=$obj
    5145           done 
     5067          done
    51465068          for obj in $save_oldobjs
    51475069          do
     
    51575079              if test "$obj" = "$last_oldobj" ; then
    51585080                RANLIB=$save_RANLIB
    5159               fi 
    5160               test -z "$concat_cmds" || concat_cmds=$concat_cmds${_S_}
     5081              fi
     5082              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
    51615083              eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
    51625084              objlist=
     
    51685090            eval cmds=\"\$concat_cmds\"
    51695091          else
    5170             eval cmds=\"\$concat_cmds${_S_}$old_archive_cmds\"
    5171           fi
    5172         fi
    5173       fi
    5174       save_ifs="$IFS"; IFS=$_S_
     5092            eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
     5093          fi
     5094        fi
     5095      fi
     5096      save_ifs="$IFS"; IFS='~'
    51755097      for cmd in $cmds; do
     5098        eval cmd=\"$cmd\"
    51765099        IFS="$save_ifs"
    51775100        $show "$cmd"
     
    52055128      done
    52065129      # Quote the link command for shipping.
    5207       relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
     5130      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
    52085131      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
     5132      if test "$hardcode_automatic" = yes ; then
     5133        relink_command=
     5134      fi
     5135
    52095136
    52105137      # Only create the output if not a dry run.
     
    52255152                if test -z "$libdir"; then
    52265153                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    5227                   exit 1
     5154                  exit $EXIT_FAILURE
    52285155                fi
    52295156                newdependency_libs="$newdependency_libs $libdir/$name"
     
    52395166              if test -z "$libdir"; then
    52405167                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    5241                 exit 1
     5168                exit $EXIT_FAILURE
    52425169              fi
    52435170              newdlfiles="$newdlfiles $libdir/$name"
     
    52505177              if test -z "$libdir"; then
    52515178                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    5252                 exit 1
     5179                exit $EXIT_FAILURE
    52535180              fi
    52545181              newdlprefiles="$newdlprefiles $libdir/$name"
     5182            done
     5183            dlprefiles="$newdlprefiles"
     5184          else
     5185            newdlfiles=
     5186            for lib in $dlfiles; do
     5187              case $lib in
     5188                [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
     5189                *) abs=`pwd`"/$lib" ;;
     5190              esac
     5191              newdlfiles="$newdlfiles $abs"
     5192            done
     5193            dlfiles="$newdlfiles"
     5194            newdlprefiles=
     5195            for lib in $dlprefiles; do
     5196              case $lib in
     5197                [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
     5198                *) abs=`pwd`"/$lib" ;;
     5199              esac
     5200              newdlprefiles="$newdlprefiles $abs"
    52555201            done
    52565202            dlprefiles="$newdlprefiles"
     
    53115257      ;;
    53125258    esac
    5313     exit 0
     5259    exit $EXIT_SUCCESS
    53145260    ;;
    53155261
     
    54005346      $echo "$modename: you must specify an install program" 1>&2
    54015347      $echo "$help" 1>&2
    5402       exit 1
     5348      exit $EXIT_FAILURE
    54035349    fi
    54045350
     
    54065352      $echo "$modename: the \`$prev' option requires an argument" 1>&2
    54075353      $echo "$help" 1>&2
    5408       exit 1
     5354      exit $EXIT_FAILURE
    54095355    fi
    54105356
     
    54165362      fi
    54175363      $echo "$help" 1>&2
    5418       exit 1
     5364      exit $EXIT_FAILURE
    54195365    fi
    54205366
     
    54375383        $echo "$modename: \`$dest' is not a directory" 1>&2
    54385384        $echo "$help" 1>&2
    5439         exit 1
     5385        exit $EXIT_FAILURE
    54405386      fi
    54415387    fi
     
    54495395          $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
    54505396          $echo "$help" 1>&2
    5451           exit 1
     5397          exit $EXIT_FAILURE
    54525398          ;;
    54535399        esac
     
    54785424          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
    54795425          $echo "$help" 1>&2
    5480           exit 1
     5426          exit $EXIT_FAILURE
    54815427        fi
    54825428
     
    55205466          if test "$inst_prefix_dir" = "$destdir"; then
    55215467            $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
    5522             exit 1
     5468            exit $EXIT_FAILURE
    55235469          fi
    55245470
     
    55355481          else
    55365482            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
    5537             exit 1
     5483            exit $EXIT_FAILURE
    55385484          fi
    55395485        fi
     
    55705516          # Do each command in the postinstall commands.
    55715517          lib="$destdir/$realname"
    5572           eval cmds=\"$postinstall_cmds\"
    5573           save_ifs="$IFS"; IFS=$_S_
     5518          cmds=$postinstall_cmds
     5519          save_ifs="$IFS"; IFS='~'
    55745520          for cmd in $cmds; do
    55755521            IFS="$save_ifs"
     5522            eval cmd=\"$cmd\"
    55765523            $show "$cmd"
    55775524            $run eval "$cmd" || exit $?
     
    56135560          $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
    56145561          $echo "$help" 1>&2
    5615           exit 1
     5562          exit $EXIT_FAILURE
    56165563          ;;
    56175564        esac
     
    56315578          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
    56325579        fi
    5633         exit 0
     5580        exit $EXIT_SUCCESS
    56345581        ;;
    56355582
     
    56855632          if test -z "$notinst_deplibs"; then
    56865633            $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
    5687             exit 1
     5634            exit $EXIT_FAILURE
    56885635          fi
    56895636
     
    57265673              test -n "$TMPDIR" && tmpdir="$TMPDIR"
    57275674              tmpdir="$tmpdir/libtool-$$"
    5728               if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
     5675              save_umask=`umask`
     5676              umask 0077
     5677              if $mkdir "$tmpdir"; then
     5678                umask $save_umask
    57295679              else
     5680                umask $save_umask
    57305681                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
    57315682                continue
     
    57865737      $run eval "$install_prog \$file \$oldlib" || exit $?
    57875738
    5788       if test -n "$stripme" && test -n "$striplib"; then
     5739      if test -n "$stripme" && test -n "$old_striplib"; then
    57895740        $show "$old_striplib $oldlib"
    57905741        $run eval "$old_striplib $oldlib" || exit $?
     
    57925743
    57935744      # Do each command in the postinstall commands.
    5794       eval cmds=\"$old_postinstall_cmds\"
    5795       save_ifs="$IFS"; IFS=$_S_
     5745      cmds=$old_postinstall_cmds
     5746      save_ifs="$IFS"; IFS='~'
    57965747      for cmd in $cmds; do
    57975748        IFS="$save_ifs"
     5749        eval cmd=\"$cmd\"
    57985750        $show "$cmd"
    57995751        $run eval "$cmd" || exit $?
     
    58095761      # Maybe just do a dry run.
    58105762      test -n "$run" && current_libdirs=" -n$current_libdirs"
    5811       exec_cmd='$SHELL $0 --finish$current_libdirs'
     5763      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
    58125764    else
    5813       exit 0
     5765      exit $EXIT_SUCCESS
    58145766    fi
    58155767    ;;
     
    58305782        if test -n "$finish_cmds"; then
    58315783          # Do each command in the finish commands.
    5832           eval cmds=\"$finish_cmds\"
    5833           save_ifs="$IFS"; IFS=$_S_
     5784          cmds=$finish_cmds
     5785          save_ifs="$IFS"; IFS='~'
    58345786          for cmd in $cmds; do
    58355787            IFS="$save_ifs"
     5788            eval cmd=\"$cmd\"
    58365789            $show "$cmd"
    58375790            $run eval "$cmd" || admincmds="$admincmds
     
    58505803
    58515804    # Exit here if they wanted silent mode.
    5852     test "$show" = : && exit 0
     5805    test "$show" = : && exit $EXIT_SUCCESS
    58535806
    58545807    $echo "----------------------------------------------------------------------"
     
    58865839    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
    58875840    $echo "----------------------------------------------------------------------"
    5888     exit 0
     5841    exit $EXIT_SUCCESS
    58895842    ;;
    58905843
     
    58985851      $echo "$modename: you must specify a COMMAND" 1>&2
    58995852      $echo "$help"
    5900       exit 1
     5853      exit $EXIT_FAILURE
    59015854    fi
    59025855
     
    59065859        $echo "$modename: \`$file' is not a file" 1>&2
    59075860        $echo "$help" 1>&2
    5908         exit 1
     5861        exit $EXIT_FAILURE
    59095862      fi
    59105863
     
    59175870          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    59185871          $echo "$help" 1>&2
    5919           exit 1
     5872          exit $EXIT_FAILURE
    59205873        fi
    59215874
     
    59445897        else
    59455898          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
    5946           exit 1
     5899          exit $EXIT_FAILURE
    59475900        fi
    59485901        ;;
     
    60165969
    60175970      # Now prepare to actually exec the command.
    6018       exec_cmd="\$cmd$args"
     5971      exec_cmd="\"\$cmd\"$args"
    60195972    else
    60205973      # Display what would be done.
     
    60235976        $echo "export $shlibpath_var"
    60245977      fi
    6025       $echo "$cmd$args"
    6026       exit 0
     5978      eval \$echo \"\$cmd\"$args
     5979      exit $EXIT_SUCCESS
    60275980    fi
    60285981    ;;
     
    60526005      $echo "$modename: you must specify an RM program" 1>&2
    60536006      $echo "$help" 1>&2
    6054       exit 1
     6007      exit $EXIT_FAILURE
    60556008    fi
    60566009
     
    61076060            if test -n "$library_names"; then
    61086061              # Do each command in the postuninstall commands.
    6109               eval cmds=\"$postuninstall_cmds\"
    6110               save_ifs="$IFS"; IFS=$_S_
     6062              cmds=$postuninstall_cmds
     6063              save_ifs="$IFS"; IFS='~'
    61116064              for cmd in $cmds; do
    61126065                IFS="$save_ifs"
     6066                eval cmd=\"$cmd\"
    61136067                $show "$cmd"
    61146068                $run eval "$cmd"
     
    61226076            if test -n "$old_library"; then
    61236077              # Do each command in the old_postuninstall commands.
    6124               eval cmds=\"$old_postuninstall_cmds\"
    6125               save_ifs="$IFS"; IFS=$_S_
     6078              cmds=$old_postuninstall_cmds
     6079              save_ifs="$IFS"; IFS='~'
    61266080              for cmd in $cmds; do
    61276081                IFS="$save_ifs"
     6082                eval cmd=\"$cmd\"
    61286083                $show "$cmd"
    61296084                $run eval "$cmd"
     
    61646119          noexename=$name
    61656120          case $file in
    6166           *.exe) 
     6121          *.exe)
    61676122            file=`$echo $file|${SED} 's,.exe$,,'`
    61686123            noexename=`$echo $name|${SED} 's,.exe$,,'`
     
    62096164    $echo "$modename: you must specify a MODE" 1>&2
    62106165    $echo "$generic_help" 1>&2
    6211     exit 1
     6166    exit $EXIT_FAILURE
    62126167    ;;
    62136168  esac
     
    62166171    $echo "$modename: invalid operation mode \`$mode'" 1>&2
    62176172    $echo "$generic_help" 1>&2
    6218     exit 1
     6173    exit $EXIT_FAILURE
    62196174  fi
    62206175fi # test -z "$show_help"
     
    62226177if test -n "$exec_cmd"; then
    62236178  eval exec $exec_cmd
    6224   exit 1
     6179  exit $EXIT_FAILURE
    62256180fi
    62266181
     
    62586213
    62596214Report bugs to <bug-libtool@gnu.org>."
    6260   exit 0
     6215  exit $EXIT_SUCCESS
    62616216  ;;
    62626217
     
    63706325  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
    63716326  -objectlist FILE  Use a list of object files found in FILE to specify objects
     6327  -precious-files-regex REGEX
     6328                    don't remove output files matching REGEX
    63726329  -release RELEASE  specify package release information
    63736330  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
     
    64116368  $echo "$modename: invalid operation mode \`$mode'" 1>&2
    64126369  $echo "$help" 1>&2
    6413   exit 1
     6370  exit $EXIT_FAILURE
    64146371  ;;
    64156372esac
     
    64186375$echo "Try \`$modename --help' for more information about other modes."
    64196376
    6420 exit 0
     6377exit $EXIT_SUCCESS
    64216378
    64226379# The TAGs below are defined such that we never get into a situation
  • trunk/psLib/src/collections/psMetadata.c

    r3682 r3765  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-04-07 20:27:41 $
     14*  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-04-23 02:07:27 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    186186
    187187    // Allocate and set metadata item comment
    188     metadataItem->comment = (char *)psAlloc(sizeof(char) * MAX_STRING_LENGTH);
    189188    if (comment == NULL) {
    190189        // Per SDRS, null isn't allowed, must use "" instead
    191         strncpy(metadataItem->comment, "", MAX_STRING_LENGTH);
     190        metadataItem->comment = psStringCopy("");
    192191    } else {
    193         strncpy(metadataItem->comment, comment, MAX_STRING_LENGTH);
     192        metadataItem->comment = psStringCopy(comment);
    194193    }
    195194
  • trunk/psLib/src/types/psMetadata.c

    r3682 r3765  
    1212*  @author Ross Harman, MHPCC
    1313*
    14 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2005-04-07 20:27:41 $
     14*  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2005-04-23 02:07:27 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    186186
    187187    // Allocate and set metadata item comment
    188     metadataItem->comment = (char *)psAlloc(sizeof(char) * MAX_STRING_LENGTH);
    189188    if (comment == NULL) {
    190189        // Per SDRS, null isn't allowed, must use "" instead
    191         strncpy(metadataItem->comment, "", MAX_STRING_LENGTH);
     190        metadataItem->comment = psStringCopy("");
    192191    } else {
    193         strncpy(metadataItem->comment, comment, MAX_STRING_LENGTH);
     192        metadataItem->comment = psStringCopy(comment);
    194193    }
    195194
Note: See TracChangeset for help on using the changeset viewer.