Changeset 3123
- Timestamp:
- Feb 3, 2005, 1:23:42 PM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 7 edited
-
Makefile.am (modified) (1 diff)
-
config.guess (modified) (39 diffs)
-
config.sub (modified) (38 diffs)
-
configure.in (modified) (4 diffs)
-
ltmain.sh (modified) (192 diffs)
-
src/Makefile.am (modified) (2 diffs)
-
swig/Makefile.am (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/Makefile.am
r3120 r3123 1 # not a GNU package. You can remove this line, if2 # have all needed files, that a GNU package needs3 AUTOMAKE_OPTIONS = foreign 1.44 5 1 SUBDIRS = src test swig 6 2 -
trunk/psLib/config.guess
r3118 r3123 2 2 # Attempt to guess a canonical system name. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002 Free Software Foundation, Inc.5 6 timestamp='200 2-10-21'4 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 5 6 timestamp='2004-08-11' 7 7 8 8 # This file is free software; you can redistribute it and/or modify it … … 54 54 55 55 Originally written by Per Bothner. 56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 57 57 Free Software Foundation, Inc. 58 58 … … 99 99 # use `HOST_CC' if defined, but it is deprecated. 100 100 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 103 set_cc_for_build=' 104 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 105 trap "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 ; } ; 111 dummy=$tmp/dummy ; 112 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 109 113 case $CC_FOR_BUILD,$HOST_CC,$CC in 110 114 ,,) echo "int x;" > $dummy.c ; … … 114 118 fi ; 115 119 done ; 116 rm -f $files ;117 120 if test x"$CC_FOR_BUILD" = x ; then 118 121 CC_FOR_BUILD=no_compiler_found ; … … 121 124 ,,*) CC_FOR_BUILD=$CC ;; 122 125 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 123 esac ; 124 unset files' 126 esac ;' 125 127 126 128 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. … … 134 136 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 135 137 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 138 139 case "${UNAME_MACHINE}" in 140 i?86) 141 test -z "$VENDOR" && VENDOR=pc 142 ;; 143 *) 144 test -z "$VENDOR" && VENDOR=unknown 145 ;; 146 esac 147 test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse 136 148 137 149 # Note: order is significant - the case branches are not exclusive. … … 179 191 esac 180 192 # 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 182 205 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 183 206 # contains redundant information, the shorter form: … … 185 208 echo "${machine}-${os}${release}" 186 209 exit 0 ;; 210 amd64:OpenBSD:*:*) 211 echo x86_64-unknown-openbsd${UNAME_RELEASE} 212 exit 0 ;; 187 213 amiga:OpenBSD:*:*) 188 214 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 191 217 echo mipsel-unknown-openbsd${UNAME_RELEASE} 192 218 exit 0 ;; 219 cats:OpenBSD:*:*) 220 echo arm-unknown-openbsd${UNAME_RELEASE} 221 exit 0 ;; 193 222 hp300:OpenBSD:*:*) 194 223 echo m68k-unknown-openbsd${UNAME_RELEASE} 195 224 exit 0 ;; 225 luna88k:OpenBSD:*:*) 226 echo m88k-unknown-openbsd${UNAME_RELEASE} 227 exit 0 ;; 196 228 mac68k:OpenBSD:*:*) 197 229 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 224 256 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 225 257 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 ;; 226 267 alpha:OSF1:*:*) 227 if test $UNAME_RELEASE = "V4.0"; then 268 case $UNAME_RELEASE in 269 *4.0) 228 270 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. 230 314 # A Vn.n version is a released version. 231 315 # A Tn.n version is a released field test version. 232 316 # A Xn.n version is an unreleased experimental baselevel. 233 317 # 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'` 291 319 exit 0 ;; 292 320 Alpha\ *:Windows_NT*:*) … … 310 338 *:OS/390:*:*) 311 339 echo i370-ibm-openedition 340 exit 0 ;; 341 *:OS400:*:*) 342 echo powerpc-ibm-os400 312 343 exit 0 ;; 313 344 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) … … 328 359 echo pyramid-pyramid-svr4 329 360 exit 0 ;; 361 DRS?6000:unix:4.0:6*) 362 echo sparc-icl-nx6 363 exit 0 ;; 330 364 DRS?6000:UNIX_SV:4.2*:7*) 331 365 case `/usr/bin/uname -p` in … … 400 434 echo m68k-unknown-mint${UNAME_RELEASE} 401 435 exit 0 ;; 436 m68k:machten:*:*) 437 echo m68k-apple-machten${UNAME_RELEASE} 438 exit 0 ;; 402 439 powerpc:machten:*:*) 403 440 echo powerpc-apple-machten${UNAME_RELEASE} … … 440 477 $CC_FOR_BUILD -o $dummy $dummy.c \ 441 478 && $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 444 480 echo mips-mips-riscos${UNAME_RELEASE} 445 481 exit 0 ;; … … 450 486 echo powerpc-harris-powermax 451 487 exit 0 ;; 452 Night_Hawk:*:*:PowerMAX_OS )488 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 453 489 echo powerpc-harris-powermax 454 490 exit 0 ;; … … 525 561 } 526 562 EOF 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 529 564 echo rs6000-ibm-aix3.2.5 530 565 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then … … 625 660 EOF 626 661 (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 629 663 fi ;; 630 664 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 631 676 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 632 677 exit 0 ;; … … 662 707 } 663 708 EOF 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 666 710 echo unknown-hitachi-hiuxwe2 667 711 exit 0 ;; … … 721 765 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 722 766 exit 0 ;; 723 CRAY*T3D:*:*:*)724 echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'725 exit 0 ;;726 767 CRAY*T3E:*:*:*) 727 768 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' … … 729 770 CRAY*SV1:*:*:*) 730 771 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/' 731 775 exit 0 ;; 732 776 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) … … 736 780 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 737 781 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 ;; 738 787 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 739 788 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} … … 746 795 exit 0 ;; 747 796 *: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/[-(].*//'` 761 798 exit 0 ;; 762 799 i*:CYGWIN*:*) … … 769 806 echo ${UNAME_MACHINE}-pc-pw32 770 807 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 773 813 exit 0 ;; 774 814 i*:Windows_NT*:* | Pentium*:Windows_NT*:*) … … 776 816 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 777 817 # UNAME_MACHINE based on the output of uname instead of i386? 778 echo i 386-pc-interix818 echo i586-pc-interix 779 819 exit 0 ;; 780 820 i*:UWIN*:*) … … 788 828 exit 0 ;; 789 829 *:GNU:*:*) 830 # the GNU system 790 831 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 791 836 exit 0 ;; 792 837 i*86:Minix:*:*) … … 794 839 exit 0 ;; 795 840 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 797 845 exit 0 ;; 798 846 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 800 851 exit 0 ;; 801 852 m68*:Linux:*:*) 802 echo ${UNAME_MACHINE}- unknown-linux-gnu853 echo ${UNAME_MACHINE}-${VENDOR}-linux 803 854 exit 0 ;; 804 855 mips:Linux:*:*) … … 819 870 EOF 820 871 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 889 EOF 890 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 891 test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 823 892 ;; 824 893 ppc:Linux:*:*) 825 echo powerpc- unknown-linux-gnu894 echo powerpc-${VENDOR}-linux 826 895 exit 0 ;; 827 896 ppc64:Linux:*:*) 828 echo powerpc64- unknown-linux-gnu897 echo powerpc64-${VENDOR}-linux 829 898 exit 0 ;; 830 899 alpha:Linux:*:*) … … 839 908 esac 840 909 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 841 if test "$?" = 0 ; then LIBC=" libc1" ; else LIBC="" ; fi842 echo ${UNAME_MACHINE}- unknown-linux-gnu${LIBC}910 if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi 911 echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} 843 912 exit 0 ;; 844 913 parisc:Linux:*:* | hppa:Linux:*:*) 845 914 # Look for CPU level 846 915 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 ;; 850 919 esac 851 920 exit 0 ;; 852 921 parisc64:Linux:*:* | hppa64:Linux:*:*) 853 echo hppa64- unknown-linux-gnu922 echo hppa64-${VENDOR}-linux 854 923 exit 0 ;; 855 924 s390:Linux:*:* | s390x:Linux:*:*) 856 925 echo ${UNAME_MACHINE}-ibm-linux 857 926 exit 0 ;; 927 sh64*:Linux:*:*) 928 echo ${UNAME_MACHINE}-${VENDOR}-linux 929 exit 0 ;; 858 930 sh*:Linux:*:*) 859 echo ${UNAME_MACHINE}- unknown-linux-gnu931 echo ${UNAME_MACHINE}-${VENDOR}-linux 860 932 exit 0 ;; 861 933 sparc:Linux:*:* | sparc64:Linux:*:*) 862 echo ${UNAME_MACHINE}- unknown-linux-gnu934 echo ${UNAME_MACHINE}-${VENDOR}-linux 863 935 exit 0 ;; 864 936 x86_64:Linux:*:*) 865 echo x86_64- unknown-linux-gnu937 echo x86_64-${VENDOR}-linux 866 938 exit 0 ;; 867 939 i*86:Linux:*:*) … … 878 950 case "$ld_supported_targets" in 879 951 elf32-i386) 880 TENTATIVE="${UNAME_MACHINE}- pc-linux-gnu"952 TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" 881 953 ;; 882 954 a.out-i386-linux) 883 echo "${UNAME_MACHINE}- pc-linux-gnuaout"955 echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" 884 956 exit 0 ;; 885 957 coff-i386) 886 echo "${UNAME_MACHINE}- pc-linux-gnucoff"958 echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" 887 959 exit 0 ;; 888 960 "") 889 # Either a pre-BFD a.out linker (linux -gnuoldld) or961 # Either a pre-BFD a.out linker (linuxoldld) or 890 962 # one that does not give us useful --help. 891 echo "${UNAME_MACHINE}- pc-linux-gnuoldld"963 echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" 892 964 exit 0 ;; 893 965 esac … … 913 985 #endif 914 986 #endif 987 #ifdef __dietlibc__ 988 LIBC=dietlibc 989 #endif 915 990 EOF 916 991 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 919 993 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 920 994 ;; … … 932 1006 # Use sysv4.2uw... so that sysv4* matches it. 933 1007 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 934 1028 exit 0 ;; 935 1029 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) … … 967 1061 fi 968 1062 exit 0 ;; 969 i*86:*DOS:*:*)970 echo ${UNAME_MACHINE}-pc-msdosdjgpp971 exit 0 ;;972 1063 pc:*:*:*) 973 1064 # Left here for compatibility: … … 996 1087 echo m68k-convergent-sysv 997 1088 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]*:*) 999 1093 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) 1001 1095 OS_REL='' 1002 1096 test -r /etc/.relid \ … … 1015 1109 echo m68k-atari-sysv4 1016 1110 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 ;;1020 1111 TSUNAMI:LynxOS:2.*:*) 1021 1112 echo sparc-unknown-lynxos${UNAME_RELEASE} … … 1099 1190 exit 0 ;; 1100 1191 *: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} 1102 1198 exit 0 ;; 1103 1199 *:procnto*:*:* | *:QNX:[0123456789]*:*) … … 1112 1208 echo i386-pc-qnx 1113 1209 exit 0 ;; 1114 NSR- [DGKLNPTVW]:NONSTOP_KERNEL:*:*)1210 NSR-?:NONSTOP_KERNEL:*:*) 1115 1211 echo nsr-tandem-nsk${UNAME_RELEASE} 1116 1212 exit 0 ;; … … 1135 1231 echo ${UNAME_MACHINE}-unknown-plan9 1136 1232 exit 0 ;; 1137 i*86:OS/2:*:*)1138 # If we were able to find `uname', then EMX Unix compatibility1139 # is probably installed.1140 echo ${UNAME_MACHINE}-pc-os2-emx1141 exit 0 ;;1142 1233 *:TOPS-10:*:*) 1143 1234 echo pdp10-unknown-tops10 … … 1158 1249 echo pdp10-unknown-its 1159 1250 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 1166 1264 esac 1167 1265 … … 1284 1382 EOF 1285 1383 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 1288 1385 1289 1386 # Apollos put the system type in the environment. -
trunk/psLib/config.sub
r3118 r3123 2 2 # Configuration validation subroutine script. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002 Free Software Foundation, Inc.5 6 timestamp='200 2-09-05'4 # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 5 6 timestamp='2004-06-24' 7 7 8 8 # This file is (in principle) common to ALL GNU software. … … 71 71 GNU config.sub ($timestamp) 72 72 73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 74 74 Free Software Foundation, Inc. 75 75 … … 119 119 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 120 120 case $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*) 122 123 os=-$maybe_os 123 124 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` … … 145 146 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 146 147 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 147 -apple | -axis )148 -apple | -axis | -knuth | -cray) 148 149 os= 149 150 basic_machine=$1 … … 229 230 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 230 231 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 232 | am33_2.0 \ 231 233 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 232 | c lipper \234 | c4x | clipper \ 233 235 | d10v | d30v | dlx | dsp16xx \ 234 236 | fr30 | frv \ 235 237 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 236 238 | i370 | i860 | i960 | ia64 \ 237 | ip2k \238 | m32r | m 68000 | m68k | m88k | mcore \239 | ip2k | iq2000 \ 240 | m32r | m32rle | m68000 | m68k | m88k | mcore \ 239 241 | mips | mipsbe | mipseb | mipsel | mipsle \ 240 242 | mips16 \ … … 246 248 | mips64vr5000 | mips64vr5000el \ 247 249 | mipsisa32 | mipsisa32el \ 250 | mipsisa32r2 | mipsisa32r2el \ 248 251 | mipsisa64 | mipsisa64el \ 252 | mipsisa64r2 | mipsisa64r2el \ 249 253 | mipsisa64sb1 | mipsisa64sb1el \ 250 254 | mipsisa64sr71k | mipsisa64sr71kel \ 251 255 | mipstx39 | mipstx39el \ 252 256 | mn10200 | mn10300 \ 257 | msp430 \ 253 258 | ns16k | ns32k \ 254 259 | openrisc | or32 \ … … 256 261 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 257 262 | pyramid \ 258 | sh | sh[1234] | sh 3e | 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 \ 259 264 | sh64 | sh64le \ 260 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv 9 | sparcv9b \265 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ 261 266 | strongarm \ 262 | tahoe | thumb | tic 80 | tron \267 | tahoe | thumb | tic4x | tic80 | tron \ 263 268 | v850 | v850e \ 264 269 | we32k \ … … 295 300 | avr-* \ 296 301 | bs2000-* \ 297 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \298 | clipper-* | c ydra-* \302 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 303 | clipper-* | craynv-* | cydra-* \ 299 304 | d10v-* | d30v-* | dlx-* \ 300 305 | elxsi-* \ … … 303 308 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 304 309 | i*86-* | i860-* | i960-* | ia64-* \ 305 | ip2k-* \306 | m32r-* \310 | ip2k-* | iq2000-* \ 311 | m32r-* | m32rle-* \ 307 312 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 308 313 | m88110-* | m88k-* | mcore-* \ … … 316 321 | mips64vr5000-* | mips64vr5000el-* \ 317 322 | mipsisa32-* | mipsisa32el-* \ 323 | mipsisa32r2-* | mipsisa32r2el-* \ 318 324 | mipsisa64-* | mipsisa64el-* \ 325 | mipsisa64r2-* | mipsisa64r2el-* \ 319 326 | mipsisa64sb1-* | mipsisa64sb1el-* \ 320 327 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 321 | mipstx39 | mipstx39el \ 328 | mipstx39-* | mipstx39el-* \ 329 | mmix-* \ 330 | msp430-* \ 322 331 | none-* | np1-* | ns16k-* | ns32k-* \ 323 332 | orion-* \ … … 326 335 | pyramid-* \ 327 336 | romp-* | rs6000-* \ 328 | sh-* | sh[1234]-* | sh 3e-* | sh[34]eb-* | shbe-* \337 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 329 338 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 330 339 | 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-* \ 333 344 | v850-* | v850e-* | vax-* \ 334 345 | we32k-* \ … … 354 365 os=-udi 355 366 ;; 367 abacus) 368 basic_machine=abacus-unknown 369 ;; 356 370 adobe68k) 357 371 basic_machine=m68010-adobe … … 368 382 os=-bsd 369 383 ;; 384 amd64) 385 basic_machine=x86_64-pc 386 ;; 387 amd64-*) 388 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 389 ;; 370 390 amdahl) 371 391 basic_machine=580-amdahl … … 427 447 os=-unicos 428 448 ;; 449 craynv) 450 basic_machine=craynv-cray 451 os=-unicosmp 452 ;; 453 cr16c) 454 basic_machine=cr16c-unknown 455 os=-elf 456 ;; 429 457 crds | unos) 430 458 basic_machine=m68k-crds … … 432 460 cris | cris-* | etrax*) 433 461 basic_machine=cris-axis 462 ;; 463 crx) 464 basic_machine=crx-unknown 465 os=-elf 434 466 ;; 435 467 da30 | da30-*) … … 632 664 mips3*) 633 665 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 634 ;;635 mmix*)636 basic_machine=mmix-knuth637 os=-mmixware638 666 ;; 639 667 monitor) … … 728 756 os=-coff 729 757 ;; 758 os400) 759 basic_machine=powerpc-ibm 760 os=-os400 761 ;; 730 762 OSE68000 | ose68000) 731 763 basic_machine=m68000-ericsson … … 759 791 basic_machine=i686-pc 760 792 ;; 761 pentiumii | pentium2 )793 pentiumii | pentium2 | pentiumiii | pentium3) 762 794 basic_machine=i686-pc 795 ;; 796 pentium4) 797 basic_machine=i786-pc 763 798 ;; 764 799 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) … … 768 803 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 769 804 ;; 770 pentiumii-* | pentium2-* )805 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 771 806 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 807 ;; 808 pentium4-*) 809 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 772 810 ;; 773 811 pn) … … 829 867 basic_machine=mipsisa64sb1el-unknown 830 868 ;; 869 sei) 870 basic_machine=mips-sei 871 os=-seiux 872 ;; 831 873 sequent) 832 874 basic_machine=i386-sequent … … 836 878 os=-hms 837 879 ;; 880 sh64) 881 basic_machine=sh64-unknown 882 ;; 838 883 sparclite-wrs | simso-wrs) 839 884 basic_machine=sparclite-wrs … … 902 947 os=-dynix 903 948 ;; 904 t3d)905 basic_machine=alpha-cray906 os=-unicos907 ;;908 949 t3e) 909 950 basic_machine=alphaev5-cray … … 914 955 os=-unicos 915 956 ;; 916 tic4x | c4x*)917 basic_machine=tic4x-unknown918 os=-coff919 ;;920 957 tic54x | c54x*) 921 958 basic_machine=tic54x-unknown 922 959 os=-coff 923 960 ;; 961 tic55x | c55x*) 962 basic_machine=tic55x-unknown 963 os=-coff 964 ;; 965 tic6x | c6x*) 966 basic_machine=tic6x-unknown 967 os=-coff 968 ;; 924 969 tx39) 925 970 basic_machine=mipstx39-unknown … … 935 980 basic_machine=m68k-ncr 936 981 ;; 982 tpf) 983 basic_machine=s390x-ibm 984 os=-tpf 985 ;; 937 986 udi29k) 938 987 basic_machine=a29k-amd … … 977 1026 basic_machine=hppa1.1-winbond 978 1027 os=-proelf 979 ;;980 windows32)981 basic_machine=i386-pc982 os=-windows32-msvcrt983 1028 ;; 984 1029 xps | xps100) … … 1012 1057 basic_machine=romp-ibm 1013 1058 ;; 1059 mmix) 1060 basic_machine=mmix-knuth 1061 ;; 1014 1062 rs6000) 1015 1063 basic_machine=rs6000-ibm … … 1028 1076 basic_machine=we32k-att 1029 1077 ;; 1030 sh3 | sh4 | sh 3eb | sh4eb | sh[1234]le | sh3ele)1078 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 1031 1079 basic_machine=sh-unknown 1032 1080 ;; … … 1034 1082 basic_machine=sh64-unknown 1035 1083 ;; 1036 sparc | sparcv 9 | sparcv9b)1084 sparc | sparcv8 | sparcv9 | sparcv9b) 1037 1085 basic_machine=sparc-sun 1038 1086 ;; … … 1107 1155 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1108 1156 | -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* \ 1111 1160 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1112 1161 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1113 1162 | -chorusos* | -chorusrdb* \ 1114 1163 | -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* \ 1117 1166 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1118 1167 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ 1119 1168 | -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*) 1121 1171 # Remember, each alternative MUST END IN *, to match a version number. 1122 1172 ;; … … 1130 1180 esac 1131 1181 ;; 1182 -nto-qnx*) 1183 ;; 1132 1184 -nto*) 1133 os= -nto-qnx1185 os=`echo $os | sed -e 's|nto|nto-qnx|'` 1134 1186 ;; 1135 1187 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ … … 1140 1192 os=`echo $os | sed -e 's|mac|macos|'` 1141 1193 ;; 1142 -linux *)1143 os= `echo $os | sed -e 's|linux|linux-gnu|'`1194 -linux-dietlibc) 1195 os=-linux-dietlibc 1144 1196 ;; 1145 1197 -sunos5*) … … 1152 1204 os=-openedition 1153 1205 ;; 1206 -os400*) 1207 os=-os400 1208 ;; 1154 1209 -wince*) 1155 1210 os=-wince … … 1172 1227 -atheos*) 1173 1228 os=-atheos 1229 ;; 1230 -syllable*) 1231 os=-syllable 1174 1232 ;; 1175 1233 -386bsd) … … 1195 1253 os=-sysv4 1196 1254 ;; 1255 -tpf*) 1256 os=-tpf 1257 ;; 1197 1258 -triton*) 1198 1259 os=-sysv3 … … 1224 1285 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1225 1286 os=-mint 1287 ;; 1288 -aros*) 1289 os=-aros 1290 ;; 1291 -kaos*) 1292 os=-kaos 1226 1293 ;; 1227 1294 -none) … … 1256 1323 os=-aout 1257 1324 ;; 1325 c4x-* | tic4x-*) 1326 os=-coff 1327 ;; 1258 1328 # This must come before the *-dec entry. 1259 1329 pdp10-*) … … 1301 1371 *-ibm) 1302 1372 os=-aix 1373 ;; 1374 *-knuth) 1375 os=-mmixware 1303 1376 ;; 1304 1377 *-wec) … … 1434 1507 vendor=ibm 1435 1508 ;; 1509 -os400*) 1510 vendor=ibm 1511 ;; 1436 1512 -ptx*) 1437 1513 vendor=sequent 1514 ;; 1515 -tpf*) 1516 vendor=ibm 1438 1517 ;; 1439 1518 -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 1 AC_INIT([pslib],[1.5]) 5 2 AM_CONFIG_HEADER(src/config.h) 6 3 AM_INIT_AUTOMAKE(pslib, 1.5) 7 4 8 AC_LANG_C 5 PSLIB_LT_VERSION="0:0:0" 6 AC_SUBST(PSLIB_LT_VERSION,$PSLIB_LT_VERSION) 7 8 AC_DISABLE_STATIC 9 AC_PROG_MAKE_SET 10 11 AC_LANG(C) 9 12 AC_PROG_CC 10 13 AC_PROG_INSTALL … … 14 17 test "$prefix" = NONE && prefix=`pwd` 15 18 16 CFLAGS="${CFLAGS=} -g2 -Wall -std=c99 -D_GNU_SOURCE" 19 dnl Setup CFLAGS/FFLAGS/LDFLAGS with project-particulars 20 CFLAGS="${CFLAGS=} -Wall -std=c99 -D_GNU_SOURCE" 17 21 FFLAGS="-fno-second-underscore -O -fno-f2c" 22 LDFLAGS=-release 5 23 24 dnl Setup the info for psLib for pkg-config 25 PSLIB_CFLAGS="-I${includedir=}" 26 PSLIB_LIBS="-L$libdir -lpslib" 18 27 19 28 dnl ----------------- CFITSIO options -------------------- … … 89 98 AC_SUBST(PERL,$PERL) 90 99 100 dnl ---------------- PERLPREFIX option ------------------- 101 AC_ARG_WITH(perlprefix, 102 [AS_HELP_STRING([--with-perlprefix=DIR],[Specify prefix of Perl Module's installation.])], 103 [PERL_PREFIX="$withval"], 104 [PERL_PREFIX=""]) 105 AC_SUBST(PERL_PREFIX,$PERL_PREFIX) 106 91 107 dnl ---------------- config dir options ------------------ 92 108 AC_ARG_WITH(configdir, … … 110 126 111 127 dnl ---------------- export variables -------------------- 112 PSLIB_CFLAGS="-I${includedir=}" 113 AC_SUBST(PSLIB_LIBS,[ "-L$libdir -lpslib $PSLIB_LIBS"])128 129 AC_SUBST(PSLIB_LIBS,[$PSLIB_LIBS]) 114 130 AC_SUBST(PSLIB_CFLAGS,[$PSLIB_CFLAGS]) 115 131 AC_SUBST(CONFIG_FILE,[$CONFIG_FILE]) -
trunk/psLib/ltmain.sh
r3118 r3123 2 2 # NOTE: Changing this file will not affect anything until you rerun configure. 3 3 # 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 5 5 # Free Software Foundation, Inc. 6 6 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 … … 25 25 # the same distribution terms that you use for the rest of that program. 26 26 27 basename="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. 34 progpath="$0" 35 36 # The name of this program: 37 progname=`echo "$progpath" | $SED $basename` 38 modename="$progname" 39 40 # Global variables: 41 EXIT_SUCCESS=0 42 EXIT_FAILURE=1 43 44 PROGRAM=ltmain.sh 45 PACKAGE=libtool 46 VERSION=1.5.8 47 TIMESTAMP=" (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. 51 if test -n "${ZSH_VERSION+set}" ; then 52 setopt NO_GLOB_SUBST 53 fi 54 27 55 # Check that we have a working $echo. 28 56 if test "X$1" = X--no-reexec; then … … 37 65 else 38 66 # 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+"$@"} 40 68 fi 41 69 … … 46 74 $* 47 75 EOF 48 exit 076 exit $EXIT_SUCCESS 49 77 fi 50 51 # The name of this program.52 progname=`$echo "$0" | ${SED} 's%^.*/%%'`53 modename="$progname"54 55 # Constants.56 PROGRAM=ltmain.sh57 PACKAGE=libtool58 VERSION=1.5a59 TIMESTAMP=" (1.1240 2003/06/26 06:55:19)"60 78 61 79 default_mode= … … 95 113 96 114 # Make sure IFS has a sensible default 97 : ${IFS=" "} 115 : ${IFS=" 116 "} 98 117 99 118 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 100 119 $echo "$modename: not configured to build any kind of library" 1>&2 101 120 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 102 exit 1121 exit $EXIT_FAILURE 103 122 fi 104 123 … … 119 138 # This seems to be the best place for them 120 139 140 # func_win32_libid arg 141 # return the library type of file 'arg' 142 # 121 143 # Need a lot of goo to handle *both* DLLs and import libs 122 144 # Has to be a shell function in order to 'eat' the argument 123 145 # that is supplied when $file_magic_command is called. 124 win32_libid () {146 func_win32_libid () { 125 147 win32_libid_type="unknown" 126 148 win32_fileres=`file -L $1 2>/dev/null` … … 131 153 *ar\ archive*) # could be an import, or static 132 154 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 133 grep -E'file format pe-i386(.*architecture: i386)?' >/dev/null ; then155 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 134 156 win32_nmres=`eval $NM -f posix -A $1 | \ 135 157 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` … … 141 163 fi 142 164 ;; 143 *DLL*) 165 *DLL*) 144 166 win32_libid_type="x86 DLL" 145 167 ;; … … 155 177 } 156 178 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 ...' 186 func_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 ... 246 func_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 } 157 359 # End of Shell function definitions 158 360 ##################################### 361 362 # Darwin sucks 363 eval std_shrext=\"$shrext_cmds\" 159 364 160 365 # Parse our command line options once, thoroughly. … … 177 382 tag) 178 383 tagname="$arg" 384 preserve_args="${preserve_args}=$arg" 179 385 180 386 # Check whether tagname contains only valid characters … … 182 388 *[!-_A-Za-z0-9,/]*) 183 389 $echo "$progname: invalid tag name: $tagname" 1>&2 184 exit 1390 exit $EXIT_FAILURE 185 391 ;; 186 392 esac … … 192 398 ;; 193 399 *) 194 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ 0" > /dev/null; then400 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then 195 401 taglist="$taglist $tagname" 196 402 # 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`" 198 404 else 199 405 $echo "$progname: ignoring unknown tag $tagname" 1>&2 … … 224 430 $echo "This is free software; see the source for copying conditions. There is NO" 225 431 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 226 exit 0432 exit $EXIT_SUCCESS 227 433 ;; 228 434 229 435 --config) 230 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $ 0436 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 231 437 # Now print the configurations for the tags. 232 438 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" 234 440 done 235 exit 0441 exit $EXIT_SUCCESS 236 442 ;; 237 443 … … 239 445 $echo "$progname: enabling shell trace mode" 240 446 set -x 447 preserve_args="$preserve_args $arg" 241 448 ;; 242 449 … … 257 464 $echo "disable static libraries" 258 465 fi 259 exit 0466 exit $EXIT_SUCCESS 260 467 ;; 261 468 … … 269 476 --quiet | --silent) 270 477 show=: 478 preserve_args="$preserve_args $arg" 271 479 ;; 272 480 … … 276 484 shift 277 485 prev=tag 486 preserve_args="$preserve_args --tag" 278 487 ;; 279 488 … … 286 495 $echo "$modename: unrecognized option \`$arg'" 1>&2 287 496 $echo "$help" 1>&2 288 exit 1497 exit $EXIT_FAILURE 289 498 ;; 290 499 … … 299 508 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 300 509 $echo "$help" 1>&2 301 exit 1510 exit $EXIT_FAILURE 302 511 fi 303 512 … … 355 564 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 356 565 $echo "$help" 1>&2 357 exit 1566 exit $EXIT_FAILURE 358 567 fi 359 568 … … 370 579 base_compile= 371 580 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 581 suppress_opt=yes 372 582 suppress_output= 373 583 arg_mode=normal 374 584 libobj= 585 later= 375 586 376 587 for arg … … 395 606 if test -n "$libobj" ; then 396 607 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 397 exit 1608 exit $EXIT_FAILURE 398 609 fi 399 610 arg_mode=target … … 401 612 ;; 402 613 403 -static )404 build_old_libs=yes614 -static | -prefer-pic | -prefer-non-pic) 615 later="$later $arg" 405 616 continue 406 617 ;; 407 618 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 415 621 continue 416 622 ;; … … 425 631 lastarg= 426 632 save_ifs="$IFS"; IFS=',' 427 for arg in $args; do633 for arg in $args; do 428 634 IFS="$save_ifs" 429 635 … … 475 681 arg) 476 682 $echo "$modename: you must specify an argument for -Xcompile" 477 exit 1683 exit $EXIT_FAILURE 478 684 ;; 479 685 target) 480 686 $echo "$modename: you must specify a target with \`-o'" 1>&2 481 exit 1687 exit $EXIT_FAILURE 482 688 ;; 483 689 *) … … 512 718 *) 513 719 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 514 exit 1720 exit $EXIT_FAILURE 515 721 ;; 516 722 esac 517 723 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 555 741 ;; 556 742 esac 557 fi743 done 558 744 559 745 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` … … 569 755 $echo "$modename: you must specify a compilation command" 1>&2 570 756 $echo "$help" 1>&2 571 exit 1757 exit $EXIT_FAILURE 572 758 fi 573 759 … … 580 766 581 767 $run $rm $removelist 582 trap "$run $rm $removelist; exit 1" 1 2 15768 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 583 769 584 770 # On Cygwin there's no "real" PIC flag so we must build both object types … … 599 785 lockfile="$output_obj.lock" 600 786 removelist="$removelist $output_obj $lockfile" 601 trap "$run $rm $removelist; exit 1" 1 2 15787 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 602 788 else 603 789 output_obj= … … 609 795 # We use this script file to make the link, it avoids creating a new file 610 796 if test "$need_locks" = yes; then 611 until $run ln "$ 0" "$lockfile" 2>/dev/null; do797 until $run ln "$progpath" "$lockfile" 2>/dev/null; do 612 798 $show "Waiting for $lockfile to be removed" 613 799 sleep 2 … … 627 813 628 814 $run $rm $removelist 629 exit 1815 exit $EXIT_FAILURE 630 816 fi 631 817 $echo $srcfile > "$lockfile" … … 682 868 else 683 869 test -n "$output_obj" && $run $rm $removelist 684 exit 1870 exit $EXIT_FAILURE 685 871 fi 686 872 … … 702 888 703 889 $run $rm $removelist 704 exit 1890 exit $EXIT_FAILURE 705 891 fi 706 892 … … 723 909 724 910 # 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 726 914 else 727 915 # No PIC object so indicate it doesn't exist in the libtool … … 752 940 else 753 941 $run $rm $removelist 754 exit 1942 exit $EXIT_FAILURE 755 943 fi 756 944 … … 772 960 773 961 $run $rm $removelist 774 exit 1962 exit $EXIT_FAILURE 775 963 fi 776 964 … … 810 998 fi 811 999 812 exit 01000 exit $EXIT_SUCCESS 813 1001 ;; 814 1002 … … 836 1024 esac 837 1025 libtool_args="$nonopt" 838 base_compile="$nonopt "1026 base_compile="$nonopt $@" 839 1027 compile_command="$nonopt" 840 1028 finalize_command="$nonopt" … … 848 1036 deplibs= 849 1037 old_deplibs= 850 add_flags=851 1038 compiler_flags= 852 1039 linker_flags= … … 869 1056 objs= 870 1057 non_pic_objects= 1058 precious_files_regex= 871 1059 prefer_static_libs=no 872 1060 preload=no … … 882 1070 vinfo_number=no 883 1071 1072 func_infer_tag $base_compile 1073 884 1074 # We need to know -static, to get the right output filenames. 885 1075 for arg … … 913 1103 while test "$#" -gt 0; do 914 1104 arg="$1" 915 base_compile="$base_compile $arg"916 1105 shift 917 1106 case $arg in … … 977 1166 if test ! -f "$arg"; then 978 1167 $echo "$modename: symbol file \`$arg' does not exist" 979 exit 11168 exit $EXIT_FAILURE 980 1169 fi 981 1170 prev= … … 989 1178 inst_prefix) 990 1179 inst_prefix_dir="$arg" 1180 prev= 1181 continue 1182 ;; 1183 precious_regex) 1184 precious_files_regex="$arg" 991 1185 prev= 992 1186 continue … … 1024 1218 test "$non_pic_object" = none; then 1025 1219 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1026 exit 11220 exit $EXIT_FAILURE 1027 1221 fi 1028 1222 … … 1077 1271 if test -z "$run"; then 1078 1272 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1079 exit 11273 exit $EXIT_FAILURE 1080 1274 else 1081 1275 # Dry-run case. … … 1098 1292 else 1099 1293 $echo "$modename: link input file \`$save_arg' does not exist" 1100 exit 11294 exit $EXIT_FAILURE 1101 1295 fi 1102 1296 arg=$save_arg … … 1110 1304 *) 1111 1305 $echo "$modename: only absolute run-paths are allowed" 1>&2 1112 exit 11306 exit $EXIT_FAILURE 1113 1307 ;; 1114 1308 esac … … 1150 1344 continue 1151 1345 ;; 1346 shrext) 1347 shrext_cmds="$arg" 1348 prev= 1349 continue 1350 ;; 1152 1351 *) 1153 1352 eval "$prev=\"\$arg\"" … … 1198 1397 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1199 1398 $echo "$modename: more than one -exported-symbols argument is not allowed" 1200 exit 11399 exit $EXIT_FAILURE 1201 1400 fi 1202 1401 if test "X$arg" = "X-export-symbols"; then … … 1234 1433 if test -z "$absdir"; then 1235 1434 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 1236 exit 11435 exit $EXIT_FAILURE 1237 1436 fi 1238 1437 dir="$absdir" … … 1263 1462 # These systems don't actually have a C or math library (as such) 1264 1463 continue 1265 ;;1266 *-*-freebsd*-gnu*)1267 # prevent being parsed by the freebsd regexp below1268 1464 ;; 1269 1465 *-*-mingw* | *-*-os2*) … … 1282 1478 elif test "X$arg" = "X-lc_r"; then 1283 1479 case $host in 1284 *-*-freebsd*-gnu*) 1285 # prevent being parsed by the freebsd regexp below 1286 ;; 1287 *-*-openbsd*) 1480 *-*-openbsd* | *-*-freebsd*) 1288 1481 # Do not include libc_r directly, use -pthread flag. 1289 1482 continue … … 1291 1484 esac 1292 1485 fi 1486 deplibs="$deplibs $arg" 1487 continue 1488 ;; 1489 1490 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1293 1491 deplibs="$deplibs $arg" 1294 1492 continue … … 1359 1557 -o) prev=output ;; 1360 1558 1559 -precious-files-regex) 1560 prev=precious_regex 1561 continue 1562 ;; 1563 1361 1564 -release) 1362 1565 prev=release … … 1381 1584 *) 1382 1585 $echo "$modename: only absolute run-paths are allowed" 1>&2 1383 exit 11586 exit $EXIT_FAILURE 1384 1587 ;; 1385 1588 esac … … 1477 1680 ;; 1478 1681 esac 1479 add_flags="$add_flags $arg"1480 1682 ;; 1481 1683 … … 1505 1707 test "$non_pic_object" = none; then 1506 1708 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1507 exit 11709 exit $EXIT_FAILURE 1508 1710 fi 1509 1711 … … 1558 1760 if test -z "$run"; then 1559 1761 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1560 exit 11762 exit $EXIT_FAILURE 1561 1763 else 1562 1764 # Dry-run case. … … 1612 1814 ;; 1613 1815 esac 1614 add_flags="$add_flags $arg"1615 1816 ;; 1616 1817 esac # arg … … 1626 1827 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 1627 1828 $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 1670 1830 fi 1671 1831 … … 1711 1871 $echo "$modename: you must specify an output file" 1>&2 1712 1872 $echo "$help" 1>&2 1713 exit 11873 exit $EXIT_FAILURE 1714 1874 ;; 1715 1875 *.$libext) linkmode=oldlib ;; … … 1721 1881 case $host in 1722 1882 *cygwin* | *mingw* | *pw32*) 1723 # don't eliminate dupl cations in $postdeps and $predeps1883 # don't eliminate duplications in $postdeps and $predeps 1724 1884 duplicate_compiler_generated_deps=yes 1725 1885 ;; … … 1774 1934 *) 1775 1935 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 1776 exit 11936 exit $EXIT_FAILURE 1777 1937 ;; 1778 1938 esac … … 1812 1972 found=no 1813 1973 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 ;; 1814 1983 -l*) 1815 1984 if test "$linkmode" != lib && test "$linkmode" != prog; then … … 1817 1986 continue 1818 1987 fi 1819 if test "$pass" = conv && test "$allow_undefined" = yes; then1988 if test "$pass" = conv; then 1820 1989 deplibs="$deplib $deplibs" 1821 1990 continue … … 1823 1992 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 1824 1993 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do 1825 for search_ext in .la $s hrext .so .a; do1994 for search_ext in .la $std_shrext .so .a; do 1826 1995 # Search the libtool library 1827 1996 lib="$searchdir/lib${name}${search_ext}" … … 1899 2068 if test "$pass" = scan; then 1900 2069 deplibs="$deplib $deplibs" 1901 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`1902 2070 else 1903 2071 compile_deplibs="$deplib $compile_deplibs" 1904 2072 finalize_deplibs="$deplib $finalize_deplibs" 1905 2073 fi 2074 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1906 2075 ;; 1907 2076 *) … … 1931 2100 case $linkmode in 1932 2101 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 1934 2118 $echo 1935 2119 $echo "*** Warning: Trying to link with static lib archive $deplib." … … 1982 2166 else 1983 2167 $echo "$modename: cannot find the library \`$lib'" 1>&2 1984 exit 12168 exit $EXIT_FAILURE 1985 2169 fi 1986 2170 … … 1989 2173 else 1990 2174 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 1991 exit 12175 exit $EXIT_FAILURE 1992 2176 fi 1993 2177 … … 2022 2206 # Only check for convenience libraries 2023 2207 deplibs="$lib $deplibs" 2024 tmp_libs=2025 for deplib in $dependency_libs; do2026 #echo "Adding $deplib to \$deplibs"2027 deplibs="$deplib $deplibs"2028 if test "X$duplicate_deps" = "Xyes" ; then2029 case "$tmp_libs " in2030 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;2031 esac2032 fi2033 tmp_libs="$tmp_libs $deplib"2034 done2035 2208 if test -z "$libdir"; then 2036 2209 if test -z "$old_library"; then 2037 2210 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2038 exit 12211 exit $EXIT_FAILURE 2039 2212 fi 2040 2213 # It is a libtool convenience library, so add in its objects. 2041 2214 convenience="$convenience $ladir/$objdir/$old_library" 2042 2215 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 2043 2226 elif test "$linkmode" != prog && test "$linkmode" != lib; then 2044 2227 $echo "$modename: \`$lib' is not a convenience library" 1>&2 2045 exit 12228 exit $EXIT_FAILURE 2046 2229 fi 2047 2230 continue 2048 2231 fi # $pass = conv 2049 2232 2050 2233 2051 2234 # Get the name of the library we link against. 2052 2235 linklib= … … 2056 2239 if test -z "$linklib"; then 2057 2240 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 2058 exit 12241 exit $EXIT_FAILURE 2059 2242 fi 2060 2243 … … 2063 2246 if test -z "$libdir"; then 2064 2247 $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 2068 2253 # If there is no dlname, no dlopen support or we're linking 2069 2254 # statically, we need to preload. We also need to preload any … … 2103 2288 fi 2104 2289 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 2109 2301 fi # $installed = yes 2110 2302 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` … … 2114 2306 if test -z "$libdir"; then 2115 2307 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 2116 exit 12308 exit $EXIT_FAILURE 2117 2309 fi 2118 2310 # Prefer using a static library (so that no silly _DYNAMIC symbols … … 2141 2333 fi 2142 2334 2143 2335 2144 2336 if test "$linkmode" = prog && test "$pass" != link; then 2145 2337 newlib_search_path="$newlib_search_path $ladir" … … 2228 2420 fi 2229 2421 # 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 2233 2426 $echo 2234 2427 if test "$linkmode" = prog; then … … 2237 2430 $echo "*** Warning: Linking the shared library $output against the loadable module" 2238 2431 fi 2239 $echo "*** $linklib is not portable!" 2240 fi 2432 $echo "*** $linklib is not portable!" 2433 fi 2241 2434 if test "$linkmode" = lib && 2242 2435 test "$hardcode_into_libs" = yes; then … … 2296 2489 $show "extracting exported symbol list from \`$soname'" 2297 2490 save_ifs="$IFS"; IFS='~' 2298 eval cmds=\"$extract_expsyms_cmds\"2491 cmds=$extract_expsyms_cmds 2299 2492 for cmd in $cmds; do 2300 2493 IFS="$save_ifs" 2494 eval cmd=\"$cmd\" 2301 2495 $show "$cmd" 2302 2496 $run eval "$cmd" || exit $? … … 2309 2503 $show "generating import library for \`$soname'" 2310 2504 save_ifs="$IFS"; IFS='~' 2311 eval cmds=\"$old_archive_from_expsyms_cmds\"2505 cmds=$old_archive_from_expsyms_cmds 2312 2506 for cmd in $cmds; do 2313 2507 IFS="$save_ifs" 2508 eval cmd=\"$cmd\" 2314 2509 $show "$cmd" 2315 2510 $run eval "$cmd" || exit $? … … 2334 2529 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2335 2530 *-*-darwin* ) 2336 # if the lib is a module then we can not link against it, someone2337 # i s ignoring the new warnings I added2338 if /usr/bin/file -L $add 2> /dev/null | grep"bundle" >/dev/null ; then2531 # 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 2339 2534 $echo "** Warning, lib $linklib is a module, not a shared library" 2340 2535 if test -z "$old_library" ; then … … 2344 2539 else 2345 2540 add="$dir/$old_library" 2346 fi 2541 fi 2347 2542 fi 2348 2543 esac … … 2369 2564 case "$libdir" in 2370 2565 [\\/]*) 2371 add_dir=" -L$inst_prefix_dir$libdir $add_dir"2566 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2372 2567 ;; 2373 2568 esac … … 2386 2581 if test "$lib_linked" != yes; then 2387 2582 $echo "$modename: configuration error: unsupported hardcode properties" 2388 exit 12583 exit $EXIT_FAILURE 2389 2584 fi 2390 2585 … … 2429 2624 add="-l$name" 2430 2625 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 2432 2628 add="$inst_prefix_dir$libdir/$linklib" 2433 2629 else … … 2441 2637 case "$libdir" in 2442 2638 [\\/]*) 2443 add_dir=" -L$inst_prefix_dir$libdir $add_dir"2639 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2444 2640 ;; 2445 2641 esac … … 2508 2704 2509 2705 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 2513 2710 # Extract -R from dependency_libs 2514 2711 temp_deplibs= … … 2524 2721 done 2525 2722 dependency_libs="$temp_deplibs" 2526 #fi2723 fi 2527 2724 2528 2725 newlib_search_path="$newlib_search_path $absdir" … … 2566 2763 if test -z "$libdir"; then 2567 2764 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 2568 exit 12765 exit $EXIT_FAILURE 2569 2766 fi 2570 2767 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 2575 2769 fi 2576 2770 path="$absdir" … … 2579 2773 case $host in 2580 2774 *-*-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 2582 2777 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 2583 2778 if test -n "$deplibrary_names" ; then … … 2587 2782 if test -f "$path/$depdepl" ; then 2588 2783 depdepl="$path/$depdepl" 2589 fi2784 fi 2590 2785 # do not add paths which are already there 2591 2786 case " $newlib_search_path " in … … 2593 2788 *) newlib_search_path="$newlib_search_path $path";; 2594 2789 esac 2595 path=""2596 2790 fi 2791 path="" 2597 2792 ;; 2598 2793 *) 2599 path="-L$path" 2794 path="-L$path" 2795 ;; 2796 esac 2600 2797 ;; 2601 esac 2602 2603 ;; 2604 -l*) 2798 -l*) 2605 2799 case $host in 2606 2800 *-*-darwin*) 2607 # Again, we only want to link against shared libraries2608 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`2609 for tmp in $newlib_search_path ; do2610 if test -f "$tmp/lib$tmp_libs.dylib" ; then2611 eval depdepl="$tmp/lib$tmp_libs.dylib"2612 break2613 fi2614 done2615 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="" 2616 2810 ;; 2617 2811 *) continue ;; 2618 esac 2812 esac 2619 2813 ;; 2620 2814 *) continue ;; … … 2622 2816 case " $deplibs " in 2623 2817 *" $depdepl "*) ;; 2624 *) deplibs="$dep libs $depdepl" ;;2625 esac 2818 *) deplibs="$depdepl $deplibs" ;; 2819 esac 2626 2820 case " $deplibs " in 2627 2821 *" $path "*) ;; … … 2713 2907 done # for var 2714 2908 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) 2716 2911 tmp_libs= 2717 2912 for i in $dependency_libs ; do … … 2773 2968 lib*) 2774 2969 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2775 eval shared_ext=\"$shrext \"2970 eval shared_ext=\"$shrext_cmds\" 2776 2971 eval libname=\"$libname_spec\" 2777 2972 ;; … … 2780 2975 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 2781 2976 $echo "$help" 1>&2 2782 exit 12977 exit $EXIT_FAILURE 2783 2978 fi 2784 2979 if test "$need_lib_prefix" != no; then 2785 2980 # Add the "lib" prefix for modules if required 2786 2981 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2787 eval shared_ext=\"$shrext \"2982 eval shared_ext=\"$shrext_cmds\" 2788 2983 eval libname=\"$libname_spec\" 2789 2984 else … … 2796 2991 if test "$deplibs_check_method" != pass_all; then 2797 2992 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 2798 exit 12993 exit $EXIT_FAILURE 2799 2994 else 2800 2995 $echo … … 2844 3039 $echo "$modename: too many parameters to \`-version-info'" 1>&2 2845 3040 $echo "$help" 1>&2 2846 exit 13041 exit $EXIT_FAILURE 2847 3042 fi 2848 3043 … … 2850 3045 # this retains compatibility with .la files and attempts 2851 3046 # to make the code below a bit more comprehensible 2852 3047 2853 3048 case $vinfo_number in 2854 3049 yes) … … 2894 3089 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2895 3090 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2896 exit 13091 exit $EXIT_FAILURE 2897 3092 ;; 2898 3093 esac … … 2903 3098 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2904 3099 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2905 exit 13100 exit $EXIT_FAILURE 2906 3101 ;; 2907 3102 esac … … 2912 3107 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2913 3108 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2914 exit 13109 exit $EXIT_FAILURE 2915 3110 ;; 2916 3111 esac … … 2919 3114 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 2920 3115 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2921 exit 13116 exit $EXIT_FAILURE 2922 3117 fi 2923 3118 … … 2936 3131 # Darwin ld doesn't like 0 for these options... 2937 3132 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" 2939 3134 ;; 2940 3135 … … 3008 3203 $echo "$modename: unknown library version type \`$version_type'" 1>&2 3009 3204 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 3010 exit 13205 exit $EXIT_FAILURE 3011 3206 ;; 3012 3207 esac … … 3062 3257 ;; 3063 3258 $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 3064 3265 removelist="$removelist $p" 3065 3266 ;; … … 3098 3299 esac 3099 3300 done 3100 if t rue || test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then3301 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 3101 3302 dependency_libs="$temp_xrpath $dependency_libs" 3102 3303 fi … … 3135 3336 *-*-netbsd*) 3136 3337 # 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"; then3141 deplibs="$deplibs -lc"3142 fi3143 3338 ;; 3144 3339 *-*-openbsd* | *-*-freebsd*) … … 3492 3687 dep_rpath= 3493 3688 rpath="$finalize_rpath" 3494 test "$mode" != relink && test "$fast_install" = no &&rpath="$compile_rpath$rpath"3689 test "$mode" != relink && rpath="$compile_rpath$rpath" 3495 3690 for libdir in $rpath; do 3496 3691 if test -n "$hardcode_libdir_flag_spec"; then … … 3547 3742 3548 3743 # Get the real and link names of the library. 3549 eval shared_ext=\"$shrext \"3744 eval shared_ext=\"$shrext_cmds\" 3550 3745 eval library_names=\"$library_names_spec\" 3551 3746 set dummy $library_names … … 3577 3772 export_symbols="$output_objdir/$libname.exp" 3578 3773 $run $rm $export_symbols 3579 eval cmds=\"$export_symbols_cmds\"3774 cmds=$export_symbols_cmds 3580 3775 save_ifs="$IFS"; IFS='~' 3581 3776 for cmd in $cmds; do 3582 3777 IFS="$save_ifs" 3778 eval cmd=\"$cmd\" 3583 3779 if len=`expr "X$cmd" : ".*"` && 3584 3780 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then … … 3610 3806 case " $convenience " in 3611 3807 *" $test_deplib "*) ;; 3612 *) 3808 *) 3613 3809 tmp_deplibs="$tmp_deplibs $test_deplib" 3614 3810 ;; 3615 3811 esac 3616 3812 done 3617 deplibs="$tmp_deplibs" 3813 deplibs="$tmp_deplibs" 3618 3814 3619 3815 if test -n "$convenience"; then … … 3623 3819 else 3624 3820 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"; then3631 exit $status3632 fi3633 3821 generated="$generated $gentop" 3634 3822 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 3686 3828 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 3687 3829 eval flag=\"$thread_safe_flag_spec\" … … 3694 3836 fi 3695 3837 3696 # Add all flags from the command line. We here create a library,3697 # but those flags were only added to compile_command and3698 # 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_flags3703 #linker_flags="$linker_flags $add_flags"3704 3705 3838 # Do each of the archive commands. 3706 3839 if test "$module" = yes && test -n "$module_cmds" ; then 3707 3840 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 3709 3843 else 3710 eval cmds=\"$module_cmds\" 3844 eval test_cmds=\"$module_cmds\" 3845 cmds=$module_cmds 3711 3846 fi 3712 3847 else 3713 3848 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 3715 3851 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" : ".*"` && 3721 3858 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3722 3859 : … … 3819 3956 3820 3957 # 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 3821 3965 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3822 eval cmds=\"$archive_expsym_cmds\"3966 cmds=$archive_expsym_cmds 3823 3967 else 3824 eval cmds=\"$archive_cmds\" 3968 cmds=$archive_cmds 3969 fi 3825 3970 fi 3826 3971 3827 3972 # Append the command to remove the reloadable object files 3828 3973 # to the just-reset $cmds. 3829 eval cmds=\"\$cmds~ $rm $delfiles\"3974 eval cmds=\"\$cmds~\$rm $delfiles\" 3830 3975 fi 3831 3976 save_ifs="$IFS"; IFS='~' 3832 3977 for cmd in $cmds; do 3833 3978 IFS="$save_ifs" 3979 eval cmd=\"$cmd\" 3834 3980 $show "$cmd" 3835 3981 $run eval "$cmd" || exit $? … … 3840 3986 if test "$mode" = relink; then 3841 3987 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? 3842 exit 03988 exit $EXIT_SUCCESS 3843 3989 fi 3844 3990 … … 3888 4034 if test -n "$objs$old_deplibs"; then 3889 4035 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 3890 exit 14036 exit $EXIT_FAILURE 3891 4037 fi 3892 4038 libobj="$output" … … 3917 4063 else 3918 4064 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"; then3925 exit $status3926 fi3927 4065 generated="$generated $gentop" 3928 4066 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" 3977 4069 fi 3978 4070 fi … … 3982 4074 3983 4075 output="$obj" 3984 eval cmds=\"$reload_cmds\"4076 cmds=$reload_cmds 3985 4077 save_ifs="$IFS"; IFS='~' 3986 4078 for cmd in $cmds; do 3987 4079 IFS="$save_ifs" 4080 eval cmd=\"$cmd\" 3988 4081 $show "$cmd" 3989 4082 $run eval "$cmd" || exit $? … … 3998 4091 fi 3999 4092 4000 exit 04093 exit $EXIT_SUCCESS 4001 4094 fi 4002 4095 … … 4011 4104 # $show "echo timestamp > $libobj" 4012 4105 # $run eval "echo timestamp > $libobj" || exit $? 4013 exit 04106 exit $EXIT_SUCCESS 4014 4107 fi 4015 4108 … … 4018 4111 reload_objs="$libobjs $reload_conv_objs" 4019 4112 output="$libobj" 4020 eval cmds=\"$reload_cmds\"4113 cmds=$reload_cmds 4021 4114 save_ifs="$IFS"; IFS='~' 4022 4115 for cmd in $cmds; do 4023 4116 IFS="$save_ifs" 4117 eval cmd=\"$cmd\" 4024 4118 $show "$cmd" 4025 4119 $run eval "$cmd" || exit $? … … 4033 4127 fi 4034 4128 4035 exit 04129 exit $EXIT_SUCCESS 4036 4130 ;; 4037 4131 … … 4351 4445 *) 4352 4446 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 4353 exit 14447 exit $EXIT_FAILURE 4354 4448 ;; 4355 4449 esac … … 4363 4457 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` 4364 4458 fi 4365 4366 # AIX runtime linking requires linking programs with -Wl,-brtl and libs with -Wl,-G4367 # 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" in4371 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 esac4376 4459 4377 4460 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then … … 4450 4533 $show "$link_command" 4451 4534 $run eval "$link_command" || exit $? 4452 exit 04535 exit $EXIT_SUCCESS 4453 4536 fi 4454 4537 … … 4505 4588 4506 4589 # Quote $echo for shipping. 4507 if test "X$echo" = "X$SHELL $ 0--fallback-echo"; then4508 case $ 0in4509 [\\/]* | [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";; 4511 4594 esac 4512 4595 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` … … 4534 4617 cwrapper=`$echo ${output}.exe` 4535 4618 $rm $cwrappersource $cwrapper 4536 trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 154619 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4537 4620 4538 4621 cat > $cwrappersource <<EOF … … 4543 4626 The $output program cannot be directly executed until all the libtool 4544 4627 libraries that it depends on are installed. 4545 4628 4546 4629 This wrapper executable should never be moved out of the build directory. 4547 4630 If it is, it will not operate correctly. … … 4575 4658 defined (__OS2__) 4576 4659 #define HAVE_DOS_BASED_FILE_SYSTEM 4577 #ifndef DIR_SEPARATOR_2 4660 #ifndef DIR_SEPARATOR_2 4578 4661 #define DIR_SEPARATOR_2 '\\' 4579 4662 #endif … … 4606 4689 char **newargz; 4607 4690 int i; 4608 4691 4609 4692 program_name = (char *) xstrdup ((char *) basename (argv[0])); 4610 4693 newargz = XMALLOC(char *, argc+2); … … 4619 4702 /* we know the script has the same name, without the .exe */ 4620 4703 /* so make sure newargz[1] doesn't end in .exe */ 4621 strendzap(newargz[1],".exe"); 4704 strendzap(newargz[1],".exe"); 4622 4705 for (i = 1; i < argc; i++) 4623 4706 newargz[i+1] = xstrdup(argv[i]); … … 4642 4725 } 4643 4726 4644 char * 4727 char * 4645 4728 xstrdup (const char *string) 4646 4729 { … … 4656 4739 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4657 4740 /* Skip over the disk name in MSDOS pathnames. */ 4658 if (isalpha (name[0]) && name[1] == ':') 4741 if (isalpha (name[0]) && name[1] == ':') 4659 4742 name += 2; 4660 4743 #endif … … 4666 4749 } 4667 4750 4668 char * 4751 char * 4669 4752 fnqualify(const char *path) 4670 4753 { … … 4694 4777 4695 4778 char * 4696 strendzap(char *str, const char *pat) 4779 strendzap(char *str, const char *pat) 4697 4780 { 4698 4781 size_t len, patlen; … … 4714 4797 4715 4798 static void 4716 lt_error_core (int exit_status, const char * mode, 4799 lt_error_core (int exit_status, const char * mode, 4717 4800 const char * message, va_list ap) 4718 4801 { … … 4743 4826 esac 4744 4827 $rm $output 4745 trap "$rm $output; exit 1" 1 2 154828 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 4746 4829 4747 4830 $echo > $output "\ … … 4764 4847 # The HP-UX ksh and POSIX shell print the target directory to stdout 4765 4848 # if CDPATH is set. 4766 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi 4849 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4767 4850 4768 4851 relink_command=\"$relink_command\" … … 4843 4926 $echo \"\$relink_command_output\" >&2 4844 4927 $rm \"\$progdir/\$file\" 4845 exit 14928 exit $EXIT_FAILURE 4846 4929 fi 4847 4930 fi … … 4905 4988 $echo >> $output "\ 4906 4989 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 4907 exit 14990 exit $EXIT_FAILURE 4908 4991 fi 4909 4992 else … … 4912 4995 \$echo \"This script is just a wrapper for \$program.\" 1>&2 4913 4996 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 4914 exit 14997 exit $EXIT_FAILURE 4915 4998 fi 4916 4999 fi\ … … 4918 5001 chmod +x $output 4919 5002 fi 4920 exit 05003 exit $EXIT_SUCCESS 4921 5004 ;; 4922 5005 esac … … 4941 5024 if test -n "$addlibs"; then 4942 5025 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"; then4949 exit $status4950 fi4951 5026 generated="$generated $gentop" 4952 5027 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 5005 5031 5006 5032 # Do each command in the archive commands. 5007 5033 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 5009 5035 else 5010 5036 eval cmds=\"$old_archive_cmds\" … … 5012 5038 if len=`expr "X$cmds" : ".*"` && 5013 5039 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5014 :5040 cmds=$old_archive_cmds 5015 5041 else 5016 5042 # the command line is too long to link in one step, link in parts … … 5039 5065 do 5040 5066 last_oldobj=$obj 5041 done 5067 done 5042 5068 for obj in $save_oldobjs 5043 5069 do … … 5053 5079 if test "$obj" = "$last_oldobj" ; then 5054 5080 RANLIB=$save_RANLIB 5055 fi 5081 fi 5056 5082 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5057 5083 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" … … 5064 5090 eval cmds=\"\$concat_cmds\" 5065 5091 else 5066 eval cmds=\"\$concat_cmds~ $old_archive_cmds\"5092 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 5067 5093 fi 5068 5094 fi … … 5070 5096 save_ifs="$IFS"; IFS='~' 5071 5097 for cmd in $cmds; do 5098 eval cmd=\"$cmd\" 5072 5099 IFS="$save_ifs" 5073 5100 $show "$cmd" … … 5101 5128 done 5102 5129 # 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@)" 5104 5131 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 5105 5132 if test "$hardcode_automatic" = yes ; then 5106 relink_command= 5107 fi 5133 relink_command= 5134 fi 5135 5136 5108 5137 # Only create the output if not a dry run. 5109 5138 if test -z "$run"; then … … 5123 5152 if test -z "$libdir"; then 5124 5153 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 5125 exit 15154 exit $EXIT_FAILURE 5126 5155 fi 5127 5156 newdependency_libs="$newdependency_libs $libdir/$name" … … 5137 5166 if test -z "$libdir"; then 5138 5167 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5139 exit 15168 exit $EXIT_FAILURE 5140 5169 fi 5141 5170 newdlfiles="$newdlfiles $libdir/$name" … … 5148 5177 if test -z "$libdir"; then 5149 5178 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5150 exit 15179 exit $EXIT_FAILURE 5151 5180 fi 5152 5181 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" 5153 5201 done 5154 5202 dlprefiles="$newdlprefiles" … … 5196 5244 # Directory that this library needs to be installed in: 5197 5245 libdir='$install_libdir'" 5198 if test "$installed" = no && test "$need_relink" = yes && test "$fast_install" = no; then5246 if test "$installed" = no && test "$need_relink" = yes; then 5199 5247 $echo >> $output "\ 5200 5248 relink_command=\"$relink_command\"" … … 5209 5257 ;; 5210 5258 esac 5211 exit 05259 exit $EXIT_SUCCESS 5212 5260 ;; 5213 5261 … … 5298 5346 $echo "$modename: you must specify an install program" 1>&2 5299 5347 $echo "$help" 1>&2 5300 exit 15348 exit $EXIT_FAILURE 5301 5349 fi 5302 5350 … … 5304 5352 $echo "$modename: the \`$prev' option requires an argument" 1>&2 5305 5353 $echo "$help" 1>&2 5306 exit 15354 exit $EXIT_FAILURE 5307 5355 fi 5308 5356 … … 5314 5362 fi 5315 5363 $echo "$help" 1>&2 5316 exit 15364 exit $EXIT_FAILURE 5317 5365 fi 5318 5366 … … 5335 5383 $echo "$modename: \`$dest' is not a directory" 1>&2 5336 5384 $echo "$help" 1>&2 5337 exit 15385 exit $EXIT_FAILURE 5338 5386 fi 5339 5387 fi … … 5347 5395 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 5348 5396 $echo "$help" 1>&2 5349 exit 15397 exit $EXIT_FAILURE 5350 5398 ;; 5351 5399 esac … … 5376 5424 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 5377 5425 $echo "$help" 1>&2 5378 exit 15426 exit $EXIT_FAILURE 5379 5427 fi 5380 5428 … … 5418 5466 if test "$inst_prefix_dir" = "$destdir"; then 5419 5467 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 5420 exit 15468 exit $EXIT_FAILURE 5421 5469 fi 5422 5470 … … 5433 5481 else 5434 5482 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 5435 exit 15483 exit $EXIT_FAILURE 5436 5484 fi 5437 5485 fi … … 5468 5516 # Do each command in the postinstall commands. 5469 5517 lib="$destdir/$realname" 5470 eval cmds=\"$postinstall_cmds\"5518 cmds=$postinstall_cmds 5471 5519 save_ifs="$IFS"; IFS='~' 5472 5520 for cmd in $cmds; do 5473 5521 IFS="$save_ifs" 5522 eval cmd=\"$cmd\" 5474 5523 $show "$cmd" 5475 5524 $run eval "$cmd" || exit $? … … 5511 5560 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 5512 5561 $echo "$help" 1>&2 5513 exit 15562 exit $EXIT_FAILURE 5514 5563 ;; 5515 5564 esac … … 5529 5578 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 5530 5579 fi 5531 exit 05580 exit $EXIT_SUCCESS 5532 5581 ;; 5533 5582 … … 5583 5632 if test -z "$notinst_deplibs"; then 5584 5633 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 5585 exit 15634 exit $EXIT_FAILURE 5586 5635 fi 5587 5636 … … 5624 5673 test -n "$TMPDIR" && tmpdir="$TMPDIR" 5625 5674 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 5627 5679 else 5680 umask $save_umask 5628 5681 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 5629 5682 continue … … 5684 5737 $run eval "$install_prog \$file \$oldlib" || exit $? 5685 5738 5686 if test -n "$stripme" && test -n "$ striplib"; then5739 if test -n "$stripme" && test -n "$old_striplib"; then 5687 5740 $show "$old_striplib $oldlib" 5688 5741 $run eval "$old_striplib $oldlib" || exit $? … … 5690 5743 5691 5744 # Do each command in the postinstall commands. 5692 eval cmds=\"$old_postinstall_cmds\"5745 cmds=$old_postinstall_cmds 5693 5746 save_ifs="$IFS"; IFS='~' 5694 5747 for cmd in $cmds; do 5695 5748 IFS="$save_ifs" 5749 eval cmd=\"$cmd\" 5696 5750 $show "$cmd" 5697 5751 $run eval "$cmd" || exit $? … … 5707 5761 # Maybe just do a dry run. 5708 5762 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' 5710 5764 else 5711 exit 05765 exit $EXIT_SUCCESS 5712 5766 fi 5713 5767 ;; … … 5728 5782 if test -n "$finish_cmds"; then 5729 5783 # Do each command in the finish commands. 5730 eval cmds=\"$finish_cmds\"5784 cmds=$finish_cmds 5731 5785 save_ifs="$IFS"; IFS='~' 5732 5786 for cmd in $cmds; do 5733 5787 IFS="$save_ifs" 5788 eval cmd=\"$cmd\" 5734 5789 $show "$cmd" 5735 5790 $run eval "$cmd" || admincmds="$admincmds … … 5748 5803 5749 5804 # Exit here if they wanted silent mode. 5750 exit 05805 test "$show" = : && exit $EXIT_SUCCESS 5751 5806 5752 5807 $echo "----------------------------------------------------------------------" … … 5784 5839 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 5785 5840 $echo "----------------------------------------------------------------------" 5786 exit 05841 exit $EXIT_SUCCESS 5787 5842 ;; 5788 5843 … … 5796 5851 $echo "$modename: you must specify a COMMAND" 1>&2 5797 5852 $echo "$help" 5798 exit 15853 exit $EXIT_FAILURE 5799 5854 fi 5800 5855 … … 5804 5859 $echo "$modename: \`$file' is not a file" 1>&2 5805 5860 $echo "$help" 1>&2 5806 exit 15861 exit $EXIT_FAILURE 5807 5862 fi 5808 5863 … … 5815 5870 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 5816 5871 $echo "$help" 1>&2 5817 exit 15872 exit $EXIT_FAILURE 5818 5873 fi 5819 5874 … … 5842 5897 else 5843 5898 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 5844 exit 15899 exit $EXIT_FAILURE 5845 5900 fi 5846 5901 ;; … … 5914 5969 5915 5970 # Now prepare to actually exec the command. 5916 exec_cmd="\ $cmd$args"5971 exec_cmd="\"\$cmd\"$args" 5917 5972 else 5918 5973 # Display what would be done. … … 5921 5976 $echo "export $shlibpath_var" 5922 5977 fi 5923 $echo "$cmd$args"5924 exit 05978 eval \$echo \"\$cmd\"$args 5979 exit $EXIT_SUCCESS 5925 5980 fi 5926 5981 ;; … … 5950 6005 $echo "$modename: you must specify an RM program" 1>&2 5951 6006 $echo "$help" 1>&2 5952 exit 16007 exit $EXIT_FAILURE 5953 6008 fi 5954 6009 … … 6005 6060 if test -n "$library_names"; then 6006 6061 # Do each command in the postuninstall commands. 6007 eval cmds=\"$postuninstall_cmds\"6062 cmds=$postuninstall_cmds 6008 6063 save_ifs="$IFS"; IFS='~' 6009 6064 for cmd in $cmds; do 6010 6065 IFS="$save_ifs" 6066 eval cmd=\"$cmd\" 6011 6067 $show "$cmd" 6012 6068 $run eval "$cmd" … … 6020 6076 if test -n "$old_library"; then 6021 6077 # Do each command in the old_postuninstall commands. 6022 eval cmds=\"$old_postuninstall_cmds\"6078 cmds=$old_postuninstall_cmds 6023 6079 save_ifs="$IFS"; IFS='~' 6024 6080 for cmd in $cmds; do 6025 6081 IFS="$save_ifs" 6082 eval cmd=\"$cmd\" 6026 6083 $show "$cmd" 6027 6084 $run eval "$cmd" … … 6062 6119 noexename=$name 6063 6120 case $file in 6064 *.exe) 6121 *.exe) 6065 6122 file=`$echo $file|${SED} 's,.exe$,,'` 6066 6123 noexename=`$echo $name|${SED} 's,.exe$,,'` … … 6107 6164 $echo "$modename: you must specify a MODE" 1>&2 6108 6165 $echo "$generic_help" 1>&2 6109 exit 16166 exit $EXIT_FAILURE 6110 6167 ;; 6111 6168 esac … … 6114 6171 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6115 6172 $echo "$generic_help" 1>&2 6116 exit 16173 exit $EXIT_FAILURE 6117 6174 fi 6118 6175 fi # test -z "$show_help" … … 6120 6177 if test -n "$exec_cmd"; then 6121 6178 eval exec $exec_cmd 6122 exit 16179 exit $EXIT_FAILURE 6123 6180 fi 6124 6181 … … 6156 6213 6157 6214 Report bugs to <bug-libtool@gnu.org>." 6158 exit 06215 exit $EXIT_SUCCESS 6159 6216 ;; 6160 6217 … … 6268 6325 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 6269 6326 -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 6270 6329 -release RELEASE specify package release information 6271 6330 -rpath LIBDIR the created library will eventually be installed in LIBDIR … … 6309 6368 $echo "$modename: invalid operation mode \`$mode'" 1>&2 6310 6369 $echo "$help" 1>&2 6311 exit 16370 exit $EXIT_FAILURE 6312 6371 ;; 6313 6372 esac … … 6316 6375 $echo "Try \`$modename --help' for more information about other modes." 6317 6376 6318 exit 06377 exit $EXIT_SUCCESS 6319 6378 6320 6379 # 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, if2 # have all needed files, that a GNU package needs3 AUTOMAKE_OPTIONS = foreign 1.44 5 1 SUBDIRS = astronomy collections dataManip fileUtils image sysUtils 6 2 … … 25 21 26 22 libpslib_la_SOURCES = psTest.c 23 libpslib_la_LDFLAGS = -version-info $(PSLIB_LT_VERSION) 27 24 28 25 EXTRA_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, if2 # have all needed files, that a GNU package needs3 AUTOMAKE_OPTIONS = foreign 1.44 1 5 EXTRA_DIST = PsLib.i PsLibModule/Makefile.PL2 EXTRA_DIST = pslib.i psLibModule/Makefile.PL 6 3 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.txt4 CLEANFILES = psLibModule/pslib_wrap.c psLibModule/pslib.pm \ 5 psLibModule/Makefile psLibModule/pm_to_blib psLibModule/pslib.bs \ 6 psLibModule/pslib_wrap.o psLibModule/setup.txt 10 7 11 8 SRCDIR = $(shell cd $(top_srcdir)/src && pwd) … … 18 15 ## PsLibModule swig build section. 19 16 20 PsLibModule/setup.txt:Makefile21 echo "includes=$(INCLUDES)" > PsLibModule/setup.txt22 echo "ldflags=$( libdir)/libpslib" >> PsLibModule/setup.txt23 echo "cflags= -Wno-unused -Wno-strict-aliasing" >> PsLibModule/setup.txt17 psLibModule/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 24 21 25 PsLibModule/PsLib_wrap.c: PsLib.i22 psLibModule/pslib_wrap.c: pslib.i 26 23 $(SWIG) -perl $(INCLUDES) -w451 -o $@ $? 27 24 28 PsLibModule/Makefile:PsLibModule/Makefile.PL PsLibModule/setup.txt29 cd PsLibModule && $(PERL) Makefile.PL25 psLibModule/Makefile:psLibModule/Makefile.PL psLibModule/setup.txt 26 cd psLibModule && $(PERL) Makefile.PL PREFIX=$(PERL_PREFIX) 30 27 31 all: PsLibModule/PsLib_wrap.c 28 all:psLibModule/pslib_wrap.c psLibModule/Makefile 29 cd psLibModule && make 32 30 33 swig:PsLibModule/PsLib_wrap.c PsLibModule/Makefile 34 cd PsLibModule && make31 install-exec-hook: all 32 cd psLibModule && make install 35 33 36 swig-install: swig 37 cd PsLibModule && make install 38 39 uninstall-local: PsLibModule/Makefile 34 uninstall-local: psLibModule/Makefile 40 35 cd PsLibModule && make clean
Note:
See TracChangeset
for help on using the changeset viewer.
