IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3123


Ignore:
Timestamp:
Feb 3, 2005, 1:23:42 PM (21 years ago)
Author:
desonia
Message:

initial tweak to get things to nominally work.

Location:
trunk/psLib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/Makefile.am

    r3120 r3123  
    1 # not a GNU package. You can remove this line, if
    2 # have all needed files, that a GNU package needs
    3 AUTOMAKE_OPTIONS = foreign 1.4
    4 
    51SUBDIRS = src test swig
    62
  • trunk/psLib/config.guess

    r3118 r3123  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-10-21'
     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
     
    9999# use `HOST_CC' if defined, but it is deprecated.
    100100
    101 # This shell variable is my proudest work .. or something. --bje
    102 
    103 set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
    104 (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
    105    || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
    106 dummy=$tmpdir/dummy ;
    107 files="$dummy.c $dummy.o $dummy.rel $dummy" ;
    108 trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
     101# Portable tmp directory creation inspired by the Autoconf team.
     102
     103set_cc_for_build='
     104trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     105trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
     106: ${TMPDIR=/tmp} ;
     107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     108 { 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 ; } ||
     110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     111dummy=$tmp/dummy ;
     112tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109113case $CC_FOR_BUILD,$HOST_CC,$CC in
    110114 ,,)    echo "int x;" > $dummy.c ;
     
    114118          fi ;
    115119        done ;
    116         rm -f $files ;
    117120        if test x"$CC_FOR_BUILD" = x ; then
    118121          CC_FOR_BUILD=no_compiler_found ;
     
    121124 ,,*)   CC_FOR_BUILD=$CC ;;
    122125 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    123 esac ;
    124 unset files'
     126esac ;'
    125127
    126128# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    134136UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    135137UNAME_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
    136148
    137149# Note: order is significant - the case branches are not exclusive.
     
    179191        esac
    180192        # The OS release
    181         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     193        # Debian GNU/NetBSD machines have a different userland, and
     194        # thus, need a distinct triplet. However, they do not need
     195        # kernel version information, so it can be replaced with a
     196        # suitable tag, in the style of linux-gnu.
     197        case "${UNAME_VERSION}" in
     198            Debian*)
     199                release='-gnu'
     200                ;;
     201            *)
     202                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     203                ;;
     204        esac
    182205        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    183206        # contains redundant information, the shorter form:
     
    185208        echo "${machine}-${os}${release}"
    186209        exit 0 ;;
     210    amd64:OpenBSD:*:*)
     211        echo x86_64-unknown-openbsd${UNAME_RELEASE}
     212        exit 0 ;;
    187213    amiga:OpenBSD:*:*)
    188214        echo m68k-unknown-openbsd${UNAME_RELEASE}
     
    191217        echo mipsel-unknown-openbsd${UNAME_RELEASE}
    192218        exit 0 ;;
     219    cats:OpenBSD:*:*)
     220        echo arm-unknown-openbsd${UNAME_RELEASE}
     221        exit 0 ;;
    193222    hp300:OpenBSD:*:*)
    194223        echo m68k-unknown-openbsd${UNAME_RELEASE}
    195224        exit 0 ;;
     225    luna88k:OpenBSD:*:*)
     226        echo m88k-unknown-openbsd${UNAME_RELEASE}
     227        exit 0 ;;
    196228    mac68k:OpenBSD:*:*)
    197229        echo m68k-unknown-openbsd${UNAME_RELEASE}
     
    224256        echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
    225257        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 ;;
    226267    alpha:OSF1:*:*)
    227         if test $UNAME_RELEASE = "V4.0"; then
     268        case $UNAME_RELEASE in
     269        *4.0)
    228270                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    229         fi
     271                ;;
     272        *5.*)
     273                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
     274                ;;
     275        esac
     276        # According to Compaq, /usr/sbin/psrinfo has been available on
     277        # OSF/1 and Tru64 systems produced since 1995.  I hope that
     278        # covers most systems running today.  This code pipes the CPU
     279        # types through head -n 1, so we only detect the type of CPU 0.
     280        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
     281        case "$ALPHA_CPU_TYPE" in
     282            "EV4 (21064)")
     283                UNAME_MACHINE="alpha" ;;
     284            "EV4.5 (21064)")
     285                UNAME_MACHINE="alpha" ;;
     286            "LCA4 (21066/21068)")
     287                UNAME_MACHINE="alpha" ;;
     288            "EV5 (21164)")
     289                UNAME_MACHINE="alphaev5" ;;
     290            "EV5.6 (21164A)")
     291                UNAME_MACHINE="alphaev56" ;;
     292            "EV5.6 (21164PC)")
     293                UNAME_MACHINE="alphapca56" ;;
     294            "EV5.7 (21164PC)")
     295                UNAME_MACHINE="alphapca57" ;;
     296            "EV6 (21264)")
     297                UNAME_MACHINE="alphaev6" ;;
     298            "EV6.7 (21264A)")
     299                UNAME_MACHINE="alphaev67" ;;
     300            "EV6.8CB (21264C)")
     301                UNAME_MACHINE="alphaev68" ;;
     302            "EV6.8AL (21264B)")
     303                UNAME_MACHINE="alphaev68" ;;
     304            "EV6.8CX (21264D)")
     305                UNAME_MACHINE="alphaev68" ;;
     306            "EV6.9A (21264/EV69A)")
     307                UNAME_MACHINE="alphaev69" ;;
     308            "EV7 (21364)")
     309                UNAME_MACHINE="alphaev7" ;;
     310            "EV7.9 (21364A)")
     311                UNAME_MACHINE="alphaev79" ;;
     312        esac
     313        # A Pn.n version is a patched version.
    230314        # A Vn.n version is a released version.
    231315        # A Tn.n version is a released field test version.
    232316        # A Xn.n version is an unreleased experimental baselevel.
    233317        # 1.2 uses "1.2" for uname -r.
    234         eval $set_cc_for_build
    235         cat <<EOF >$dummy.s
    236         .data
    237 \$Lformat:
    238         .byte 37,100,45,37,120,10,0     # "%d-%x\n"
    239 
    240         .text
    241         .globl main
    242         .align 4
    243         .ent main
    244 main:
    245         .frame \$30,16,\$26,0
    246         ldgp \$29,0(\$27)
    247         .prologue 1
    248         .long 0x47e03d80 # implver \$0
    249         lda \$2,-1
    250         .long 0x47e20c21 # amask \$2,\$1
    251         lda \$16,\$Lformat
    252         mov \$0,\$17
    253         not \$1,\$18
    254         jsr \$26,printf
    255         ldgp \$29,0(\$26)
    256         mov 0,\$16
    257         jsr \$26,exit
    258         .end main
    259 EOF
    260         $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
    261         if test "$?" = 0 ; then
    262                 case `$dummy` in
    263                         0-0)
    264                                 UNAME_MACHINE="alpha"
    265                                 ;;
    266                         1-0)
    267                                 UNAME_MACHINE="alphaev5"
    268                                 ;;
    269                         1-1)
    270                                 UNAME_MACHINE="alphaev56"
    271                                 ;;
    272                         1-101)
    273                                 UNAME_MACHINE="alphapca56"
    274                                 ;;
    275                         2-303)
    276                                 UNAME_MACHINE="alphaev6"
    277                                 ;;
    278                         2-307)
    279                                 UNAME_MACHINE="alphaev67"
    280                                 ;;
    281                         2-1307)
    282                                 UNAME_MACHINE="alphaev68"
    283                                 ;;
    284                         3-1307)
    285                                 UNAME_MACHINE="alphaev7"
    286                                 ;;
    287                 esac
    288         fi
    289         rm -f $dummy.s $dummy && rmdir $tmpdir
    290         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'`
    291319        exit 0 ;;
    292320    Alpha\ *:Windows_NT*:*)
     
    310338    *:OS/390:*:*)
    311339        echo i370-ibm-openedition
     340        exit 0 ;;
     341    *:OS400:*:*)
     342        echo powerpc-ibm-os400
    312343        exit 0 ;;
    313344    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
     
    328359        echo pyramid-pyramid-svr4
    329360        exit 0 ;;
     361    DRS?6000:unix:4.0:6*)
     362        echo sparc-icl-nx6
     363        exit 0 ;;
    330364    DRS?6000:UNIX_SV:4.2*:7*)
    331365        case `/usr/bin/uname -p` in
     
    400434        echo m68k-unknown-mint${UNAME_RELEASE}
    401435        exit 0 ;;
     436    m68k:machten:*:*)
     437        echo m68k-apple-machten${UNAME_RELEASE}
     438        exit 0 ;;
    402439    powerpc:machten:*:*)
    403440        echo powerpc-apple-machten${UNAME_RELEASE}
     
    440477        $CC_FOR_BUILD -o $dummy $dummy.c \
    441478          && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    442           && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    443         rm -f $dummy.c $dummy && rmdir $tmpdir
     479          && exit 0
    444480        echo mips-mips-riscos${UNAME_RELEASE}
    445481        exit 0 ;;
     
    450486        echo powerpc-harris-powermax
    451487        exit 0 ;;
    452     Night_Hawk:*:*:PowerMAX_OS)
     488    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    453489        echo powerpc-harris-powermax
    454490        exit 0 ;;
     
    525561                        }
    526562EOF
    527                 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    528                 rm -f $dummy.c $dummy && rmdir $tmpdir
     563                $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    529564                echo rs6000-ibm-aix3.2.5
    530565        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    625660EOF
    626661                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
    627                     if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
    628                     rm -f $dummy.c $dummy && rmdir $tmpdir
     662                    test -z "$HP_ARCH" && HP_ARCH=hppa
    629663                fi ;;
    630664        esac
     665        if [ ${HP_ARCH} = "hppa2.0w" ]
     666        then
     667            # avoid double evaluation of $set_cc_for_build
     668            test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
     669            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
     670            then
     671                HP_ARCH="hppa2.0w"
     672            else
     673                HP_ARCH="hppa64"
     674            fi
     675        fi
    631676        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    632677        exit 0 ;;
     
    662707        }
    663708EOF
    664         $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    665         rm -f $dummy.c $dummy && rmdir $tmpdir
     709        $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    666710        echo unknown-hitachi-hiuxwe2
    667711        exit 0 ;;
     
    721765        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    722766        exit 0 ;;
    723     CRAY*T3D:*:*:*)
    724         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    725         exit 0 ;;
    726767    CRAY*T3E:*:*:*)
    727768        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     
    729770    CRAY*SV1:*:*:*)
    730771        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     772        exit 0 ;;
     773    *:UNICOS/mp:*:*)
     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         rm -f $dummy.c && rmdir $tmpdir
    760         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/[-(].*//'`
    761798        exit 0 ;;
    762799    i*:CYGWIN*:*)
     
    769806        echo ${UNAME_MACHINE}-pc-pw32
    770807        exit 0 ;;
    771     x86:Interix*:3*)
    772         echo i386-pc-interix3
     808    x86:Interix*:[34]*)
     809        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
     810        exit 0 ;;
     811    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     812        echo i${UNAME_MACHINE}-pc-mks
    773813        exit 0 ;;
    774814    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
     
    776816        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    777817        # UNAME_MACHINE based on the output of uname instead of i386?
    778         echo i386-pc-interix
     818        echo i586-pc-interix
    779819        exit 0 ;;
    780820    i*:UWIN*:*)
     
    788828        exit 0 ;;
    789829    *:GNU:*:*)
     830        # the GNU system
    790831        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
    791836        exit 0 ;;
    792837    i*86:Minix:*:*)
     
    794839        exit 0 ;;
    795840    arm*:Linux:*:*)
    796         echo ${UNAME_MACHINE}-unknown-linux-gnu
     841        echo ${UNAME_MACHINE}-${VENDOR}-linux
     842        exit 0 ;;
     843    cris:Linux:*:*)
     844        echo cris-axis-linux
    797845        exit 0 ;;
    798846    ia64:Linux:*:*)
    799         echo ${UNAME_MACHINE}-unknown-linux-gnu
     847        echo ${UNAME_MACHINE}-${VENDOR}-linux
     848        exit 0 ;;
     849    m32r*:Linux:*:*)
     850        echo ${UNAME_MACHINE}-${VENDOR}-linux
    800851        exit 0 ;;
    801852    m68*:Linux:*:*)
    802         echo ${UNAME_MACHINE}-unknown-linux-gnu
     853        echo ${UNAME_MACHINE}-${VENDOR}-linux
    803854        exit 0 ;;
    804855    mips:Linux:*:*)
     
    819870EOF
    820871        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    821         rm -f $dummy.c && rmdir $tmpdir
    822         test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
     872        test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
     873        ;;
     874    mips64:Linux:*:*)
     875        eval $set_cc_for_build
     876        sed 's/^        //' << EOF >$dummy.c
     877        #undef CPU
     878        #undef mips64
     879        #undef mips64el
     880        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     881        CPU=mips64el
     882        #else
     883        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     884        CPU=mips64
     885        #else
     886        CPU=
     887        #endif
     888        #endif
     889EOF
     890        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
     891        test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
    823892        ;;
    824893    ppc:Linux:*:*)
    825         echo powerpc-unknown-linux-gnu
     894        echo powerpc-${VENDOR}-linux
    826895        exit 0 ;;
    827896    ppc64:Linux:*:*)
    828         echo powerpc64-unknown-linux-gnu
     897        echo powerpc64-${VENDOR}-linux
    829898        exit 0 ;;
    830899    alpha:Linux:*:*)
     
    839908        esac
    840909        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
    841         if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    842         echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     910        if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
     911        echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
    843912        exit 0 ;;
    844913    parisc:Linux:*:* | hppa:Linux:*:*)
    845914        # Look for CPU level
    846915        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
    847           PA7*) echo hppa1.1-unknown-linux-gnu ;;
    848           PA8*) echo hppa2.0-unknown-linux-gnu ;;
    849           *)    echo hppa-unknown-linux-gnu ;;
     916          PA7*) echo hppa1.1-${VENDOR}-linux ;;
     917          PA8*) echo hppa2.0-${VENDOR}-linux ;;
     918          *)    echo hppa-${VENDOR}-linux ;;
    850919        esac
    851920        exit 0 ;;
    852921    parisc64:Linux:*:* | hppa64:Linux:*:*)
    853         echo hppa64-unknown-linux-gnu
     922        echo hppa64-${VENDOR}-linux
    854923        exit 0 ;;
    855924    s390:Linux:*:* | s390x:Linux:*:*)
    856925        echo ${UNAME_MACHINE}-ibm-linux
    857926        exit 0 ;;
     927    sh64*:Linux:*:*)
     928        echo ${UNAME_MACHINE}-${VENDOR}-linux
     929        exit 0 ;;
    858930    sh*:Linux:*:*)
    859         echo ${UNAME_MACHINE}-unknown-linux-gnu
     931        echo ${UNAME_MACHINE}-${VENDOR}-linux
    860932        exit 0 ;;
    861933    sparc:Linux:*:* | sparc64:Linux:*:*)
    862         echo ${UNAME_MACHINE}-unknown-linux-gnu
     934        echo ${UNAME_MACHINE}-${VENDOR}-linux
    863935        exit 0 ;;
    864936    x86_64:Linux:*:*)
    865         echo x86_64-unknown-linux-gnu
     937        echo x86_64-${VENDOR}-linux
    866938        exit 0 ;;
    867939    i*86:Linux:*:*)
     
    878950        case "$ld_supported_targets" in
    879951          elf32-i386)
    880                 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
     952                TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux"
    881953                ;;
    882954          a.out-i386-linux)
    883                 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
     955                echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
    884956                exit 0 ;;
    885957          coff-i386)
    886                 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
     958                echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
    887959                exit 0 ;;
    888960          "")
    889                 # Either a pre-BFD a.out linker (linux-gnuoldld) or
     961                # Either a pre-BFD a.out linker (linuxoldld) or
    890962                # one that does not give us useful --help.
    891                 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
     963                echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld"
    892964                exit 0 ;;
    893965        esac
     
    913985        #endif
    914986        #endif
     987        #ifdef __dietlibc__
     988        LIBC=dietlibc
     989        #endif
    915990EOF
    916991        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    917         rm -f $dummy.c && rmdir $tmpdir
    918         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
    919993        test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    920994        ;;
     
    9321006        # Use sysv4.2uw... so that sysv4* matches it.
    9331007        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
     1008        exit 0 ;;
     1009    i*86:OS/2:*:*)
     1010        # If we were able to find `uname', then EMX Unix compatibility
     1011        # is probably installed.
     1012        echo ${UNAME_MACHINE}-pc-os2-emx
     1013        exit 0 ;;
     1014    i*86:XTS-300:*:STOP)
     1015        echo ${UNAME_MACHINE}-unknown-stop
     1016        exit 0 ;;
     1017    i*86:atheos:*:*)
     1018        echo ${UNAME_MACHINE}-unknown-atheos
     1019        exit 0 ;;
     1020        i*86:syllable:*:*)
     1021        echo ${UNAME_MACHINE}-pc-syllable
     1022        exit 0 ;;
     1023    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
     1024        echo i386-unknown-lynxos${UNAME_RELEASE}
     1025        exit 0 ;;
     1026    i*86:*DOS:*:*)
     1027        echo ${UNAME_MACHINE}-pc-msdosdjgpp
    9341028        exit 0 ;;
    9351029    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
     
    9671061        fi
    9681062        exit 0 ;;
    969     i*86:*DOS:*:*)
    970         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    971         exit 0 ;;
    9721063    pc:*:*:*)
    9731064        # Left here for compatibility:
     
    9961087        echo m68k-convergent-sysv
    9971088        exit 0 ;;
    998     M68*:*:R3V[567]*:*)
     1089    M680?0:D-NIX:5.3:*)
     1090        echo m68k-diab-dnix
     1091        exit 0 ;;
     1092    M68*:*:R3V[5678]*:*)
    9991093        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1000     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)
     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)
    10011095        OS_REL=''
    10021096        test -r /etc/.relid \
     
    10151109        echo m68k-atari-sysv4
    10161110        exit 0 ;;
    1017     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    1018         echo i386-unknown-lynxos${UNAME_RELEASE}
    1019         exit 0 ;;
    10201111    TSUNAMI:LynxOS:2.*:*)
    10211112        echo sparc-unknown-lynxos${UNAME_RELEASE}
     
    10991190        exit 0 ;;
    11001191    *:Darwin:*:*)
    1101         echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1192        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1193        case $UNAME_PROCESSOR in
     1194            *86) UNAME_PROCESSOR=i686 ;;
     1195            unknown) UNAME_PROCESSOR=powerpc ;;
     1196        esac
     1197        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    11021198        exit 0 ;;
    11031199    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     
    11121208        echo i386-pc-qnx
    11131209        exit 0 ;;
    1114     NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
     1210    NSR-?:NONSTOP_KERNEL:*:*)
    11151211        echo nsr-tandem-nsk${UNAME_RELEASE}
    11161212        exit 0 ;;
     
    11351231        echo ${UNAME_MACHINE}-unknown-plan9
    11361232        exit 0 ;;
    1137     i*86:OS/2:*:*)
    1138         # If we were able to find `uname', then EMX Unix compatibility
    1139         # is probably installed.
    1140         echo ${UNAME_MACHINE}-pc-os2-emx
    1141         exit 0 ;;
    11421233    *:TOPS-10:*:*)
    11431234        echo pdp10-unknown-tops10
     
    11581249        echo pdp10-unknown-its
    11591250        exit 0 ;;
    1160     i*86:XTS-300:*:STOP)
    1161         echo ${UNAME_MACHINE}-unknown-stop
    1162         exit 0 ;;
    1163     i*86:atheos:*:*)
    1164         echo ${UNAME_MACHINE}-unknown-atheos
    1165         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
    11661264esac
    11671265
     
    12841382EOF
    12851383
    1286 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    1287 rm -f $dummy.c $dummy && rmdir $tmpdir
     1384$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
    12881385
    12891386# Apollos put the system type in the environment.
  • trunk/psLib/config.sub

    r3118 r3123  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-05'
     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* | storm-chaos* | os2-emx* | windows32-* | 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 \
     
    246248        | mips64vr5000 | mips64vr5000el \
    247249        | mipsisa32 | mipsisa32el \
     250        | mipsisa32r2 | mipsisa32r2el \
    248251        | mipsisa64 | mipsisa64el \
     252        | mipsisa64r2 | mipsisa64r2el \
    249253        | mipsisa64sb1 | mipsisa64sb1el \
    250254        | mipsisa64sr71k | mipsisa64sr71kel \
    251255        | mipstx39 | mipstx39el \
    252256        | mn10200 | mn10300 \
     257        | msp430 \
    253258        | ns16k | ns32k \
    254259        | openrisc | or32 \
     
    256261        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    257262        | pyramid \
    258         | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     263        | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
    259264        | sh64 | sh64le \
    260         | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
     265        | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
    261266        | strongarm \
    262         | tahoe | thumb | tic80 | tron \
     267        | tahoe | thumb | tic4x | tic80 | tron \
    263268        | v850 | v850e \
    264269        | we32k \
     
    295300        | avr-* \
    296301        | bs2000-* \
    297         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
    298         | clipper-* | cydra-* \
     302        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     303        | clipper-* | craynv-* | cydra-* \
    299304        | d10v-* | d30v-* | dlx-* \
    300305        | elxsi-* \
     
    303308        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    304309        | i*86-* | i860-* | i960-* | ia64-* \
    305         | ip2k-* \
    306         | m32r-* \
     310        | ip2k-* | iq2000-* \
     311        | m32r-* | m32rle-* \
    307312        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    308313        | m88110-* | m88k-* | mcore-* \
     
    316321        | mips64vr5000-* | mips64vr5000el-* \
    317322        | mipsisa32-* | mipsisa32el-* \
     323        | mipsisa32r2-* | mipsisa32r2el-* \
    318324        | mipsisa64-* | mipsisa64el-* \
     325        | mipsisa64r2-* | mipsisa64r2el-* \
    319326        | mipsisa64sb1-* | mipsisa64sb1el-* \
    320327        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    321         | mipstx39 | mipstx39el \
     328        | mipstx39-* | mipstx39el-* \
     329        | mmix-* \
     330        | msp430-* \
    322331        | none-* | np1-* | ns16k-* | ns32k-* \
    323332        | orion-* \
     
    326335        | pyramid-* \
    327336        | romp-* | rs6000-* \
    328         | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
     337        | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
    329338        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    330339        | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    331         | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    332         | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
     340        | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     341        | tahoe-* | thumb-* \
     342        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     343        | tron-* \
    333344        | v850-* | v850e-* | vax-* \
    334345        | we32k-* \
     
    354365                os=-udi
    355366                ;;
     367        abacus)
     368                basic_machine=abacus-unknown
     369                ;;
    356370        adobe68k)
    357371                basic_machine=m68010-adobe
     
    368382                os=-bsd
    369383                ;;
     384        amd64)
     385                basic_machine=x86_64-pc
     386                ;;
     387        amd64-*)
     388                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     389                ;;
    370390        amdahl)
    371391                basic_machine=580-amdahl
     
    427447                os=-unicos
    428448                ;;
     449        craynv)
     450                basic_machine=craynv-cray
     451                os=-unicosmp
     452                ;;
     453        cr16c)
     454                basic_machine=cr16c-unknown
     455                os=-elf
     456                ;;
    429457        crds | unos)
    430458                basic_machine=m68k-crds
     
    432460        cris | cris-* | etrax*)
    433461                basic_machine=cris-axis
     462                ;;
     463        crx)
     464                basic_machine=crx-unknown
     465                os=-elf
    434466                ;;
    435467        da30 | da30-*)
     
    632664        mips3*)
    633665                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    634                 ;;
    635         mmix*)
    636                 basic_machine=mmix-knuth
    637                 os=-mmixware
    638666                ;;
    639667        monitor)
     
    728756                os=-coff
    729757                ;;
     758        os400)
     759                basic_machine=powerpc-ibm
     760                os=-os400
     761                ;;
    730762        OSE68000 | ose68000)
    731763                basic_machine=m68000-ericsson
     
    759791                basic_machine=i686-pc
    760792                ;;
    761         pentiumii | pentium2)
     793        pentiumii | pentium2 | pentiumiii | pentium3)
    762794                basic_machine=i686-pc
     795                ;;
     796        pentium4)
     797                basic_machine=i786-pc
    763798                ;;
    764799        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    768803                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    769804                ;;
    770         pentiumii-* | pentium2-*)
     805        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    771806                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     807                ;;
     808        pentium4-*)
     809                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    772810                ;;
    773811        pn)
     
    829867                basic_machine=mipsisa64sb1el-unknown
    830868                ;;
     869        sei)
     870                basic_machine=mips-sei
     871                os=-seiux
     872                ;;
    831873        sequent)
    832874                basic_machine=i386-sequent
     
    836878                os=-hms
    837879                ;;
     880        sh64)
     881                basic_machine=sh64-unknown
     882                ;;
    838883        sparclite-wrs | simso-wrs)
    839884                basic_machine=sparclite-wrs
     
    902947                os=-dynix
    903948                ;;
    904         t3d)
    905                 basic_machine=alpha-cray
    906                 os=-unicos
    907                 ;;
    908949        t3e)
    909950                basic_machine=alphaev5-cray
     
    914955                os=-unicos
    915956                ;;
    916         tic4x | c4x*)
    917                 basic_machine=tic4x-unknown
    918                 os=-coff
    919                 ;;
    920957        tic54x | c54x*)
    921958                basic_machine=tic54x-unknown
    922959                os=-coff
    923960                ;;
     961        tic55x | c55x*)
     962                basic_machine=tic55x-unknown
     963                os=-coff
     964                ;;
     965        tic6x | c6x*)
     966                basic_machine=tic6x-unknown
     967                os=-coff
     968                ;;
    924969        tx39)
    925970                basic_machine=mipstx39-unknown
     
    935980                basic_machine=m68k-ncr
    936981                ;;
     982        tpf)
     983                basic_machine=s390x-ibm
     984                os=-tpf
     985                ;;
    937986        udi29k)
    938987                basic_machine=a29k-amd
     
    9771026                basic_machine=hppa1.1-winbond
    9781027                os=-proelf
    979                 ;;
    980         windows32)
    981                 basic_machine=i386-pc
    982                 os=-windows32-msvcrt
    9831028                ;;
    9841029        xps | xps100)
     
    10121057                basic_machine=romp-ibm
    10131058                ;;
     1059        mmix)
     1060                basic_machine=mmix-knuth
     1061                ;;
    10141062        rs6000)
    10151063                basic_machine=rs6000-ibm
     
    10281076                basic_machine=we32k-att
    10291077                ;;
    1030         sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
     1078        sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
    10311079                basic_machine=sh-unknown
    10321080                ;;
     
    10341082                basic_machine=sh64-unknown
    10351083                ;;
    1036         sparc | sparcv9 | sparcv9b)
     1084        sparc | sparcv8 | sparcv9 | sparcv9b)
    10371085                basic_machine=sparc-sun
    10381086                ;;
     
    11071155              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    11081156              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1109               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    1110               | -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* \
    11111160              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    11121161              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    11131162              | -chorusos* | -chorusrdb* \
    11141163              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1115               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1116               | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1164              | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
     1165              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11171166              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11181167              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11191168              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1120               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
     1169              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1170              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
    11211171        # Remember, each alternative MUST END IN *, to match a version number.
    11221172                ;;
     
    11301180                esac
    11311181                ;;
     1182        -nto-qnx*)
     1183                ;;
    11321184        -nto*)
    1133                 os=-nto-qnx
     1185                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11341186                ;;
    11351187        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
     
    11401192                os=`echo $os | sed -e 's|mac|macos|'`
    11411193                ;;
    1142         -linux*)
    1143                 os=`echo $os | sed -e 's|linux|linux-gnu|'`
     1194        -linux-dietlibc)
     1195                os=-linux-dietlibc
    11441196                ;;
    11451197        -sunos5*)
     
    11521204                os=-openedition
    11531205                ;;
     1206        -os400*)
     1207                os=-os400
     1208                ;;
    11541209        -wince*)
    11551210                os=-wince
     
    11721227        -atheos*)
    11731228                os=-atheos
     1229                ;;
     1230        -syllable*)
     1231                os=-syllable
    11741232                ;;
    11751233        -386bsd)
     
    11951253                os=-sysv4
    11961254                ;;
     1255        -tpf*)
     1256                os=-tpf
     1257                ;;
    11971258        -triton*)
    11981259                os=-sysv3
     
    12241285        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251286                os=-mint
     1287                ;;
     1288        -aros*)
     1289                os=-aros
     1290                ;;
     1291        -kaos*)
     1292                os=-kaos
    12261293                ;;
    12271294        -none)
     
    12561323                os=-aout
    12571324                ;;
     1325    c4x-* | tic4x-*)
     1326        os=-coff
     1327        ;;
    12581328        # This must come before the *-dec entry.
    12591329        pdp10-*)
     
    13011371        *-ibm)
    13021372                os=-aix
     1373                ;;
     1374        *-knuth)
     1375                os=-mmixware
    13031376                ;;
    13041377        *-wec)
     
    14341507                                vendor=ibm
    14351508                                ;;
     1509                        -os400*)
     1510                                vendor=ibm
     1511                                ;;
    14361512                        -ptx*)
    14371513                                vendor=sequent
     1514                                ;;
     1515                        -tpf*)
     1516                                vendor=ibm
    14381517                                ;;
    14391518                        -vxsim* | -vxworks* | -windiss*)
  • trunk/psLib/configure.in

    r3122 r3123  
    1 AC_INIT(configure.in)
    2 SHARED_VERSION_INFO="1:5:0"
    3 AC_DISABLE_STATIC
    4 
     1AC_INIT([pslib],[1.5])
    52AM_CONFIG_HEADER(src/config.h)
    63AM_INIT_AUTOMAKE(pslib, 1.5)
    74
    8 AC_LANG_C
     5PSLIB_LT_VERSION="0:0:0"
     6AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION)
     7
     8AC_DISABLE_STATIC
     9AC_PROG_MAKE_SET
     10
     11AC_LANG(C)
    912AC_PROG_CC
    1013AC_PROG_INSTALL
     
    1417test "$prefix" = NONE && prefix=`pwd`
    1518
    16 CFLAGS="${CFLAGS=} -g2 -Wall -std=c99 -D_GNU_SOURCE"
     19dnl Setup CFLAGS/FFLAGS/LDFLAGS with project-particulars
     20CFLAGS="${CFLAGS=} -Wall -std=c99 -D_GNU_SOURCE"
    1721FFLAGS="-fno-second-underscore -O -fno-f2c"
     22LDFLAGS=-release 5
     23
     24dnl Setup the info for psLib for pkg-config
     25PSLIB_CFLAGS="-I${includedir=}"
     26PSLIB_LIBS="-L$libdir -lpslib"
    1827
    1928dnl ----------------- CFITSIO options --------------------
     
    8998AC_SUBST(PERL,$PERL)
    9099
     100dnl ---------------- PERLPREFIX option -------------------
     101AC_ARG_WITH(perlprefix,
     102[AS_HELP_STRING([--with-perlprefix=DIR],[Specify prefix of Perl Module's installation.])],
     103[PERL_PREFIX="$withval"],
     104[PERL_PREFIX=""])
     105AC_SUBST(PERL_PREFIX,$PERL_PREFIX)
     106
    91107dnl ---------------- config dir options ------------------
    92108AC_ARG_WITH(configdir,
     
    110126
    111127dnl ---------------- export variables --------------------
    112 PSLIB_CFLAGS="-I${includedir=}"
    113 AC_SUBST(PSLIB_LIBS,["-L$libdir -lpslib $PSLIB_LIBS"])
     128
     129AC_SUBST(PSLIB_LIBS,[$PSLIB_LIBS])
    114130AC_SUBST(PSLIB_CFLAGS,[$PSLIB_CFLAGS])
    115131AC_SUBST(CONFIG_FILE,[$CONFIG_FILE])
  • trunk/psLib/ltmain.sh

    r3118 r3123  
    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.5a
    59 TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"
    6078
    6179default_mode=
     
    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
     
    355564    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
    356565    $echo "$help" 1>&2
    357     exit 1
     566    exit $EXIT_FAILURE
    358567  fi
    359568
     
    370579    base_compile=
    371580    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
     581    suppress_opt=yes
    372582    suppress_output=
    373583    arg_mode=normal
    374584    libobj=
     585    later=
    375586
    376587    for arg
     
    395606          if test -n "$libobj" ; then
    396607            $echo "$modename: you cannot specify \`-o' more than once" 1>&2
    397             exit 1
     608            exit $EXIT_FAILURE
    398609          fi
    399610          arg_mode=target
     
    401612          ;;
    402613
    403         -static)
    404           build_old_libs=yes
     614        -static | -prefer-pic | -prefer-non-pic)
     615          later="$later $arg"
    405616          continue
    406617          ;;
    407618
    408         -prefer-pic)
    409           pic_mode=yes
    410           continue
    411           ;;
    412 
    413         -prefer-non-pic)
    414           pic_mode=no
     619        -no-suppress)
     620          suppress_opt=no
    415621          continue
    416622          ;;
     
    425631          lastarg=
    426632          save_ifs="$IFS"; IFS=','
    427           for arg in $args; do
     633          for arg in $args; do
    428634            IFS="$save_ifs"
    429635
     
    475681    arg)
    476682      $echo "$modename: you must specify an argument for -Xcompile"
    477       exit 1
     683      exit $EXIT_FAILURE
    478684      ;;
    479685    target)
    480686      $echo "$modename: you must specify a target with \`-o'" 1>&2
    481       exit 1
     687      exit $EXIT_FAILURE
    482688      ;;
    483689    *)
     
    512718    *)
    513719      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
    514       exit 1
     720      exit $EXIT_FAILURE
    515721      ;;
    516722    esac
    517723
    518     # Infer tagged configuration to use if any are available and
    519     # if one wasn't chosen via the "--tag" command line option.
    520     # Only attempt this if the compiler in the base compile
    521     # command doesn't match the default compiler.
    522     if test -n "$available_tags" && test -z "$tagname"; then
    523       case $base_compile in
    524       # Blanks in the command may have been stripped by the calling shell,
    525       # but not from the CC environment variable when configure was run.
    526       " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "*) ;;
    527       # Blanks at the start of $base_compile will cause this to fail
    528       # if we don't check for them as well.
    529       *)
    530         for z in $available_tags; do
    531           if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
    532             # Evaluate the configuration.
    533             eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
    534             case "$base_compile " in
    535             "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
    536               # The compiler in the base compile command matches
    537               # the one in the tagged configuration.
    538               # Assume this is the tagged configuration we want.
    539               tagname=$z
    540               break
    541               ;;
    542             esac
    543           fi
    544         done
    545         # If $tagname still isn't set, then no tagged configuration
    546         # was found and let the user know that the "--tag" command
    547         # line option must be used.
    548         if test -z "$tagname"; then
    549           $echo "$modename: unable to infer tagged configuration"
    550           $echo "$modename: specify a tag with \`--tag'" 1>&2
    551           exit 1
    552 #        else
    553 #          $echo "$modename: using $tagname tagged configuration"
    554         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
    555741        ;;
    556742      esac
    557     fi
     743    done
    558744
    559745    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
     
    569755      $echo "$modename: you must specify a compilation command" 1>&2
    570756      $echo "$help" 1>&2
    571       exit 1
     757      exit $EXIT_FAILURE
    572758    fi
    573759
     
    580766
    581767    $run $rm $removelist
    582     trap "$run $rm $removelist; exit 1" 1 2 15
     768    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
    583769
    584770    # On Cygwin there's no "real" PIC flag so we must build both object types
     
    599785      lockfile="$output_obj.lock"
    600786      removelist="$removelist $output_obj $lockfile"
    601       trap "$run $rm $removelist; exit 1" 1 2 15
     787      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
    602788    else
    603789      output_obj=
     
    609795    # We use this script file to make the link, it avoids creating a new file
    610796    if test "$need_locks" = yes; then
    611       until $run ln "$0" "$lockfile" 2>/dev/null; do
     797      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
    612798        $show "Waiting for $lockfile to be removed"
    613799        sleep 2
     
    627813
    628814        $run $rm $removelist
    629         exit 1
     815        exit $EXIT_FAILURE
    630816      fi
    631817      $echo $srcfile > "$lockfile"
     
    682868      else
    683869        test -n "$output_obj" && $run $rm $removelist
    684         exit 1
     870        exit $EXIT_FAILURE
    685871      fi
    686872
     
    702888
    703889        $run $rm $removelist
    704         exit 1
     890        exit $EXIT_FAILURE
    705891      fi
    706892
     
    723909
    724910      # Allow error messages only from the first compilation.
    725       suppress_output=' >/dev/null 2>&1'
     911      if test "$suppress_opt" = yes; then
     912        suppress_output=' >/dev/null 2>&1'
     913      fi
    726914    else
    727915      # No PIC object so indicate it doesn't exist in the libtool
     
    752940      else
    753941        $run $rm $removelist
    754         exit 1
     942        exit $EXIT_FAILURE
    755943      fi
    756944
     
    772960
    773961        $run $rm $removelist
    774         exit 1
     962        exit $EXIT_FAILURE
    775963      fi
    776964
     
    810998    fi
    811999
    812     exit 0
     1000    exit $EXIT_SUCCESS
    8131001    ;;
    8141002
     
    8361024    esac
    8371025    libtool_args="$nonopt"
    838     base_compile="$nonopt"
     1026    base_compile="$nonopt $@"
    8391027    compile_command="$nonopt"
    8401028    finalize_command="$nonopt"
     
    8481036    deplibs=
    8491037    old_deplibs=
    850     add_flags=
    8511038    compiler_flags=
    8521039    linker_flags=
     
    8691056    objs=
    8701057    non_pic_objects=
     1058    precious_files_regex=
    8711059    prefer_static_libs=no
    8721060    preload=no
     
    8821070    vinfo_number=no
    8831071
     1072    func_infer_tag $base_compile
     1073
    8841074    # We need to know -static, to get the right output filenames.
    8851075    for arg
     
    9131103    while test "$#" -gt 0; do
    9141104      arg="$1"
    915       base_compile="$base_compile $arg"
    9161105      shift
    9171106      case $arg in
     
    9771166          if test ! -f "$arg"; then
    9781167            $echo "$modename: symbol file \`$arg' does not exist"
    979             exit 1
     1168            exit $EXIT_FAILURE
    9801169          fi
    9811170          prev=
     
    9891178        inst_prefix)
    9901179          inst_prefix_dir="$arg"
     1180          prev=
     1181          continue
     1182          ;;
     1183        precious_regex)
     1184          precious_files_regex="$arg"
    9911185          prev=
    9921186          continue
     
    10241218                   test "$non_pic_object" = none; then
    10251219                  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
    1026                   exit 1
     1220                  exit $EXIT_FAILURE
    10271221                fi
    10281222
     
    10771271                if test -z "$run"; then
    10781272                  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
    1079                   exit 1
     1273                  exit $EXIT_FAILURE
    10801274                else
    10811275                  # Dry-run case.
     
    10981292          else
    10991293            $echo "$modename: link input file \`$save_arg' does not exist"
    1100             exit 1
     1294            exit $EXIT_FAILURE
    11011295          fi
    11021296          arg=$save_arg
     
    11101304          *)
    11111305            $echo "$modename: only absolute run-paths are allowed" 1>&2
    1112             exit 1
     1306            exit $EXIT_FAILURE
    11131307            ;;
    11141308          esac
     
    11501344          continue
    11511345          ;;
     1346        shrext)
     1347          shrext_cmds="$arg"
     1348          prev=
     1349          continue
     1350          ;;
    11521351        *)
    11531352          eval "$prev=\"\$arg\""
     
    11981397        if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
    11991398          $echo "$modename: more than one -exported-symbols argument is not allowed"
    1200           exit 1
     1399          exit $EXIT_FAILURE
    12011400        fi
    12021401        if test "X$arg" = "X-export-symbols"; then
     
    12341433          if test -z "$absdir"; then
    12351434            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
    1236             exit 1
     1435            exit $EXIT_FAILURE
    12371436          fi
    12381437          dir="$absdir"
     
    12631462            # These systems don't actually have a C or math library (as such)
    12641463            continue
    1265             ;;
    1266           *-*-freebsd*-gnu*)
    1267             # prevent being parsed by the freebsd regexp below
    12681464            ;;
    12691465          *-*-mingw* | *-*-os2*)
     
    12821478        elif test "X$arg" = "X-lc_r"; then
    12831479         case $host in
    1284          *-*-freebsd*-gnu*)
    1285            # prevent being parsed by the freebsd regexp below
    1286            ;;
    1287          *-*-openbsd*)
     1480         *-*-openbsd* | *-*-freebsd*)
    12881481           # Do not include libc_r directly, use -pthread flag.
    12891482           continue
     
    12911484         esac
    12921485        fi
     1486        deplibs="$deplibs $arg"
     1487        continue
     1488        ;;
     1489
     1490     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
    12931491        deplibs="$deplibs $arg"
    12941492        continue
     
    13591557      -o) prev=output ;;
    13601558
     1559      -precious-files-regex)
     1560        prev=precious_regex
     1561        continue
     1562        ;;
     1563
    13611564      -release)
    13621565        prev=release
     
    13811584        *)
    13821585          $echo "$modename: only absolute run-paths are allowed" 1>&2
    1383           exit 1
     1586          exit $EXIT_FAILURE
    13841587          ;;
    13851588        esac
     
    14771680          ;;
    14781681        esac
    1479         add_flags="$add_flags $arg"
    14801682        ;;
    14811683
     
    15051707             test "$non_pic_object" = none; then
    15061708            $echo "$modename: cannot find name of object for \`$arg'" 1>&2
    1507             exit 1
     1709            exit $EXIT_FAILURE
    15081710          fi
    15091711
     
    15581760          if test -z "$run"; then
    15591761            $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
    1560             exit 1
     1762            exit $EXIT_FAILURE
    15611763          else
    15621764            # Dry-run case.
     
    16121814          ;;
    16131815        esac
    1614         add_flags="$add_flags $arg"
    16151816        ;;
    16161817      esac # arg
     
    16261827      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
    16271828      $echo "$help" 1>&2
    1628       exit 1
    1629     fi
    1630 
    1631     # Infer tagged configuration to use if any are available and
    1632     # if one wasn't chosen via the "--tag" command line option.
    1633     # Only attempt this if the compiler in the base link
    1634     # command doesn't match the default compiler.
    1635     if test -n "$available_tags" && test -z "$tagname"; then
    1636       case $base_compile in
    1637       # Blanks in the command may have been stripped by the calling shell,
    1638       # but not from the CC environment variable when configure was run.
    1639       "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) ;;
    1640       # Blanks at the start of $base_compile will cause this to fail
    1641       # if we don't check for them as well.
    1642       *)
    1643         for z in $available_tags; do
    1644           if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
    1645             # Evaluate the configuration.
    1646             eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
    1647             case $base_compile in
    1648             "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*)
    1649               # The compiler in $compile_command matches
    1650               # the one in the tagged configuration.
    1651               # Assume this is the tagged configuration we want.
    1652               tagname=$z
    1653               break
    1654               ;;
    1655             esac
    1656           fi
    1657         done
    1658         # If $tagname still isn't set, then no tagged configuration
    1659         # was found and let the user know that the "--tag" command
    1660         # line option must be used.
    1661         if test -z "$tagname"; then
    1662           $echo "$modename: unable to infer tagged configuration"
    1663           $echo "$modename: specify a tag with \`--tag'" 1>&2
    1664           exit 1
    1665 #       else
    1666 #         $echo "$modename: using $tagname tagged configuration"
    1667         fi
    1668         ;;
    1669       esac
     1829      exit $EXIT_FAILURE
    16701830    fi
    16711831
     
    17111871      $echo "$modename: you must specify an output file" 1>&2
    17121872      $echo "$help" 1>&2
    1713       exit 1
     1873      exit $EXIT_FAILURE
    17141874      ;;
    17151875    *.$libext) linkmode=oldlib ;;
     
    17211881    case $host in
    17221882    *cygwin* | *mingw* | *pw32*)
    1723       # don't eliminate duplcations in $postdeps and $predeps
     1883      # don't eliminate duplications in $postdeps and $predeps
    17241884      duplicate_compiler_generated_deps=yes
    17251885      ;;
     
    17741934          *)
    17751935            $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
    1776             exit 1
     1936            exit $EXIT_FAILURE
    17771937            ;;
    17781938          esac
     
    18121972        found=no
    18131973        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          ;;
    18141983        -l*)
    18151984          if test "$linkmode" != lib && test "$linkmode" != prog; then
     
    18171986            continue
    18181987          fi
    1819           if test "$pass" = conv && test "$allow_undefined" = yes; then
     1988          if test "$pass" = conv; then
    18201989            deplibs="$deplib $deplibs"
    18211990            continue
     
    18231992          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
    18241993          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
    1825             for search_ext in .la $shrext .so .a; do
     1994            for search_ext in .la $std_shrext .so .a; do
    18261995              # Search the libtool library
    18271996              lib="$searchdir/lib${name}${search_ext}"
     
    18992068            if test "$pass" = scan; then
    19002069              deplibs="$deplib $deplibs"
    1901               newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    19022070            else
    19032071              compile_deplibs="$deplib $compile_deplibs"
    19042072              finalize_deplibs="$deplib $finalize_deplibs"
    19052073            fi
     2074            newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
    19062075            ;;
    19072076          *)
     
    19312100          case $linkmode in
    19322101          lib)
    1933             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
    19342118              $echo
    19352119              $echo "*** Warning: Trying to link with static lib archive $deplib."
     
    19822166        else
    19832167          $echo "$modename: cannot find the library \`$lib'" 1>&2
    1984           exit 1
     2168          exit $EXIT_FAILURE
    19852169        fi
    19862170
     
    19892173        else
    19902174          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    1991           exit 1
     2175          exit $EXIT_FAILURE
    19922176        fi
    19932177
     
    20222206          # Only check for convenience libraries
    20232207          deplibs="$lib $deplibs"
    2024           tmp_libs=
    2025           for deplib in $dependency_libs; do
    2026             #echo "Adding $deplib to \$deplibs"
    2027             deplibs="$deplib $deplibs"
    2028             if test "X$duplicate_deps" = "Xyes" ; then
    2029               case "$tmp_libs " in
    2030               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
    2031               esac
    2032             fi
    2033             tmp_libs="$tmp_libs $deplib"
    2034           done
    20352208          if test -z "$libdir"; then
    20362209            if test -z "$old_library"; then
    20372210              $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
    2038               exit 1
     2211              exit $EXIT_FAILURE
    20392212            fi
    20402213            # It is a libtool convenience library, so add in its objects.
    20412214            convenience="$convenience $ladir/$objdir/$old_library"
    20422215            old_convenience="$old_convenience $ladir/$objdir/$old_library"
     2216            tmp_libs=
     2217            for deplib in $dependency_libs; do
     2218              deplibs="$deplib $deplibs"
     2219              if test "X$duplicate_deps" = "Xyes" ; then
     2220                case "$tmp_libs " in
     2221                *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
     2222                esac
     2223              fi
     2224              tmp_libs="$tmp_libs $deplib"
     2225            done
    20432226          elif test "$linkmode" != prog && test "$linkmode" != lib; then
    20442227            $echo "$modename: \`$lib' is not a convenience library" 1>&2
    2045             exit 1
     2228            exit $EXIT_FAILURE
    20462229          fi
    20472230          continue
    20482231        fi # $pass = conv
    20492232
    2050    
     2233
    20512234        # Get the name of the library we link against.
    20522235        linklib=
     
    20562239        if test -z "$linklib"; then
    20572240          $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
    2058           exit 1
     2241          exit $EXIT_FAILURE
    20592242        fi
    20602243
     
    20632246          if test -z "$libdir"; then
    20642247            $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
    2065             exit 1
    2066           fi
    2067           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
    20682253            # If there is no dlname, no dlopen support or we're linking
    20692254            # statically, we need to preload.  We also need to preload any
     
    21032288          fi
    21042289        else
    2105           dir="$ladir/$objdir"
    2106           absdir="$abs_ladir/$objdir"
    2107           # Remove this search path later
    2108           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
    21092301        fi # $installed = yes
    21102302        name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
     
    21142306          if test -z "$libdir"; then
    21152307            $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
    2116             exit 1
     2308            exit $EXIT_FAILURE
    21172309          fi
    21182310          # Prefer using a static library (so that no silly _DYNAMIC symbols
     
    21412333        fi
    21422334
    2143    
     2335
    21442336        if test "$linkmode" = prog && test "$pass" != link; then
    21452337          newlib_search_path="$newlib_search_path $ladir"
     
    22282420          fi
    22292421          # This is a shared library
    2230        
    2231       # Warn about portability, can't link against -module's on some systems (darwin)
    2232       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
    22332426            $echo
    22342427            if test "$linkmode" = prog; then
     
    22372430              $echo "*** Warning: Linking the shared library $output against the loadable module"
    22382431            fi
    2239             $echo "*** $linklib is not portable!"   
    2240       fi         
     2432            $echo "*** $linklib is not portable!"
     2433          fi
    22412434          if test "$linkmode" = lib &&
    22422435             test "$hardcode_into_libs" = yes; then
     
    22962489              $show "extracting exported symbol list from \`$soname'"
    22972490              save_ifs="$IFS"; IFS='~'
    2298               eval cmds=\"$extract_expsyms_cmds\"
     2491              cmds=$extract_expsyms_cmds
    22992492              for cmd in $cmds; do
    23002493                IFS="$save_ifs"
     2494                eval cmd=\"$cmd\"
    23012495                $show "$cmd"
    23022496                $run eval "$cmd" || exit $?
     
    23092503              $show "generating import library for \`$soname'"
    23102504              save_ifs="$IFS"; IFS='~'
    2311               eval cmds=\"$old_archive_from_expsyms_cmds\"
     2505              cmds=$old_archive_from_expsyms_cmds
    23122506              for cmd in $cmds; do
    23132507                IFS="$save_ifs"
     2508                eval cmd=\"$cmd\"
    23142509                $show "$cmd"
    23152510                $run eval "$cmd" || exit $?
     
    23342529                  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
    23352530                  *-*-darwin* )
    2336                     # if the lib is a module then we can not link against it, someone
    2337                     # is ignoring the new warnings I added
    2338                     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
    23392534                      $echo "** Warning, lib $linklib is a module, not a shared library"
    23402535                      if test -z "$old_library" ; then
     
    23442539                      else
    23452540                        add="$dir/$old_library"
    2346                       fi 
     2541                      fi
    23472542                    fi
    23482543                esac
     
    23692564                  case "$libdir" in
    23702565                    [\\/]*)
    2371                       add_dir="-L$inst_prefix_dir$libdir $add_dir"
     2566                      add_dir="$add_dir -L$inst_prefix_dir$libdir"
    23722567                      ;;
    23732568                  esac
     
    23862581            if test "$lib_linked" != yes; then
    23872582              $echo "$modename: configuration error: unsupported hardcode properties"
    2388               exit 1
     2583              exit $EXIT_FAILURE
    23892584            fi
    23902585
     
    24292624              add="-l$name"
    24302625            elif test "$hardcode_automatic" = yes; then
    2431               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
    24322628                add="$inst_prefix_dir$libdir/$linklib"
    24332629              else
     
    24412637                case "$libdir" in
    24422638                  [\\/]*)
    2443                     add_dir="-L$inst_prefix_dir$libdir $add_dir"
     2639                    add_dir="$add_dir -L$inst_prefix_dir$libdir"
    24442640                    ;;
    24452641                esac
     
    25082704
    25092705        if test "$linkmode" = lib; then
    2510           #if test -n "$dependency_libs" &&
    2511           #   { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
    2512           #     test "$link_static" = yes; }; then
     2706          if test -n "$dependency_libs" &&
     2707             { test "$hardcode_into_libs" != yes ||
     2708               test "$build_old_libs" = yes ||
     2709               test "$link_static" = yes; }; then
    25132710            # Extract -R from dependency_libs
    25142711            temp_deplibs=
     
    25242721            done
    25252722            dependency_libs="$temp_deplibs"
    2526           #fi
     2723          fi
    25272724
    25282725          newlib_search_path="$newlib_search_path $absdir"
     
    25662763                  if test -z "$libdir"; then
    25672764                    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    2568                     exit 1
     2765                    exit $EXIT_FAILURE
    25692766                  fi
    25702767                  if test "$absdir" != "$libdir"; then
    2571                     # Sure, some shells/systems don't implement the -ef.
    2572                     # Those will have to live with the warning.
    2573                     test "$absdir" -ef "$libdir" > /dev/null 2>&1 ||
    2574                       $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
     2768                    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
    25752769                  fi
    25762770                  path="$absdir"
     
    25792773                case $host in
    25802774                *-*-darwin*)
    2581                   # 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
    25822777                  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
    25832778                  if test -n "$deplibrary_names" ; then
     
    25872782                    if test -f "$path/$depdepl" ; then
    25882783                      depdepl="$path/$depdepl"
    2589                    fi
     2784                    fi
    25902785                    # do not add paths which are already there
    25912786                    case " $newlib_search_path " in
     
    25932788                    *) newlib_search_path="$newlib_search_path $path";;
    25942789                    esac
    2595                     path=""
    25962790                  fi
     2791                  path=""
    25972792                  ;;
    25982793                *)
    2599                 path="-L$path"
     2794                  path="-L$path"
     2795                  ;;
     2796                esac
    26002797                ;;
    2601                 esac
    2602                
    2603                 ;;
    2604                   -l*)
     2798              -l*)
    26052799                case $host in
    26062800                *-*-darwin*)
    2607                  # Again, we only want to link against shared libraries
    2608                  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
    2609                  for tmp in $newlib_search_path ; do
    2610                      if test -f "$tmp/lib$tmp_libs.dylib" ; then
    2611                        eval depdepl="$tmp/lib$tmp_libs.dylib"
    2612                        break
    2613                      fi 
    2614          done
    2615          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=""
    26162810                  ;;
    26172811                *) continue ;;
    2618                 esac             
     2812                esac
    26192813                ;;
    26202814              *) continue ;;
     
    26222816              case " $deplibs " in
    26232817              *" $depdepl "*) ;;
    2624               *) deplibs="$deplibs $depdepl" ;;
    2625               esac           
     2818              *) deplibs="$depdepl $deplibs" ;;
     2819              esac
    26262820              case " $deplibs " in
    26272821              *" $path "*) ;;
     
    27132907        done # for var
    27142908      fi
    2715       # 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)
    27162911      tmp_libs=
    27172912      for i in $dependency_libs ; do
     
    27732968      lib*)
    27742969        name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
    2775         eval shared_ext=\"$shrext\"
     2970        eval shared_ext=\"$shrext_cmds\"
    27762971        eval libname=\"$libname_spec\"
    27772972        ;;
     
    27802975          $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
    27812976          $echo "$help" 1>&2
    2782           exit 1
     2977          exit $EXIT_FAILURE
    27832978        fi
    27842979        if test "$need_lib_prefix" != no; then
    27852980          # Add the "lib" prefix for modules if required
    27862981          name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
    2787           eval shared_ext=\"$shrext\"
     2982          eval shared_ext=\"$shrext_cmds\"
    27882983          eval libname=\"$libname_spec\"
    27892984        else
     
    27962991        if test "$deplibs_check_method" != pass_all; then
    27972992          $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
    2798           exit 1
     2993          exit $EXIT_FAILURE
    27992994        else
    28002995          $echo
     
    28443039          $echo "$modename: too many parameters to \`-version-info'" 1>&2
    28453040          $echo "$help" 1>&2
    2846           exit 1
     3041          exit $EXIT_FAILURE
    28473042        fi
    28483043
     
    28503045        # this retains compatibility with .la files and attempts
    28513046        # to make the code below a bit more comprehensible
    2852        
     3047
    28533048        case $vinfo_number in
    28543049        yes)
     
    28943089          $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
    28953090          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2896           exit 1
     3091          exit $EXIT_FAILURE
    28973092          ;;
    28983093        esac
     
    29033098          $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
    29043099          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2905           exit 1
     3100          exit $EXIT_FAILURE
    29063101          ;;
    29073102        esac
     
    29123107          $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
    29133108          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2914           exit 1
     3109          exit $EXIT_FAILURE
    29153110          ;;
    29163111        esac
     
    29193114          $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
    29203115          $echo "$modename: \`$vinfo' is not valid version information" 1>&2
    2921           exit 1
     3116          exit $EXIT_FAILURE
    29223117        fi
    29233118
     
    29363131          # Darwin ld doesn't like 0 for these options...
    29373132          minor_current=`expr $current + 1`
    2938           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"
    29393134          ;;
    29403135
     
    30083203          $echo "$modename: unknown library version type \`$version_type'" 1>&2
    30093204          $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
    3010           exit 1
     3205          exit $EXIT_FAILURE
    30113206          ;;
    30123207        esac
     
    30623257               ;;
    30633258            $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
    30643265               removelist="$removelist $p"
    30653266               ;;
     
    30983299          esac
    30993300        done
    3100         if true || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
     3301        if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
    31013302          dependency_libs="$temp_xrpath $dependency_libs"
    31023303        fi
     
    31353336          *-*-netbsd*)
    31363337            # Don't link with libc until the a.out ld.so is fixed.
    3137             ;;
    3138           *-*-freebsd*-gnu*)
    3139             # Prevent $arg from being parsed by the freebsd regexp below.
    3140             if test "$build_libtool_need_lc" = "yes"; then
    3141               deplibs="$deplibs -lc"
    3142             fi
    31433338            ;;
    31443339          *-*-openbsd* | *-*-freebsd*)
     
    34923687          dep_rpath=
    34933688          rpath="$finalize_rpath"
    3494           test "$mode" != relink && test "$fast_install" = no && rpath="$compile_rpath$rpath"
     3689          test "$mode" != relink && rpath="$compile_rpath$rpath"
    34953690          for libdir in $rpath; do
    34963691            if test -n "$hardcode_libdir_flag_spec"; then
     
    35473742
    35483743        # Get the real and link names of the library.
    3549         eval shared_ext=\"$shrext\"
     3744        eval shared_ext=\"$shrext_cmds\"
    35503745        eval library_names=\"$library_names_spec\"
    35513746        set dummy $library_names
     
    35773772            export_symbols="$output_objdir/$libname.exp"
    35783773            $run $rm $export_symbols
    3579             eval cmds=\"$export_symbols_cmds\"
     3774            cmds=$export_symbols_cmds
    35803775            save_ifs="$IFS"; IFS='~'
    35813776            for cmd in $cmds; do
    35823777              IFS="$save_ifs"
     3778              eval cmd=\"$cmd\"
    35833779              if len=`expr "X$cmd" : ".*"` &&
    35843780               test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
     
    36103806                case " $convenience " in
    36113807                *" $test_deplib "*) ;;
    3612                 *) 
     3808                *)
    36133809                        tmp_deplibs="$tmp_deplibs $test_deplib"
    36143810                        ;;
    36153811                esac
    36163812        done
    3617         deplibs="$tmp_deplibs" 
     3813        deplibs="$tmp_deplibs"
    36183814
    36193815        if test -n "$convenience"; then
     
    36233819          else
    36243820            gentop="$output_objdir/${outputname}x"
    3625             $show "${rm}r $gentop"
    3626             $run ${rm}r "$gentop"
    3627             $show "$mkdir $gentop"
    3628             $run $mkdir "$gentop"
    3629             status=$?
    3630             if test "$status" -ne 0 && test ! -d "$gentop"; then
    3631               exit $status
    3632             fi
    36333821            generated="$generated $gentop"
    36343822
    3635             for xlib in $convenience; do
    3636               # Extract the objects.
    3637               case $xlib in
    3638               [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    3639               *) xabs=`pwd`"/$xlib" ;;
    3640               esac
    3641               xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    3642               xdir="$gentop/$xlib"
    3643 
    3644               $show "${rm}r $xdir"
    3645               $run ${rm}r "$xdir"
    3646               $show "$mkdir $xdir"
    3647               $run $mkdir "$xdir"
    3648               status=$?
    3649               if test "$status" -ne 0 && test ! -d "$xdir"; then
    3650                 exit $status
    3651               fi
    3652               # We will extract separately just the conflicting names and we will no
    3653               # longer touch any unique names. It is faster to leave these extract
    3654               # automatically by $AR in one run.
    3655               $show "(cd $xdir && $AR x $xabs)"
    3656               $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    3657               if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    3658                 :
    3659               else
    3660                 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    3661                 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    3662                 $AR t "$xabs" | sort | uniq -cd | while read -r count name
    3663                 do
    3664                   i=1
    3665                   while test "$i" -le "$count"
    3666                   do
    3667                    # Put our $i before any first dot (extension)
    3668                    # Never overwrite any file
    3669                    name_to="$name"
    3670                    while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    3671                    do
    3672                      name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    3673                    done
    3674                    $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    3675                    $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    3676                    i=`expr $i + 1`
    3677                   done
    3678                 done
    3679               fi
    3680 
    3681               libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
    3682             done
    3683           fi
    3684         fi
    3685 
     3823            func_extract_archives $gentop $convenience
     3824            libobjs="$libobjs $func_extract_archives_result"
     3825          fi
     3826        fi
     3827       
    36863828        if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
    36873829          eval flag=\"$thread_safe_flag_spec\"
     
    36943836        fi
    36953837
    3696         # Add all flags from the command line.  We here create a library,
    3697         # but those flags were only added to compile_command and
    3698         # finalize_command, which are only used when creating executables.
    3699         # So do it by hand here.
    3700         compiler_flags="$compiler_flags $add_flags"
    3701         # Only add it to commands which use CC, instead of LD, i.e.
    3702         # only to $compiler_flags
    3703         #linker_flags="$linker_flags $add_flags"
    3704 
    37053838        # Do each of the archive commands.
    37063839        if test "$module" = yes && test -n "$module_cmds" ; then
    37073840          if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
    3708             eval cmds=\"$module_expsym_cmds\"
     3841            eval test_cmds=\"$module_expsym_cmds\"
     3842            cmds=$module_expsym_cmds
    37093843          else
    3710             eval cmds=\"$module_cmds\"
     3844            eval test_cmds=\"$module_cmds\"
     3845            cmds=$module_cmds
    37113846          fi
    37123847        else
    37133848        if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
    3714           eval cmds=\"$archive_expsym_cmds\"
     3849          eval test_cmds=\"$archive_expsym_cmds\"
     3850          cmds=$archive_expsym_cmds
    37153851        else
    3716           eval cmds=\"$archive_cmds\"
    3717           fi
    3718         fi
    3719 
    3720         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" : ".*"` &&
    37213858           test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
    37223859          :
     
    38193956
    38203957          # 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
    38213965          if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
    3822             eval cmds=\"$archive_expsym_cmds\"
     3966            cmds=$archive_expsym_cmds
    38233967          else
    3824             eval cmds=\"$archive_cmds\"
     3968            cmds=$archive_cmds
     3969            fi
    38253970          fi
    38263971
    38273972          # Append the command to remove the reloadable object files
    38283973          # to the just-reset $cmds.
    3829           eval cmds=\"\$cmds~$rm $delfiles\"
     3974          eval cmds=\"\$cmds~\$rm $delfiles\"
    38303975        fi
    38313976        save_ifs="$IFS"; IFS='~'
    38323977        for cmd in $cmds; do
    38333978          IFS="$save_ifs"
     3979          eval cmd=\"$cmd\"
    38343980          $show "$cmd"
    38353981          $run eval "$cmd" || exit $?
     
    38403986        if test "$mode" = relink; then
    38413987          $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
    3842           exit 0
     3988          exit $EXIT_SUCCESS
    38433989        fi
    38443990
     
    38884034        if test -n "$objs$old_deplibs"; then
    38894035          $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
    3890           exit 1
     4036          exit $EXIT_FAILURE
    38914037        fi
    38924038        libobj="$output"
     
    39174063        else
    39184064          gentop="$output_objdir/${obj}x"
    3919           $show "${rm}r $gentop"
    3920           $run ${rm}r "$gentop"
    3921           $show "$mkdir $gentop"
    3922           $run $mkdir "$gentop"
    3923           status=$?
    3924           if test "$status" -ne 0 && test ! -d "$gentop"; then
    3925             exit $status
    3926           fi
    39274065          generated="$generated $gentop"
    39284066
    3929           for xlib in $convenience; do
    3930             # Extract the objects.
    3931             case $xlib in
    3932             [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    3933             *) xabs=`pwd`"/$xlib" ;;
    3934             esac
    3935             xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    3936             xdir="$gentop/$xlib"
    3937 
    3938             $show "${rm}r $xdir"
    3939             $run ${rm}r "$xdir"
    3940             $show "$mkdir $xdir"
    3941             $run $mkdir "$xdir"
    3942             status=$?
    3943             if test "$status" -ne 0 && test ! -d "$xdir"; then
    3944               exit $status
    3945             fi
    3946             # We will extract separately just the conflicting names and we will no
    3947             # longer touch any unique names. It is faster to leave these extract
    3948             # automatically by $AR in one run.
    3949             $show "(cd $xdir && $AR x $xabs)"
    3950             $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    3951             if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    3952               :
    3953             else
    3954               $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    3955               $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    3956               $AR t "$xabs" | sort | uniq -cd | while read -r count name
    3957               do
    3958                 i=1
    3959                 while test "$i" -le "$count"
    3960                 do
    3961                  # Put our $i before any first dot (extension)
    3962                  # Never overwrite any file
    3963                  name_to="$name"
    3964                  while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    3965                  do
    3966                    name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    3967                  done
    3968                  $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    3969                  $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    3970                  i=`expr $i + 1`
    3971                 done
    3972               done
    3973             fi
    3974 
    3975             reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
    3976           done
     4067          func_extract_archives $gentop $convenience
     4068          reload_conv_objs="$reload_objs $func_extract_archives_result"
    39774069        fi
    39784070      fi
     
    39824074
    39834075      output="$obj"
    3984       eval cmds=\"$reload_cmds\"
     4076      cmds=$reload_cmds
    39854077      save_ifs="$IFS"; IFS='~'
    39864078      for cmd in $cmds; do
    39874079        IFS="$save_ifs"
     4080        eval cmd=\"$cmd\"
    39884081        $show "$cmd"
    39894082        $run eval "$cmd" || exit $?
     
    39984091        fi
    39994092
    4000         exit 0
     4093        exit $EXIT_SUCCESS
    40014094      fi
    40024095
     
    40114104        # $show "echo timestamp > $libobj"
    40124105        # $run eval "echo timestamp > $libobj" || exit $?
    4013         exit 0
     4106        exit $EXIT_SUCCESS
    40144107      fi
    40154108
     
    40184111        reload_objs="$libobjs $reload_conv_objs"
    40194112        output="$libobj"
    4020         eval cmds=\"$reload_cmds\"
     4113        cmds=$reload_cmds
    40214114        save_ifs="$IFS"; IFS='~'
    40224115        for cmd in $cmds; do
    40234116          IFS="$save_ifs"
     4117          eval cmd=\"$cmd\"
    40244118          $show "$cmd"
    40254119          $run eval "$cmd" || exit $?
     
    40334127      fi
    40344128
    4035       exit 0
     4129      exit $EXIT_SUCCESS
    40364130      ;;
    40374131
     
    43514445        *)
    43524446          $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
    4353           exit 1
     4447          exit $EXIT_FAILURE
    43544448          ;;
    43554449        esac
     
    43634457        finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
    43644458      fi
    4365 
    4366       # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G
    4367       # Also add -bnolibpath to the beginning of the link line, to clear the hardcoded runpath.
    4368       # Otherwise, things like the -L path to libgcc.a are accidentally hardcoded by ld.
    4369       # This does not apply on AIX for ia64, which uses a SysV linker.
    4370       case "$host" in
    4371         ia64-*-aix5*) ;;
    4372         *-*-aix4* | *-*-aix5*)
    4373                    compile_command=`$echo "X$compile_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"`
    4374                    finalize_command=`$echo "X$finalize_command $wl-brtl" | $Xsed -e "s/\$CC/\$CC $wl-bnolibpath/1"` ;;
    4375       esac
    43764459
    43774460      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
     
    44504533        $show "$link_command"
    44514534        $run eval "$link_command" || exit $?
    4452         exit 0
     4535        exit $EXIT_SUCCESS
    44534536      fi
    44544537
     
    45054588
    45064589      # Quote $echo for shipping.
    4507       if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
    4508         case $0 in
    4509         [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
    4510         *) 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";;
    45114594        esac
    45124595        qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
     
    45344617            cwrapper=`$echo ${output}.exe`
    45354618            $rm $cwrappersource $cwrapper
    4536             trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15
     4619            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
    45374620
    45384621            cat > $cwrappersource <<EOF
     
    45434626   The $output program cannot be directly executed until all the libtool
    45444627   libraries that it depends on are installed.
    4545    
     4628
    45464629   This wrapper executable should never be moved out of the build directory.
    45474630   If it is, it will not operate correctly.
     
    45754658  defined (__OS2__)
    45764659#define HAVE_DOS_BASED_FILE_SYSTEM
    4577 #ifndef DIR_SEPARATOR_2 
     4660#ifndef DIR_SEPARATOR_2
    45784661#define DIR_SEPARATOR_2 '\\'
    45794662#endif
     
    46064689  char **newargz;
    46074690  int i;
    4608  
     4691
    46094692  program_name = (char *) xstrdup ((char *) basename (argv[0]));
    46104693  newargz = XMALLOC(char *, argc+2);
     
    46194702  /* we know the script has the same name, without the .exe */
    46204703  /* so make sure newargz[1] doesn't end in .exe */
    4621   strendzap(newargz[1],".exe"); 
     4704  strendzap(newargz[1],".exe");
    46224705  for (i = 1; i < argc; i++)
    46234706    newargz[i+1] = xstrdup(argv[i]);
     
    46424725}
    46434726
    4644 char * 
     4727char *
    46454728xstrdup (const char *string)
    46464729{
     
    46564739#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
    46574740  /* Skip over the disk name in MSDOS pathnames. */
    4658   if (isalpha (name[0]) && name[1] == ':') 
     4741  if (isalpha (name[0]) && name[1] == ':')
    46594742    name += 2;
    46604743#endif
     
    46664749}
    46674750
    4668 char * 
     4751char *
    46694752fnqualify(const char *path)
    46704753{
     
    46944777
    46954778char *
    4696 strendzap(char *str, const char *pat) 
     4779strendzap(char *str, const char *pat)
    46974780{
    46984781  size_t len, patlen;
     
    47144797
    47154798static void
    4716 lt_error_core (int exit_status, const char * mode, 
     4799lt_error_core (int exit_status, const char * mode,
    47174800          const char * message, va_list ap)
    47184801{
     
    47434826        esac
    47444827        $rm $output
    4745         trap "$rm $output; exit 1" 1 2 15
     4828        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
    47464829
    47474830        $echo > $output "\
     
    47644847# The HP-UX ksh and POSIX shell print the target directory to stdout
    47654848# if CDPATH is set.
    4766 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
     4849(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
    47674850
    47684851relink_command=\"$relink_command\"
     
    48434926        $echo \"\$relink_command_output\" >&2
    48444927        $rm \"\$progdir/\$file\"
    4845         exit 1
     4928        exit $EXIT_FAILURE
    48464929      fi
    48474930    fi
     
    49054988        $echo >> $output "\
    49064989      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
    4907       exit 1
     4990      exit $EXIT_FAILURE
    49084991    fi
    49094992  else
     
    49124995    \$echo \"This script is just a wrapper for \$program.\" 1>&2
    49134996    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
    4914     exit 1
     4997    exit $EXIT_FAILURE
    49154998  fi
    49164999fi\
     
    49185001        chmod +x $output
    49195002      fi
    4920       exit 0
     5003      exit $EXIT_SUCCESS
    49215004      ;;
    49225005    esac
     
    49415024      if test -n "$addlibs"; then
    49425025        gentop="$output_objdir/${outputname}x"
    4943         $show "${rm}r $gentop"
    4944         $run ${rm}r "$gentop"
    4945         $show "$mkdir $gentop"
    4946         $run $mkdir "$gentop"
    4947         status=$?
    4948         if test "$status" -ne 0 && test ! -d "$gentop"; then
    4949           exit $status
    4950         fi
    49515026        generated="$generated $gentop"
    49525027
    4953         # Add in members from convenience archives.
    4954         for xlib in $addlibs; do
    4955           # Extract the objects.
    4956           case $xlib in
    4957           [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
    4958           *) xabs=`pwd`"/$xlib" ;;
    4959           esac
    4960           xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
    4961           xdir="$gentop/$xlib"
    4962 
    4963           $show "${rm}r $xdir"
    4964           $run ${rm}r "$xdir"
    4965           $show "$mkdir $xdir"
    4966           $run $mkdir "$xdir"
    4967           status=$?
    4968           if test "$status" -ne 0 && test ! -d "$xdir"; then
    4969             exit $status
    4970           fi
    4971           # We will extract separately just the conflicting names and we will no
    4972           # longer touch any unique names. It is faster to leave these extract
    4973           # automatically by $AR in one run.
    4974           $show "(cd $xdir && $AR x $xabs)"
    4975           $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
    4976           if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
    4977             :
    4978           else
    4979             $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
    4980             $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
    4981             $AR t "$xabs" | sort | uniq -cd | while read -r count name
    4982             do
    4983               i=1
    4984               while test "$i" -le "$count"
    4985               do
    4986                # Put our $i before any first dot (extension)
    4987                # Never overwrite any file
    4988                name_to="$name"
    4989                while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
    4990                do
    4991                  name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
    4992                done
    4993                $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
    4994                $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
    4995                i=`expr $i + 1`
    4996               done
    4997             done
    4998           fi
    4999 
    5000           oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
    5001         done
    5002       fi
    5003 
    5004       compiler_flags="$compiler_flags $add_flags"
     5028        func_extract_archives $gentop $addlibs
     5029        oldobjs="$oldobjs $func_extract_archives_result"
     5030      fi
    50055031
    50065032      # Do each command in the archive commands.
    50075033      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
    5008         eval cmds=\"$old_archive_from_new_cmds\"
     5034       cmds=$old_archive_from_new_cmds
    50095035      else
    50105036        eval cmds=\"$old_archive_cmds\"
     
    50125038        if len=`expr "X$cmds" : ".*"` &&
    50135039             test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
    5014           :
     5040          cmds=$old_archive_cmds
    50155041        else
    50165042          # the command line is too long to link in one step, link in parts
     
    50395065          do
    50405066            last_oldobj=$obj
    5041           done 
     5067          done
    50425068          for obj in $save_oldobjs
    50435069          do
     
    50535079              if test "$obj" = "$last_oldobj" ; then
    50545080                RANLIB=$save_RANLIB
    5055               fi 
     5081              fi
    50565082              test -z "$concat_cmds" || concat_cmds=$concat_cmds~
    50575083              eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
     
    50645090            eval cmds=\"\$concat_cmds\"
    50655091          else
    5066             eval cmds=\"\$concat_cmds~$old_archive_cmds\"
     5092            eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
    50675093          fi
    50685094        fi
     
    50705096      save_ifs="$IFS"; IFS='~'
    50715097      for cmd in $cmds; do
     5098        eval cmd=\"$cmd\"
    50725099        IFS="$save_ifs"
    50735100        $show "$cmd"
     
    51015128      done
    51025129      # Quote the link command for shipping.
    5103       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@)"
    51045131      relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
    51055132      if test "$hardcode_automatic" = yes ; then
    5106         relink_command=
    5107       fi 
     5133        relink_command=
     5134      fi
     5135
     5136
    51085137      # Only create the output if not a dry run.
    51095138      if test -z "$run"; then
     
    51235152                if test -z "$libdir"; then
    51245153                  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
    5125                   exit 1
     5154                  exit $EXIT_FAILURE
    51265155                fi
    51275156                newdependency_libs="$newdependency_libs $libdir/$name"
     
    51375166              if test -z "$libdir"; then
    51385167                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    5139                 exit 1
     5168                exit $EXIT_FAILURE
    51405169              fi
    51415170              newdlfiles="$newdlfiles $libdir/$name"
     
    51485177              if test -z "$libdir"; then
    51495178                $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    5150                 exit 1
     5179                exit $EXIT_FAILURE
    51515180              fi
    51525181              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"
    51535201            done
    51545202            dlprefiles="$newdlprefiles"
     
    51965244# Directory that this library needs to be installed in:
    51975245libdir='$install_libdir'"
    5198           if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then
     5246          if test "$installed" = no && test "$need_relink" = yes; then
    51995247            $echo >> $output "\
    52005248relink_command=\"$relink_command\""
     
    52095257      ;;
    52105258    esac
    5211     exit 0
     5259    exit $EXIT_SUCCESS
    52125260    ;;
    52135261
     
    52985346      $echo "$modename: you must specify an install program" 1>&2
    52995347      $echo "$help" 1>&2
    5300       exit 1
     5348      exit $EXIT_FAILURE
    53015349    fi
    53025350
     
    53045352      $echo "$modename: the \`$prev' option requires an argument" 1>&2
    53055353      $echo "$help" 1>&2
    5306       exit 1
     5354      exit $EXIT_FAILURE
    53075355    fi
    53085356
     
    53145362      fi
    53155363      $echo "$help" 1>&2
    5316       exit 1
     5364      exit $EXIT_FAILURE
    53175365    fi
    53185366
     
    53355383        $echo "$modename: \`$dest' is not a directory" 1>&2
    53365384        $echo "$help" 1>&2
    5337         exit 1
     5385        exit $EXIT_FAILURE
    53385386      fi
    53395387    fi
     
    53475395          $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
    53485396          $echo "$help" 1>&2
    5349           exit 1
     5397          exit $EXIT_FAILURE
    53505398          ;;
    53515399        esac
     
    53765424          $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
    53775425          $echo "$help" 1>&2
    5378           exit 1
     5426          exit $EXIT_FAILURE
    53795427        fi
    53805428
     
    54185466          if test "$inst_prefix_dir" = "$destdir"; then
    54195467            $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
    5420             exit 1
     5468            exit $EXIT_FAILURE
    54215469          fi
    54225470
     
    54335481          else
    54345482            $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
    5435             exit 1
     5483            exit $EXIT_FAILURE
    54365484          fi
    54375485        fi
     
    54685516          # Do each command in the postinstall commands.
    54695517          lib="$destdir/$realname"
    5470           eval cmds=\"$postinstall_cmds\"
     5518          cmds=$postinstall_cmds
    54715519          save_ifs="$IFS"; IFS='~'
    54725520          for cmd in $cmds; do
    54735521            IFS="$save_ifs"
     5522            eval cmd=\"$cmd\"
    54745523            $show "$cmd"
    54755524            $run eval "$cmd" || exit $?
     
    55115560          $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
    55125561          $echo "$help" 1>&2
    5513           exit 1
     5562          exit $EXIT_FAILURE
    55145563          ;;
    55155564        esac
     
    55295578          $run eval "$install_prog \$staticobj \$staticdest" || exit $?
    55305579        fi
    5531         exit 0
     5580        exit $EXIT_SUCCESS
    55325581        ;;
    55335582
     
    55835632          if test -z "$notinst_deplibs"; then
    55845633            $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
    5585             exit 1
     5634            exit $EXIT_FAILURE
    55865635          fi
    55875636
     
    56245673              test -n "$TMPDIR" && tmpdir="$TMPDIR"
    56255674              tmpdir="$tmpdir/libtool-$$"
    5626               if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
     5675              save_umask=`umask`
     5676              umask 0077
     5677              if $mkdir "$tmpdir"; then
     5678                umask $save_umask
    56275679              else
     5680                umask $save_umask
    56285681                $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
    56295682                continue
     
    56845737      $run eval "$install_prog \$file \$oldlib" || exit $?
    56855738
    5686       if test -n "$stripme" && test -n "$striplib"; then
     5739      if test -n "$stripme" && test -n "$old_striplib"; then
    56875740        $show "$old_striplib $oldlib"
    56885741        $run eval "$old_striplib $oldlib" || exit $?
     
    56905743
    56915744      # Do each command in the postinstall commands.
    5692       eval cmds=\"$old_postinstall_cmds\"
     5745      cmds=$old_postinstall_cmds
    56935746      save_ifs="$IFS"; IFS='~'
    56945747      for cmd in $cmds; do
    56955748        IFS="$save_ifs"
     5749        eval cmd=\"$cmd\"
    56965750        $show "$cmd"
    56975751        $run eval "$cmd" || exit $?
     
    57075761      # Maybe just do a dry run.
    57085762      test -n "$run" && current_libdirs=" -n$current_libdirs"
    5709       exec_cmd='$SHELL $0 --finish$current_libdirs'
     5763      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
    57105764    else
    5711       exit 0
     5765      exit $EXIT_SUCCESS
    57125766    fi
    57135767    ;;
     
    57285782        if test -n "$finish_cmds"; then
    57295783          # Do each command in the finish commands.
    5730           eval cmds=\"$finish_cmds\"
     5784          cmds=$finish_cmds
    57315785          save_ifs="$IFS"; IFS='~'
    57325786          for cmd in $cmds; do
    57335787            IFS="$save_ifs"
     5788            eval cmd=\"$cmd\"
    57345789            $show "$cmd"
    57355790            $run eval "$cmd" || admincmds="$admincmds
     
    57485803
    57495804    # Exit here if they wanted silent mode.
    5750     exit 0
     5805    test "$show" = : && exit $EXIT_SUCCESS
    57515806
    57525807    $echo "----------------------------------------------------------------------"
     
    57845839    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
    57855840    $echo "----------------------------------------------------------------------"
    5786     exit 0
     5841    exit $EXIT_SUCCESS
    57875842    ;;
    57885843
     
    57965851      $echo "$modename: you must specify a COMMAND" 1>&2
    57975852      $echo "$help"
    5798       exit 1
     5853      exit $EXIT_FAILURE
    57995854    fi
    58005855
     
    58045859        $echo "$modename: \`$file' is not a file" 1>&2
    58055860        $echo "$help" 1>&2
    5806         exit 1
     5861        exit $EXIT_FAILURE
    58075862      fi
    58085863
     
    58155870          $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
    58165871          $echo "$help" 1>&2
    5817           exit 1
     5872          exit $EXIT_FAILURE
    58185873        fi
    58195874
     
    58425897        else
    58435898          $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
    5844           exit 1
     5899          exit $EXIT_FAILURE
    58455900        fi
    58465901        ;;
     
    59145969
    59155970      # Now prepare to actually exec the command.
    5916       exec_cmd="\$cmd$args"
     5971      exec_cmd="\"\$cmd\"$args"
    59175972    else
    59185973      # Display what would be done.
     
    59215976        $echo "export $shlibpath_var"
    59225977      fi
    5923       $echo "$cmd$args"
    5924       exit 0
     5978      eval \$echo \"\$cmd\"$args
     5979      exit $EXIT_SUCCESS
    59255980    fi
    59265981    ;;
     
    59506005      $echo "$modename: you must specify an RM program" 1>&2
    59516006      $echo "$help" 1>&2
    5952       exit 1
     6007      exit $EXIT_FAILURE
    59536008    fi
    59546009
     
    60056060            if test -n "$library_names"; then
    60066061              # Do each command in the postuninstall commands.
    6007               eval cmds=\"$postuninstall_cmds\"
     6062              cmds=$postuninstall_cmds
    60086063              save_ifs="$IFS"; IFS='~'
    60096064              for cmd in $cmds; do
    60106065                IFS="$save_ifs"
     6066                eval cmd=\"$cmd\"
    60116067                $show "$cmd"
    60126068                $run eval "$cmd"
     
    60206076            if test -n "$old_library"; then
    60216077              # Do each command in the old_postuninstall commands.
    6022               eval cmds=\"$old_postuninstall_cmds\"
     6078              cmds=$old_postuninstall_cmds
    60236079              save_ifs="$IFS"; IFS='~'
    60246080              for cmd in $cmds; do
    60256081                IFS="$save_ifs"
     6082                eval cmd=\"$cmd\"
    60266083                $show "$cmd"
    60276084                $run eval "$cmd"
     
    60626119          noexename=$name
    60636120          case $file in
    6064           *.exe) 
     6121          *.exe)
    60656122            file=`$echo $file|${SED} 's,.exe$,,'`
    60666123            noexename=`$echo $name|${SED} 's,.exe$,,'`
     
    61076164    $echo "$modename: you must specify a MODE" 1>&2
    61086165    $echo "$generic_help" 1>&2
    6109     exit 1
     6166    exit $EXIT_FAILURE
    61106167    ;;
    61116168  esac
     
    61146171    $echo "$modename: invalid operation mode \`$mode'" 1>&2
    61156172    $echo "$generic_help" 1>&2
    6116     exit 1
     6173    exit $EXIT_FAILURE
    61176174  fi
    61186175fi # test -z "$show_help"
     
    61206177if test -n "$exec_cmd"; then
    61216178  eval exec $exec_cmd
    6122   exit 1
     6179  exit $EXIT_FAILURE
    61236180fi
    61246181
     
    61566213
    61576214Report bugs to <bug-libtool@gnu.org>."
    6158   exit 0
     6215  exit $EXIT_SUCCESS
    61596216  ;;
    61606217
     
    62686325  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
    62696326  -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
    62706329  -release RELEASE  specify package release information
    62716330  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
     
    63096368  $echo "$modename: invalid operation mode \`$mode'" 1>&2
    63106369  $echo "$help" 1>&2
    6311   exit 1
     6370  exit $EXIT_FAILURE
    63126371  ;;
    63136372esac
     
    63166375$echo "Try \`$modename --help' for more information about other modes."
    63176376
    6318 exit 0
     6377exit $EXIT_SUCCESS
    63196378
    63206379# The TAGs below are defined such that we never get into a situation
  • trunk/psLib/src/Makefile.am

    r3122 r3123  
    1 # not a GNU package. You can remove this line, if
    2 # have all needed files, that a GNU package needs
    3 AUTOMAKE_OPTIONS = foreign 1.4
    4 
    51SUBDIRS = astronomy collections dataManip fileUtils image sysUtils
    62
     
    2521
    2622libpslib_la_SOURCES = psTest.c
     23libpslib_la_LDFLAGS = -version-info $(PSLIB_LT_VERSION)
    2724
    2825EXTRA_DIST = parseErrorCodes.pl mainpage.dox Doxyfile psErrorCodes.dat psTest.h
  • trunk/psLib/swig/Makefile.am

    r3122 r3123  
    1 # not a GNU package. You can remove this line, if
    2 # have all needed files, that a GNU package needs
    3 AUTOMAKE_OPTIONS = foreign 1.4
    41
    5 EXTRA_DIST = PsLib.i PsLibModule/Makefile.PL
     2EXTRA_DIST = pslib.i psLibModule/Makefile.PL
    63
    7 CLEANFILES = PsLibModule/PsLib_wrap.c PsLibModule/PsLib.pm \
    8 PsLibModule/Makefile PsLibModule/pm_to_blib PsLibModule/PsLib.bs \
    9 PsLibModule/PsLib_wrap.o PsLibModule/setup.txt
     4CLEANFILES = psLibModule/pslib_wrap.c psLibModule/pslib.pm \
     5psLibModule/Makefile psLibModule/pm_to_blib psLibModule/pslib.bs \
     6psLibModule/pslib_wrap.o psLibModule/setup.txt
    107
    118SRCDIR = $(shell cd $(top_srcdir)/src && pwd)
     
    1815## PsLibModule swig build section. 
    1916
    20 PsLibModule/setup.txt:Makefile
    21         echo "includes=$(INCLUDES)" > PsLibModule/setup.txt
    22         echo "ldflags=$(libdir)/libpslib" >> PsLibModule/setup.txt
    23         echo "cflags=-Wno-unused -Wno-strict-aliasing" >> PsLibModule/setup.txt
     17psLibModule/setup.txt:Makefile
     18        echo "includes=$(INCLUDES)" > psLibModule/setup.txt
     19        echo "ldflags=$(PSLIB_LIBS)" >> psLibModule/setup.txt
     20        echo "cflags=$(PSLIB_CFLAGS) -Wno-unused -Wno-strict-aliasing" >> psLibModule/setup.txt
    2421
    25 PsLibModule/PsLib_wrap.c: PsLib.i
     22psLibModule/pslib_wrap.c: pslib.i
    2623        $(SWIG) -perl $(INCLUDES) -w451 -o $@ $?
    2724
    28 PsLibModule/Makefile:PsLibModule/Makefile.PL PsLibModule/setup.txt
    29         cd PsLibModule && $(PERL) Makefile.PL
     25psLibModule/Makefile:psLibModule/Makefile.PL psLibModule/setup.txt
     26        cd psLibModule && $(PERL) Makefile.PL PREFIX=$(PERL_PREFIX)
    3027
    31 all: PsLibModule/PsLib_wrap.c
     28all:psLibModule/pslib_wrap.c psLibModule/Makefile
     29        cd psLibModule && make
    3230
    33 swig:PsLibModule/PsLib_wrap.c PsLibModule/Makefile
    34         cd PsLibModule && make
     31install-exec-hook: all
     32        cd psLibModule && make install
    3533
    36 swig-install: swig
    37         cd PsLibModule && make install
    38 
    39 uninstall-local: PsLibModule/Makefile
     34uninstall-local: psLibModule/Makefile
    4035        cd PsLibModule && make clean
Note: See TracChangeset for help on using the changeset viewer.