Changeset 3407
- Timestamp:
- Mar 11, 2005, 10:38:56 AM (21 years ago)
- Location:
- trunk/psLib
- Files:
-
- 43 edited
-
config.guess (modified) (26 diffs)
-
config.sub (modified) (38 diffs)
-
ltmain.sh (modified) (226 diffs)
-
pslib.kdevelop.pcs (modified) ( previous)
-
pslib.kdevses (modified) (1 diff)
-
src/astronomy/psMetadata.c (modified) (5 diffs)
-
src/astronomy/psMetadata.h (modified) (3 diffs)
-
src/collections/psMetadata.c (modified) (5 diffs)
-
src/collections/psMetadata.h (modified) (3 diffs)
-
src/collections/psVector.c (modified) (4 diffs)
-
src/collections/psVector.h (modified) (2 diffs)
-
src/dataIO/psFits.c (modified) (4 diffs)
-
src/dataIO/psFits.h (modified) (4 diffs)
-
src/fileUtils/psFits.c (modified) (4 diffs)
-
src/fileUtils/psFits.h (modified) (4 diffs)
-
src/fits/psFits.c (modified) (4 diffs)
-
src/fits/psFits.h (modified) (4 diffs)
-
src/mathtypes/psVector.c (modified) (4 diffs)
-
src/mathtypes/psVector.h (modified) (2 diffs)
-
src/types/psMetadata.c (modified) (5 diffs)
-
src/types/psMetadata.h (modified) (3 diffs)
-
test/astronomy/tst_psMetadataIO.c (modified) (3 diffs)
-
test/astronomy/tst_psMetadata_01.c (modified) (4 diffs)
-
test/astronomy/tst_psMetadata_02.c (modified) (3 diffs)
-
test/astronomy/tst_psMetadata_03.c (modified) (2 diffs)
-
test/astronomy/tst_psMetadata_04.c (modified) (2 diffs)
-
test/astronomy/tst_psMetadata_05.c (modified) (2 diffs)
-
test/astronomy/tst_psMetadata_06.c (modified) (2 diffs)
-
test/astronomy/verified/tst_psMetadataIO.stdout (modified) (3 diffs)
-
test/astronomy/verified/tst_psMetadata_01.stdout (modified) (4 diffs)
-
test/astronomy/verified/tst_psMetadata_02.stderr (modified) (1 diff)
-
test/astronomy/verified/tst_psMetadata_02.stdout (modified) (1 diff)
-
test/astronomy/verified/tst_psMetadata_03.stdout (modified) (1 diff)
-
test/astronomy/verified/tst_psMetadata_04.stdout (modified) (1 diff)
-
test/astronomy/verified/tst_psMetadata_05.stdout (modified) (1 diff)
-
test/astronomy/verified/tst_psMetadata_06.stdout (modified) (1 diff)
-
test/collections/tst_psMetadataIO.c (modified) (3 diffs)
-
test/collections/tst_psMetadata_01.c (modified) (4 diffs)
-
test/collections/tst_psMetadata_02.c (modified) (3 diffs)
-
test/collections/tst_psMetadata_03.c (modified) (2 diffs)
-
test/collections/tst_psMetadata_04.c (modified) (2 diffs)
-
test/collections/tst_psMetadata_05.c (modified) (2 diffs)
-
test/collections/tst_psMetadata_06.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/config.guess
r3377 r3407 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, 2003 Free Software Foundation, Inc.5 6 timestamp='200 3-01-10'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 … … 107 107 { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 108 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 ; } || 109 110 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 110 111 dummy=$tmp/dummy ; … … 135 136 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown 136 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 137 148 138 149 # Note: order is significant - the case branches are not exclusive. … … 197 208 echo "${machine}-${os}${release}" 198 209 exit 0 ;; 210 amd64:OpenBSD:*:*) 211 echo x86_64-unknown-openbsd${UNAME_RELEASE} 212 exit 0 ;; 199 213 amiga:OpenBSD:*:*) 200 214 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 203 217 echo mipsel-unknown-openbsd${UNAME_RELEASE} 204 218 exit 0 ;; 219 cats:OpenBSD:*:*) 220 echo arm-unknown-openbsd${UNAME_RELEASE} 221 exit 0 ;; 205 222 hp300:OpenBSD:*:*) 206 223 echo m68k-unknown-openbsd${UNAME_RELEASE} 207 224 exit 0 ;; 225 luna88k:OpenBSD:*:*) 226 echo m88k-unknown-openbsd${UNAME_RELEASE} 227 exit 0 ;; 208 228 mac68k:OpenBSD:*:*) 209 229 echo m68k-unknown-openbsd${UNAME_RELEASE} … … 236 256 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 237 257 exit 0 ;; 238 *:MicroBSD:*:*) 239 echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE} 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} 240 266 exit 0 ;; 241 267 alpha:OSF1:*:*) 242 if test $UNAME_RELEASE = "V4.0"; then 268 case $UNAME_RELEASE in 269 *4.0) 243 270 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 244 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. 245 314 # A Vn.n version is a released version. 246 315 # A Tn.n version is a released field test version. 247 316 # A Xn.n version is an unreleased experimental baselevel. 248 317 # 1.2 uses "1.2" for uname -r. 249 eval $set_cc_for_build 250 cat <<EOF >$dummy.s 251 .data 252 \$Lformat: 253 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 254 255 .text 256 .globl main 257 .align 4 258 .ent main 259 main: 260 .frame \$30,16,\$26,0 261 ldgp \$29,0(\$27) 262 .prologue 1 263 .long 0x47e03d80 # implver \$0 264 lda \$2,-1 265 .long 0x47e20c21 # amask \$2,\$1 266 lda \$16,\$Lformat 267 mov \$0,\$17 268 not \$1,\$18 269 jsr \$26,printf 270 ldgp \$29,0(\$26) 271 mov 0,\$16 272 jsr \$26,exit 273 .end main 274 EOF 275 $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null 276 if test "$?" = 0 ; then 277 case `$dummy` in 278 0-0) 279 UNAME_MACHINE="alpha" 280 ;; 281 1-0) 282 UNAME_MACHINE="alphaev5" 283 ;; 284 1-1) 285 UNAME_MACHINE="alphaev56" 286 ;; 287 1-101) 288 UNAME_MACHINE="alphapca56" 289 ;; 290 2-303) 291 UNAME_MACHINE="alphaev6" 292 ;; 293 2-307) 294 UNAME_MACHINE="alphaev67" 295 ;; 296 2-1307) 297 UNAME_MACHINE="alphaev68" 298 ;; 299 3-1307) 300 UNAME_MACHINE="alphaev7" 301 ;; 302 esac 303 fi 304 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'` 305 319 exit 0 ;; 306 320 Alpha\ *:Windows_NT*:*) … … 324 338 *:OS/390:*:*) 325 339 echo i370-ibm-openedition 340 exit 0 ;; 341 *:OS400:*:*) 342 echo powerpc-ibm-os400 326 343 exit 0 ;; 327 344 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) … … 342 359 echo pyramid-pyramid-svr4 343 360 exit 0 ;; 361 DRS?6000:unix:4.0:6*) 362 echo sparc-icl-nx6 363 exit 0 ;; 344 364 DRS?6000:UNIX_SV:4.2*:7*) 345 365 case `/usr/bin/uname -p` in … … 414 434 echo m68k-unknown-mint${UNAME_RELEASE} 415 435 exit 0 ;; 436 m68k:machten:*:*) 437 echo m68k-apple-machten${UNAME_RELEASE} 438 exit 0 ;; 416 439 powerpc:machten:*:*) 417 440 echo powerpc-apple-machten${UNAME_RELEASE} … … 749 772 exit 0 ;; 750 773 *:UNICOS/mp:*:*) 751 echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'774 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 752 775 exit 0 ;; 753 776 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) … … 757 780 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 758 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 ;; 759 787 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 760 788 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} … … 767 795 exit 0 ;; 768 796 *:FreeBSD:*:*) 769 # Determine whether the default compiler uses glibc. 770 eval $set_cc_for_build 771 sed 's/^ //' << EOF >$dummy.c 772 #include <features.h> 773 #if __GLIBC__ >= 2 774 LIBC=gnu 775 #else 776 LIBC= 777 #endif 778 EOF 779 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 780 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/[-(].*//'` 781 798 exit 0 ;; 782 799 i*:CYGWIN*:*) … … 789 806 echo ${UNAME_MACHINE}-pc-pw32 790 807 exit 0 ;; 791 x86:Interix*: 3*)792 echo i586-pc-interix 3808 x86:Interix*:[34]*) 809 echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' 793 810 exit 0 ;; 794 811 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) … … 811 828 exit 0 ;; 812 829 *:GNU:*:*) 830 # the GNU system 813 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 814 836 exit 0 ;; 815 837 i*86:Minix:*:*) … … 817 839 exit 0 ;; 818 840 arm*:Linux:*:*) 819 echo ${UNAME_MACHINE}-unknown-linux-gnu 841 echo ${UNAME_MACHINE}-${VENDOR}-linux 842 exit 0 ;; 843 cris:Linux:*:*) 844 echo cris-axis-linux 820 845 exit 0 ;; 821 846 ia64:Linux:*:*) 822 echo ${UNAME_MACHINE}-unknown-linux-gnu 847 echo ${UNAME_MACHINE}-${VENDOR}-linux 848 exit 0 ;; 849 m32r*:Linux:*:*) 850 echo ${UNAME_MACHINE}-${VENDOR}-linux 823 851 exit 0 ;; 824 852 m68*:Linux:*:*) 825 echo ${UNAME_MACHINE}- unknown-linux-gnu853 echo ${UNAME_MACHINE}-${VENDOR}-linux 826 854 exit 0 ;; 827 855 mips:Linux:*:*) … … 842 870 EOF 843 871 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 844 test x"${CPU}" != x && echo "${CPU}- unknown-linux-gnu" && exit 0872 test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 845 873 ;; 846 874 mips64:Linux:*:*) … … 861 889 EOF 862 890 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` 863 test x"${CPU}" != x && echo "${CPU}- unknown-linux-gnu" && exit 0891 test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0 864 892 ;; 865 893 ppc:Linux:*:*) 866 echo powerpc- unknown-linux-gnu894 echo powerpc-${VENDOR}-linux 867 895 exit 0 ;; 868 896 ppc64:Linux:*:*) 869 echo powerpc64- unknown-linux-gnu897 echo powerpc64-${VENDOR}-linux 870 898 exit 0 ;; 871 899 alpha:Linux:*:*) … … 880 908 esac 881 909 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 882 if test "$?" = 0 ; then LIBC=" libc1" ; else LIBC="" ; fi883 echo ${UNAME_MACHINE}- unknown-linux-gnu${LIBC}910 if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi 911 echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC} 884 912 exit 0 ;; 885 913 parisc:Linux:*:* | hppa:Linux:*:*) 886 914 # Look for CPU level 887 915 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in 888 PA7*) echo hppa1.1- unknown-linux-gnu;;889 PA8*) echo hppa2.0- unknown-linux-gnu;;890 *) echo hppa- unknown-linux-gnu;;916 PA7*) echo hppa1.1-${VENDOR}-linux ;; 917 PA8*) echo hppa2.0-${VENDOR}-linux ;; 918 *) echo hppa-${VENDOR}-linux ;; 891 919 esac 892 920 exit 0 ;; 893 921 parisc64:Linux:*:* | hppa64:Linux:*:*) 894 echo hppa64- unknown-linux-gnu922 echo hppa64-${VENDOR}-linux 895 923 exit 0 ;; 896 924 s390:Linux:*:* | s390x:Linux:*:*) 897 925 echo ${UNAME_MACHINE}-ibm-linux 898 926 exit 0 ;; 927 sh64*:Linux:*:*) 928 echo ${UNAME_MACHINE}-${VENDOR}-linux 929 exit 0 ;; 899 930 sh*:Linux:*:*) 900 echo ${UNAME_MACHINE}- unknown-linux-gnu931 echo ${UNAME_MACHINE}-${VENDOR}-linux 901 932 exit 0 ;; 902 933 sparc:Linux:*:* | sparc64:Linux:*:*) 903 echo ${UNAME_MACHINE}- unknown-linux-gnu934 echo ${UNAME_MACHINE}-${VENDOR}-linux 904 935 exit 0 ;; 905 936 x86_64:Linux:*:*) 906 echo x86_64- unknown-linux-gnu937 echo x86_64-${VENDOR}-linux 907 938 exit 0 ;; 908 939 i*86:Linux:*:*) … … 919 950 case "$ld_supported_targets" in 920 951 elf32-i386) 921 TENTATIVE="${UNAME_MACHINE}- pc-linux-gnu"952 TENTATIVE="${UNAME_MACHINE}-${VENDOR}-linux" 922 953 ;; 923 954 a.out-i386-linux) 924 echo "${UNAME_MACHINE}- pc-linux-gnuaout"955 echo "${UNAME_MACHINE}-${VENDOR}-linuxaout" 925 956 exit 0 ;; 926 957 coff-i386) 927 echo "${UNAME_MACHINE}- pc-linux-gnucoff"958 echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff" 928 959 exit 0 ;; 929 960 "") 930 # Either a pre-BFD a.out linker (linux -gnuoldld) or961 # Either a pre-BFD a.out linker (linuxoldld) or 931 962 # one that does not give us useful --help. 932 echo "${UNAME_MACHINE}- pc-linux-gnuoldld"963 echo "${UNAME_MACHINE}-${VENDOR}-linuxoldld" 933 964 exit 0 ;; 934 965 esac … … 954 985 #endif 955 986 #endif 987 #ifdef __dietlibc__ 988 LIBC=dietlibc 989 #endif 956 990 EOF 957 991 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` 958 test x"${LIBC}" != x && echo "${UNAME_MACHINE}- pc-linux-${LIBC}"&& exit 0992 test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0 959 993 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 960 994 ;; … … 983 1017 i*86:atheos:*:*) 984 1018 echo ${UNAME_MACHINE}-unknown-atheos 1019 exit 0 ;; 1020 i*86:syllable:*:*) 1021 echo ${UNAME_MACHINE}-pc-syllable 985 1022 exit 0 ;; 986 1023 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) … … 1053 1090 echo m68k-diab-dnix 1054 1091 exit 0 ;; 1055 M68*:*:R3V[567 ]*:*)1092 M68*:*:R3V[5678]*:*) 1056 1093 test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 1057 3[34 ]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)1094 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) 1058 1095 OS_REL='' 1059 1096 test -r /etc/.relid \ … … 1153 1190 exit 0 ;; 1154 1191 *:Darwin:*:*) 1155 case `uname -p` in 1192 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 1193 case $UNAME_PROCESSOR in 1156 1194 *86) UNAME_PROCESSOR=i686 ;; 1157 powerpc) UNAME_PROCESSOR=powerpc ;;1195 unknown) UNAME_PROCESSOR=powerpc ;; 1158 1196 esac 1159 1197 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} … … 1170 1208 echo i386-pc-qnx 1171 1209 exit 0 ;; 1172 NSR- [DGKLNPTVW]:NONSTOP_KERNEL:*:*)1210 NSR-?:NONSTOP_KERNEL:*:*) 1173 1211 echo nsr-tandem-nsk${UNAME_RELEASE} 1174 1212 exit 0 ;; … … 1211 1249 echo pdp10-unknown-its 1212 1250 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 1213 1264 esac 1214 1265 -
trunk/psLib/config.sub
r3377 r3407 2 2 # Configuration validation subroutine script. 3 3 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 4 # 2000, 2001, 2002, 2003 Free Software Foundation, Inc.5 6 timestamp='200 3-01-03'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* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 121 nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ 122 kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 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 \ … … 248 250 | mipsisa32r2 | mipsisa32r2el \ 249 251 | mipsisa64 | mipsisa64el \ 252 | mipsisa64r2 | mipsisa64r2el \ 250 253 | mipsisa64sb1 | mipsisa64sb1el \ 251 254 | mipsisa64sr71k | mipsisa64sr71kel \ … … 258 261 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 259 262 | pyramid \ 260 | s390 | s390x \ 261 | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 263 | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 262 264 | sh64 | sh64le \ 263 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv 9 | sparcv9b \265 | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ 264 266 | strongarm \ 265 | tahoe | thumb | tic 80 | tron \267 | tahoe | thumb | tic4x | tic80 | tron \ 266 268 | v850 | v850e \ 267 269 | we32k \ … … 298 300 | avr-* \ 299 301 | bs2000-* \ 300 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \301 | clipper-* | c ydra-* \302 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 303 | clipper-* | craynv-* | cydra-* \ 302 304 | d10v-* | d30v-* | dlx-* \ 303 305 | elxsi-* \ … … 306 308 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 307 309 | i*86-* | i860-* | i960-* | ia64-* \ 308 | ip2k-* \309 | m32r-* \310 | ip2k-* | iq2000-* \ 311 | m32r-* | m32rle-* \ 310 312 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 311 313 | m88110-* | m88k-* | mcore-* \ … … 321 323 | mipsisa32r2-* | mipsisa32r2el-* \ 322 324 | mipsisa64-* | mipsisa64el-* \ 325 | mipsisa64r2-* | mipsisa64r2el-* \ 323 326 | mipsisa64sb1-* | mipsisa64sb1el-* \ 324 327 | mipsisa64sr71k-* | mipsisa64sr71kel-* \ 325 328 | mipstx39-* | mipstx39el-* \ 329 | mmix-* \ 326 330 | msp430-* \ 327 | none-* | np1-* | n v1-* | ns16k-* | ns32k-* \331 | none-* | np1-* | ns16k-* | ns32k-* \ 328 332 | orion-* \ 329 333 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ … … 331 335 | pyramid-* \ 332 336 | romp-* | rs6000-* \ 333 | s390-* | s390x-* \ 334 | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ 337 | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 335 338 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 336 339 | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ 337 | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 338 | 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-* \ 339 344 | v850-* | v850e-* | vax-* \ 340 345 | we32k-* \ … … 360 365 os=-udi 361 366 ;; 367 abacus) 368 basic_machine=abacus-unknown 369 ;; 362 370 adobe68k) 363 371 basic_machine=m68010-adobe … … 374 382 os=-bsd 375 383 ;; 384 amd64) 385 basic_machine=x86_64-pc 386 ;; 387 amd64-*) 388 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` 389 ;; 376 390 amdahl) 377 391 basic_machine=580-amdahl … … 433 447 os=-unicos 434 448 ;; 449 craynv) 450 basic_machine=craynv-cray 451 os=-unicosmp 452 ;; 453 cr16c) 454 basic_machine=cr16c-unknown 455 os=-elf 456 ;; 435 457 crds | unos) 436 458 basic_machine=m68k-crds … … 438 460 cris | cris-* | etrax*) 439 461 basic_machine=cris-axis 462 ;; 463 crx) 464 basic_machine=crx-unknown 465 os=-elf 440 466 ;; 441 467 da30 | da30-*) … … 638 664 mips3*) 639 665 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown 640 ;;641 mmix*)642 basic_machine=mmix-knuth643 os=-mmixware644 666 ;; 645 667 monitor) … … 723 745 basic_machine=np1-gould 724 746 ;; 725 nv1)726 basic_machine=nv1-cray727 os=-unicosmp728 ;;729 747 nsr-tandem) 730 748 basic_machine=nsr-tandem … … 738 756 os=-coff 739 757 ;; 758 os400) 759 basic_machine=powerpc-ibm 760 os=-os400 761 ;; 740 762 OSE68000 | ose68000) 741 763 basic_machine=m68000-ericsson … … 769 791 basic_machine=i686-pc 770 792 ;; 771 pentiumii | pentium2 )793 pentiumii | pentium2 | pentiumiii | pentium3) 772 794 basic_machine=i686-pc 795 ;; 796 pentium4) 797 basic_machine=i786-pc 773 798 ;; 774 799 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) … … 778 803 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 779 804 ;; 780 pentiumii-* | pentium2-* )805 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) 781 806 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` 807 ;; 808 pentium4-*) 809 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` 782 810 ;; 783 811 pn) … … 823 851 basic_machine=romp-ibm 824 852 ;; 853 s390 | s390-*) 854 basic_machine=s390-ibm 855 ;; 856 s390x | s390x-*) 857 basic_machine=s390x-ibm 858 ;; 825 859 sa29200) 826 860 basic_machine=a29k-amd … … 833 867 basic_machine=mipsisa64sb1el-unknown 834 868 ;; 869 sei) 870 basic_machine=mips-sei 871 os=-seiux 872 ;; 835 873 sequent) 836 874 basic_machine=i386-sequent … … 840 878 os=-hms 841 879 ;; 880 sh64) 881 basic_machine=sh64-unknown 882 ;; 842 883 sparclite-wrs | simso-wrs) 843 884 basic_machine=sparclite-wrs … … 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 … … 934 979 tower | tower-32) 935 980 basic_machine=m68k-ncr 981 ;; 982 tpf) 983 basic_machine=s390x-ibm 984 os=-tpf 936 985 ;; 937 986 udi29k) … … 1008 1057 basic_machine=romp-ibm 1009 1058 ;; 1059 mmix) 1060 basic_machine=mmix-knuth 1061 ;; 1010 1062 rs6000) 1011 1063 basic_machine=rs6000-ibm … … 1024 1076 basic_machine=we32k-att 1025 1077 ;; 1026 sh3 | sh4 | sh 3eb | sh4eb | sh[1234]le | sh3ele)1078 sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 1027 1079 basic_machine=sh-unknown 1028 1080 ;; … … 1030 1082 basic_machine=sh64-unknown 1031 1083 ;; 1032 sparc | sparcv 9 | sparcv9b)1084 sparc | sparcv8 | sparcv9 | sparcv9b) 1033 1085 basic_machine=sparc-sun 1034 1086 ;; … … 1103 1155 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 1104 1156 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 1105 | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ 1106 | -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* \ 1107 1160 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 1108 1161 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1109 1162 | -chorusos* | -chorusrdb* \ 1110 1163 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1111 | -mingw32* | -linux -gnu* | -uxpv* | -beos* | -mpeix* | -udk* \1164 | -mingw32* | -linux* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ 1112 1165 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1113 1166 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ … … 1115 1168 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 1116 1169 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 1117 | -powermax* | -dnix* | - microbsd*)1170 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) 1118 1171 # Remember, each alternative MUST END IN *, to match a version number. 1119 1172 ;; … … 1139 1192 os=`echo $os | sed -e 's|mac|macos|'` 1140 1193 ;; 1141 -linux *)1142 os= `echo $os | sed -e 's|linux|linux-gnu|'`1194 -linux-dietlibc) 1195 os=-linux-dietlibc 1143 1196 ;; 1144 1197 -sunos5*) … … 1151 1204 os=-openedition 1152 1205 ;; 1206 -os400*) 1207 os=-os400 1208 ;; 1153 1209 -wince*) 1154 1210 os=-wince … … 1171 1227 -atheos*) 1172 1228 os=-atheos 1229 ;; 1230 -syllable*) 1231 os=-syllable 1173 1232 ;; 1174 1233 -386bsd) … … 1194 1253 os=-sysv4 1195 1254 ;; 1255 -tpf*) 1256 os=-tpf 1257 ;; 1196 1258 -triton*) 1197 1259 os=-sysv3 … … 1223 1285 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) 1224 1286 os=-mint 1287 ;; 1288 -aros*) 1289 os=-aros 1290 ;; 1291 -kaos*) 1292 os=-kaos 1225 1293 ;; 1226 1294 -none) … … 1255 1323 os=-aout 1256 1324 ;; 1325 c4x-* | tic4x-*) 1326 os=-coff 1327 ;; 1257 1328 # This must come before the *-dec entry. 1258 1329 pdp10-*) … … 1300 1371 *-ibm) 1301 1372 os=-aix 1373 ;; 1374 *-knuth) 1375 os=-mmixware 1302 1376 ;; 1303 1377 *-wec) … … 1433 1507 vendor=ibm 1434 1508 ;; 1509 -os400*) 1510 vendor=ibm 1511 ;; 1435 1512 -ptx*) 1436 1513 vendor=sequent 1514 ;; 1515 -tpf*) 1516 vendor=ibm 1437 1517 ;; 1438 1518 -vxsim* | -vxworks* | -windiss*) -
trunk/psLib/ltmain.sh
r3377 r3407 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 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 # define SED for historic ltconfig's generated by Libtool 1.352 test -z "$SED" && SED=sed53 54 # The name of this program.55 progname=`$echo "$0" | ${SED} 's%^.*/%%'`56 modename="$progname"57 58 # Constants.59 PROGRAM=ltmain.sh60 PACKAGE=libtool61 VERSION=1.4.362 TIMESTAMP=" (1.922.2.111 2002/10/23 02:54:36)"63 78 64 79 default_mode= … … 73 88 Xsed="${SED}"' -e 1s/^X//' 74 89 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' 75 # test EBCDIC or ASCII 76 case `echo A| od -x` in77 *[Cc]1*) # EBCDIC based system78 SP2NL="tr '\100' '\n'" 79 NL2SP="tr '\r\n' '\100\100'" 80 ;; 81 *) # Assume ASCII based system 82 SP2NL="tr '\040' '\012'" 83 NL2SP="tr '\015\012' '\040\040'" 84 ;; 85 esac 90 # test EBCDIC or ASCII 91 case `echo A|tr A '\301'` in 92 A) # EBCDIC based system 93 SP2NL="tr '\100' '\n'" 94 NL2SP="tr '\r\n' '\100\100'" 95 ;; 96 *) # Assume ASCII based system 97 SP2NL="tr '\040' '\012'" 98 NL2SP="tr '\015\012' '\040\040'" 99 ;; 100 esac 86 101 87 102 # NLS nuisances. … … 98 113 99 114 # Make sure IFS has a sensible default 100 : ${IFS=" "} 115 : ${IFS=" 116 "} 101 117 102 118 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then 103 echo "$modename: not configured to build any kind of library" 1>&2104 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2105 exit 1119 $echo "$modename: not configured to build any kind of library" 1>&2 120 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 121 exit $EXIT_FAILURE 106 122 fi 107 123 … … 118 134 o2lo="s/\\.${objext}\$/.lo/" 119 135 136 ##################################### 137 # Shell function definitions: 138 # This seems to be the best place for them 139 140 # func_win32_libid arg 141 # return the library type of file 'arg' 142 # 143 # Need a lot of goo to handle *both* DLLs and import libs 144 # Has to be a shell function in order to 'eat' the argument 145 # that is supplied when $file_magic_command is called. 146 func_win32_libid () { 147 win32_libid_type="unknown" 148 win32_fileres=`file -L $1 2>/dev/null` 149 case $win32_fileres in 150 *ar\ archive\ import\ library*) # definitely import 151 win32_libid_type="x86 archive import" 152 ;; 153 *ar\ archive*) # could be an import, or static 154 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ 155 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then 156 win32_nmres=`eval $NM -f posix -A $1 | \ 157 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` 158 if test "X$win32_nmres" = "Ximport" ; then 159 win32_libid_type="x86 archive import" 160 else 161 win32_libid_type="x86 archive static" 162 fi 163 fi 164 ;; 165 *DLL*) 166 win32_libid_type="x86 DLL" 167 ;; 168 *executable*) # but shell scripts are "executable" too... 169 case $win32_fileres in 170 *MS\ Windows\ PE\ Intel*) 171 win32_libid_type="x86 DLL" 172 ;; 173 esac 174 ;; 175 esac 176 $echo $win32_libid_type 177 } 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 } 359 # End of Shell function definitions 360 ##################################### 361 362 # Darwin sucks 363 eval std_shrext=\"$shrext_cmds\" 364 120 365 # Parse our command line options once, thoroughly. 121 while test $#-gt 0366 while test "$#" -gt 0 122 367 do 123 368 arg="$1" … … 135 380 execute_dlfiles="$execute_dlfiles $arg" 136 381 ;; 382 tag) 383 tagname="$arg" 384 preserve_args="${preserve_args}=$arg" 385 386 # Check whether tagname contains only valid characters 387 case $tagname in 388 *[!-_A-Za-z0-9,/]*) 389 $echo "$progname: invalid tag name: $tagname" 1>&2 390 exit $EXIT_FAILURE 391 ;; 392 esac 393 394 case $tagname in 395 CC) 396 # Don't test for the "default" C tag, as we know, it's there, but 397 # not specially marked. 398 ;; 399 *) 400 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then 401 taglist="$taglist $tagname" 402 # Evaluate the configuration. 403 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" 404 else 405 $echo "$progname: ignoring unknown tag $tagname" 1>&2 406 fi 407 ;; 408 esac 409 ;; 137 410 *) 138 411 eval "$prev=\$arg" … … 152 425 153 426 --version) 154 echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 155 exit 0 427 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" 428 $echo 429 $echo "Copyright (C) 2003 Free Software Foundation, Inc." 430 $echo "This is free software; see the source for copying conditions. There is NO" 431 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 432 exit $EXIT_SUCCESS 156 433 ;; 157 434 158 435 --config) 159 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0 160 exit 0 436 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath 437 # Now print the configurations for the tags. 438 for tagname in $taglist; do 439 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" 440 done 441 exit $EXIT_SUCCESS 161 442 ;; 162 443 163 444 --debug) 164 echo "$progname: enabling shell trace mode"445 $echo "$progname: enabling shell trace mode" 165 446 set -x 447 preserve_args="$preserve_args $arg" 166 448 ;; 167 449 … … 171 453 172 454 --features) 173 echo "host: $host"455 $echo "host: $host" 174 456 if test "$build_libtool_libs" = yes; then 175 echo "enable shared libraries"457 $echo "enable shared libraries" 176 458 else 177 echo "disable shared libraries"459 $echo "disable shared libraries" 178 460 fi 179 461 if test "$build_old_libs" = yes; then 180 echo "enable static libraries"462 $echo "enable static libraries" 181 463 else 182 echo "disable static libraries"464 $echo "disable static libraries" 183 465 fi 184 exit 0466 exit $EXIT_SUCCESS 185 467 ;; 186 468 … … 194 476 --quiet | --silent) 195 477 show=: 478 preserve_args="$preserve_args $arg" 479 ;; 480 481 --tag) prevopt="--tag" prev=tag ;; 482 --tag=*) 483 set tag "$optarg" ${1+"$@"} 484 shift 485 prev=tag 486 preserve_args="$preserve_args --tag" 196 487 ;; 197 488 … … 204 495 $echo "$modename: unrecognized option \`$arg'" 1>&2 205 496 $echo "$help" 1>&2 206 exit 1497 exit $EXIT_FAILURE 207 498 ;; 208 499 … … 217 508 $echo "$modename: option \`$prevopt' requires an argument" 1>&2 218 509 $echo "$help" 1>&2 219 exit 1510 exit $EXIT_FAILURE 220 511 fi 221 512 … … 229 520 # Infer the operation mode. 230 521 if test -z "$mode"; then 522 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 523 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 231 524 case $nonopt in 232 *cc | *++ | gcc* | *-gcc* | xlc*)525 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) 233 526 mode=link 234 527 for arg … … 271 564 $echo "$modename: unrecognized option \`-dlopen'" 1>&2 272 565 $echo "$help" 1>&2 273 exit 1566 exit $EXIT_FAILURE 274 567 fi 275 568 … … 285 578 # Get the compilation command and the source file. 286 579 base_compile= 287 prev= 288 lastarg= 289 srcfile="$nonopt" 580 srcfile="$nonopt" # always keep a non-empty value in "srcfile" 581 suppress_opt=yes 290 582 suppress_output= 291 292 user_target=no 583 arg_mode=normal 584 libobj= 585 later= 586 293 587 for arg 294 588 do 295 case $prev in 296 "") ;; 297 xcompiler) 298 # Aesthetically quote the previous argument. 299 prev= 300 lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 301 589 case "$arg_mode" in 590 arg ) 591 # do not "continue". Instead, add this to base_compile 592 lastarg="$arg" 593 arg_mode=normal 594 ;; 595 596 target ) 597 libobj="$arg" 598 arg_mode=normal 599 continue 600 ;; 601 602 normal ) 603 # Accept any command-line options. 302 604 case $arg in 303 # Double-quote args containing other shell metacharacters. 304 # Many Bourne shells cannot handle close brackets correctly 305 # in scan sets, so we specify it separately. 306 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 307 arg="\"$arg\"" 308 ;; 309 esac 310 311 # Add the previous argument to base_compile. 312 if test -z "$base_compile"; then 313 base_compile="$lastarg" 314 else 605 -o) 606 if test -n "$libobj" ; then 607 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 608 exit $EXIT_FAILURE 609 fi 610 arg_mode=target 611 continue 612 ;; 613 614 -static | -prefer-pic | -prefer-non-pic) 615 later="$later $arg" 616 continue 617 ;; 618 619 -no-suppress) 620 suppress_opt=no 621 continue 622 ;; 623 624 -Xcompiler) 625 arg_mode=arg # the next one goes into the "base_compile" arg list 626 continue # The current "srcfile" will either be retained or 627 ;; # replaced later. I would guess that would be a bug. 628 629 -Wc,*) 630 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 631 lastarg= 632 save_ifs="$IFS"; IFS=',' 633 for arg in $args; do 634 IFS="$save_ifs" 635 636 # Double-quote args containing other shell metacharacters. 637 # Many Bourne shells cannot handle close brackets correctly 638 # in scan sets, so we specify it separately. 639 case $arg in 640 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 641 arg="\"$arg\"" 642 ;; 643 esac 644 lastarg="$lastarg $arg" 645 done 646 IFS="$save_ifs" 647 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` 648 649 # Add the arguments to base_compile. 315 650 base_compile="$base_compile $lastarg" 316 fi 317 continue 318 ;; 319 esac 320 321 # Accept any command-line options. 322 case $arg in 323 -o) 324 if test "$user_target" != "no"; then 325 $echo "$modename: you cannot specify \`-o' more than once" 1>&2 326 exit 1 327 fi 328 user_target=next 329 ;; 330 331 -static) 332 build_old_libs=yes 333 continue 334 ;; 335 336 -prefer-pic) 337 pic_mode=yes 338 continue 339 ;; 340 341 -prefer-non-pic) 342 pic_mode=no 343 continue 344 ;; 345 346 -Xcompiler) 347 prev=xcompiler 348 continue 349 ;; 350 351 -Wc,*) 352 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` 353 lastarg= 354 save_ifs="$IFS"; IFS=',' 355 for arg in $args; do 356 IFS="$save_ifs" 357 358 # Double-quote args containing other shell metacharacters. 359 # Many Bourne shells cannot handle close brackets correctly 360 # in scan sets, so we specify it separately. 361 case $arg in 362 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 363 arg="\"$arg\"" 364 ;; 365 esac 366 lastarg="$lastarg $arg" 367 done 368 IFS="$save_ifs" 369 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` 370 371 # Add the arguments to base_compile. 372 if test -z "$base_compile"; then 373 base_compile="$lastarg" 374 else 375 base_compile="$base_compile $lastarg" 376 fi 377 continue 378 ;; 379 esac 380 381 case $user_target in 382 next) 383 # The next one is the -o target name 384 user_target=yes 385 continue 386 ;; 387 yes) 388 # We got the output file 389 user_target=set 390 libobj="$arg" 391 continue 392 ;; 393 esac 394 395 # Accept the current argument as the source file. 396 lastarg="$srcfile" 397 srcfile="$arg" 651 continue 652 ;; 653 654 * ) 655 # Accept the current argument as the source file. 656 # The previous "srcfile" becomes the current argument. 657 # 658 lastarg="$srcfile" 659 srcfile="$arg" 660 ;; 661 esac # case $arg 662 ;; 663 esac # case $arg_mode 398 664 399 665 # Aesthetically quote the previous argument. 400 401 # Backslashify any backslashes, double quotes, and dollar signs.402 # These are the only characters that are still specially403 # interpreted inside of double-quoted scrings.404 666 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` 405 667 668 case $lastarg in 406 669 # Double-quote args containing other shell metacharacters. 407 670 # Many Bourne shells cannot handle close brackets correctly 408 671 # in scan sets, so we specify it separately. 409 case $lastarg in410 672 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 411 673 lastarg="\"$lastarg\"" … … 413 675 esac 414 676 415 # Add the previous argument to base_compile. 416 if test -z "$base_compile"; then 417 base_compile="$lastarg" 418 else 419 base_compile="$base_compile $lastarg" 420 fi 421 done 422 423 case $user_target in 424 set) 677 base_compile="$base_compile $lastarg" 678 done # for arg 679 680 case $arg_mode in 681 arg) 682 $echo "$modename: you must specify an argument for -Xcompile" 683 exit $EXIT_FAILURE 425 684 ;; 426 no)427 # Get the name of the library object.428 libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`685 target) 686 $echo "$modename: you must specify a target with \`-o'" 1>&2 687 exit $EXIT_FAILURE 429 688 ;; 430 689 *) 431 $echo "$modename: you must specify a target with \`-o'" 1>&2432 exit 1690 # Get the name of the library object. 691 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` 433 692 ;; 434 693 esac … … 436 695 # Recognize several different file suffixes. 437 696 # If the user specifies -o file.o, it is replaced with file.lo 438 xform='[cCFS fmso]'697 xform='[cCFSifmso]' 439 698 case $libobj in 440 699 *.ada) xform=ada ;; … … 444 703 *.c++) xform=c++ ;; 445 704 *.cc) xform=cc ;; 705 *.ii) xform=ii ;; 706 *.class) xform=class ;; 446 707 *.cpp) xform=cpp ;; 447 708 *.cxx) xform=cxx ;; 448 709 *.f90) xform=f90 ;; 449 710 *.for) xform=for ;; 711 *.java) xform=java ;; 450 712 esac 451 713 … … 456 718 *) 457 719 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 458 exit 1720 exit $EXIT_FAILURE 459 721 ;; 460 722 esac 723 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 741 ;; 742 esac 743 done 744 745 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` 746 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 747 if test "X$xdir" = "X$obj"; then 748 xdir= 749 else 750 xdir=$xdir/ 751 fi 752 lobj=${xdir}$objdir/$objname 461 753 462 754 if test -z "$base_compile"; then 463 755 $echo "$modename: you must specify a compilation command" 1>&2 464 756 $echo "$help" 1>&2 465 exit 1757 exit $EXIT_FAILURE 466 758 fi 467 759 468 760 # Delete any leftover library objects. 469 761 if test "$build_old_libs" = yes; then 470 removelist="$obj $l ibobj"762 removelist="$obj $lobj $libobj ${libobj}T" 471 763 else 472 removelist="$l ibobj"764 removelist="$lobj $libobj ${libobj}T" 473 765 fi 474 766 475 767 $run $rm $removelist 476 trap "$run $rm $removelist; exit 1" 1 2 15768 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 477 769 478 770 # On Cygwin there's no "real" PIC flag so we must build both object types … … 493 785 lockfile="$output_obj.lock" 494 786 removelist="$removelist $output_obj $lockfile" 495 trap "$run $rm $removelist; exit 1" 1 2 15787 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 496 788 else 789 output_obj= 497 790 need_locks=no 498 791 lockfile= … … 502 795 # We use this script file to make the link, it avoids creating a new file 503 796 if test "$need_locks" = yes; then 504 until $run ln "$ 0" "$lockfile" 2>/dev/null; do797 until $run ln "$progpath" "$lockfile" 2>/dev/null; do 505 798 $show "Waiting for $lockfile to be removed" 506 799 sleep 2 … … 508 801 elif test "$need_locks" = warn; then 509 802 if test -f "$lockfile"; then 510 echo "\803 $echo "\ 511 804 *** ERROR, $lockfile exists and contains: 512 805 `cat $lockfile 2>/dev/null` … … 520 813 521 814 $run $rm $removelist 522 exit 1523 fi 524 echo $srcfile > "$lockfile"815 exit $EXIT_FAILURE 816 fi 817 $echo $srcfile > "$lockfile" 525 818 fi 526 819 … … 528 821 eval srcfile=\"$fix_srcfile_path\" 529 822 fi 823 824 $run $rm "$libobj" "${libobj}T" 825 826 # Create a libtool object file (analogous to a ".la" file), 827 # but don't create it if we're doing a dry run. 828 test -z "$run" && cat > ${libobj}T <<EOF 829 # $libobj - a libtool object file 830 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 831 # 832 # Please DO NOT delete this file! 833 # It is necessary for linking the library. 834 835 # Name of the PIC object. 836 EOF 530 837 531 838 # Only build a PIC object if we are building libtool libraries. … … 535 842 536 843 if test "$pic_mode" != no; then 537 # All platforms use -DPIC, to notify preprocessed assembler code. 538 command="$base_compile $srcfile $pic_flag -DPIC" 844 command="$base_compile $srcfile $pic_flag" 539 845 else 540 846 # Don't build PIC code 541 847 command="$base_compile $srcfile" 542 848 fi 543 if test "$build_old_libs" = yes; then 544 lo_libobj="$libobj" 545 dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'` 546 if test "X$dir" = "X$libobj"; then 547 dir="$objdir" 548 else 549 dir="$dir/$objdir" 550 fi 551 libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'` 552 553 if test -d "$dir"; then 554 $show "$rm $libobj" 555 $run $rm $libobj 556 else 557 $show "$mkdir $dir" 558 $run $mkdir $dir 559 status=$? 560 if test $status -ne 0 && test ! -d $dir; then 561 exit $status 562 fi 563 fi 564 fi 565 if test "$compiler_o_lo" = yes; then 566 output_obj="$libobj" 567 command="$command -o $output_obj" 568 elif test "$compiler_c_o" = yes; then 569 output_obj="$obj" 570 command="$command -o $output_obj" 571 fi 572 573 $run $rm "$output_obj" 849 850 if test ! -d "${xdir}$objdir"; then 851 $show "$mkdir ${xdir}$objdir" 852 $run $mkdir ${xdir}$objdir 853 status=$? 854 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then 855 exit $status 856 fi 857 fi 858 859 if test -z "$output_obj"; then 860 # Place PIC objects in $objdir 861 command="$command -o $lobj" 862 fi 863 864 $run $rm "$lobj" "$output_obj" 865 574 866 $show "$command" 575 867 if $run eval "$command"; then : 576 868 else 577 869 test -n "$output_obj" && $run $rm $removelist 578 exit 1870 exit $EXIT_FAILURE 579 871 fi 580 872 581 873 if test "$need_locks" = warn && 582 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then583 echo "\874 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 875 $echo "\ 584 876 *** ERROR, $lockfile contains: 585 877 `cat $lockfile 2>/dev/null` … … 596 888 597 889 $run $rm $removelist 598 exit 1890 exit $EXIT_FAILURE 599 891 fi 600 892 601 893 # Just move the object if needed, then go on to compile the next one 602 if test x"$output_obj" != x"$libobj"; then603 $show "$mv $output_obj $l ibobj"604 if $run $mv $output_obj $l ibobj; then :894 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then 895 $show "$mv $output_obj $lobj" 896 if $run $mv $output_obj $lobj; then : 605 897 else 606 898 error=$? … … 610 902 fi 611 903 612 # If we have no pic_flag, then copy the object into place and finish. 613 if (test -z "$pic_flag" || test "$pic_mode" != default) && 614 test "$build_old_libs" = yes; then 615 # Rename the .lo from within objdir to obj 616 if test -f $obj; then 617 $show $rm $obj 618 $run $rm $obj 619 fi 620 621 $show "$mv $libobj $obj" 622 if $run $mv $libobj $obj; then : 623 else 624 error=$? 625 $run $rm $removelist 626 exit $error 627 fi 628 629 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` 630 if test "X$xdir" = "X$obj"; then 631 xdir="." 632 else 633 xdir="$xdir" 634 fi 635 baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"` 636 libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` 637 # Now arrange that obj and lo_libobj become the same file 638 $show "(cd $xdir && $LN_S $baseobj $libobj)" 639 if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then 640 # Unlock the critical section if it was locked 641 if test "$need_locks" != no; then 642 $run $rm "$lockfile" 643 fi 644 exit 0 645 else 646 error=$? 647 $run $rm $removelist 648 exit $error 649 fi 650 fi 904 # Append the name of the PIC object to the libtool object file. 905 test -z "$run" && cat >> ${libobj}T <<EOF 906 pic_object='$objdir/$objname' 907 908 EOF 651 909 652 910 # Allow error messages only from the first compilation. 653 suppress_output=' >/dev/null 2>&1' 911 if test "$suppress_opt" = yes; then 912 suppress_output=' >/dev/null 2>&1' 913 fi 914 else 915 # No PIC object so indicate it doesn't exist in the libtool 916 # object file. 917 test -z "$run" && cat >> ${libobj}T <<EOF 918 pic_object=none 919 920 EOF 654 921 fi 655 922 … … 660 927 command="$base_compile $srcfile" 661 928 else 662 # All platforms use -DPIC, to notify preprocessed assembler code. 663 command="$base_compile $srcfile $pic_flag -DPIC" 929 command="$base_compile $srcfile $pic_flag" 664 930 fi 665 931 if test "$compiler_c_o" = yes; then 666 932 command="$command -o $obj" 667 output_obj="$obj"668 933 fi 669 934 670 935 # Suppress compiler output if we already did a PIC compilation. 671 936 command="$command$suppress_output" 672 $run $rm "$o utput_obj"937 $run $rm "$obj" "$output_obj" 673 938 $show "$command" 674 939 if $run eval "$command"; then : 675 940 else 676 941 $run $rm $removelist 677 exit 1942 exit $EXIT_FAILURE 678 943 fi 679 944 680 945 if test "$need_locks" = warn && 681 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then682 echo "\946 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then 947 $echo "\ 683 948 *** ERROR, $lockfile contains: 684 949 `cat $lockfile 2>/dev/null` … … 695 960 696 961 $run $rm $removelist 697 exit 1962 exit $EXIT_FAILURE 698 963 fi 699 964 700 965 # Just move the object if needed 701 if test x"$output_obj" != x"$obj"; then966 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then 702 967 $show "$mv $output_obj $obj" 703 968 if $run $mv $output_obj $obj; then : … … 709 974 fi 710 975 711 # Create an invalid libtool object if no PIC, so that we do not712 # accidentally link it into a program.713 if test "$build_libtool_libs" != yes; then714 $show "echo timestamp > $libobj" 715 $run eval "echo timestamp > \$libobj" || exit $? 716 else 717 # Move the .lo from within objdir 718 $show "$mv $libobj $lo_libobj" 719 if $run $mv $libobj $lo_libobj; then : 720 else 721 error=$? 722 $run $rm $removelist 723 exit $error 724 fi 725 fi 976 # Append the name of the non-PIC object the libtool object file. 977 # Only append if the libtool object file exists. 978 test -z "$run" && cat >> ${libobj}T <<EOF 979 # Name of the non-PIC object. 980 non_pic_object='$objname' 981 982 EOF 983 else 984 # Append the name of the non-PIC object the libtool object file. 985 # Only append if the libtool object file exists. 986 test -z "$run" && cat >> ${libobj}T <<EOF 987 # Name of the non-PIC object. 988 non_pic_object=none 989 990 EOF 726 991 fi 992 993 $run $mv "${libobj}T" "${libobj}" 727 994 728 995 # Unlock the critical section if it was locked … … 731 998 fi 732 999 733 exit 01000 exit $EXIT_SUCCESS 734 1001 ;; 735 1002 … … 742 1009 # we shouldn't force the makefile maintainer to figure out 743 1010 # which system we are compiling for in order to pass an extra 744 # flag for every libtool invo kation.1011 # flag for every libtool invocation. 745 1012 # allow_undefined=no 746 1013 … … 757 1024 esac 758 1025 libtool_args="$nonopt" 1026 base_compile="$nonopt $@" 759 1027 compile_command="$nonopt" 760 1028 finalize_command="$nonopt" … … 787 1055 no_install=no 788 1056 objs= 1057 non_pic_objects= 1058 precious_files_regex= 789 1059 prefer_static_libs=no 790 1060 preload=no … … 798 1068 thread_safe=no 799 1069 vinfo= 1070 vinfo_number=no 1071 1072 func_infer_tag $base_compile 800 1073 801 1074 # We need to know -static, to get the right output filenames. … … 828 1101 829 1102 # Go through the arguments, transforming them on the way. 830 while test $#-gt 0; do1103 while test "$#" -gt 0; do 831 1104 arg="$1" 832 1105 shift … … 893 1166 if test ! -f "$arg"; then 894 1167 $echo "$modename: symbol file \`$arg' does not exist" 895 exit 11168 exit $EXIT_FAILURE 896 1169 fi 897 1170 prev= … … 903 1176 continue 904 1177 ;; 905 inst_prefix)1178 inst_prefix) 906 1179 inst_prefix_dir="$arg" 907 1180 prev= 908 1181 continue 909 1182 ;; 1183 precious_regex) 1184 precious_files_regex="$arg" 1185 prev= 1186 continue 1187 ;; 910 1188 release) 911 1189 release="-$arg" 1190 prev= 1191 continue 1192 ;; 1193 objectlist) 1194 if test -f "$arg"; then 1195 save_arg=$arg 1196 moreargs= 1197 for fil in `cat $save_arg` 1198 do 1199 # moreargs="$moreargs $fil" 1200 arg=$fil 1201 # A libtool-controlled object. 1202 1203 # Check to see that this really is a libtool object. 1204 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 1205 pic_object= 1206 non_pic_object= 1207 1208 # Read the .lo file 1209 # If there is no directory component, then add one. 1210 case $arg in 1211 */* | *\\*) . $arg ;; 1212 *) . ./$arg ;; 1213 esac 1214 1215 if test -z "$pic_object" || \ 1216 test -z "$non_pic_object" || 1217 test "$pic_object" = none && \ 1218 test "$non_pic_object" = none; then 1219 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1220 exit $EXIT_FAILURE 1221 fi 1222 1223 # Extract subdirectory from the argument. 1224 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1225 if test "X$xdir" = "X$arg"; then 1226 xdir= 1227 else 1228 xdir="$xdir/" 1229 fi 1230 1231 if test "$pic_object" != none; then 1232 # Prepend the subdirectory the object is found in. 1233 pic_object="$xdir$pic_object" 1234 1235 if test "$prev" = dlfiles; then 1236 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1237 dlfiles="$dlfiles $pic_object" 1238 prev= 1239 continue 1240 else 1241 # If libtool objects are unsupported, then we need to preload. 1242 prev=dlprefiles 1243 fi 1244 fi 1245 1246 # CHECK ME: I think I busted this. -Ossama 1247 if test "$prev" = dlprefiles; then 1248 # Preload the old-style object. 1249 dlprefiles="$dlprefiles $pic_object" 1250 prev= 1251 fi 1252 1253 # A PIC object. 1254 libobjs="$libobjs $pic_object" 1255 arg="$pic_object" 1256 fi 1257 1258 # Non-PIC object. 1259 if test "$non_pic_object" != none; then 1260 # Prepend the subdirectory the object is found in. 1261 non_pic_object="$xdir$non_pic_object" 1262 1263 # A standard non-PIC object 1264 non_pic_objects="$non_pic_objects $non_pic_object" 1265 if test -z "$pic_object" || test "$pic_object" = none ; then 1266 arg="$non_pic_object" 1267 fi 1268 fi 1269 else 1270 # Only an error if not doing a dry-run. 1271 if test -z "$run"; then 1272 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1273 exit $EXIT_FAILURE 1274 else 1275 # Dry-run case. 1276 1277 # Extract subdirectory from the argument. 1278 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1279 if test "X$xdir" = "X$arg"; then 1280 xdir= 1281 else 1282 xdir="$xdir/" 1283 fi 1284 1285 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1286 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1287 libobjs="$libobjs $pic_object" 1288 non_pic_objects="$non_pic_objects $non_pic_object" 1289 fi 1290 fi 1291 done 1292 else 1293 $echo "$modename: link input file \`$save_arg' does not exist" 1294 exit $EXIT_FAILURE 1295 fi 1296 arg=$save_arg 912 1297 prev= 913 1298 continue … … 919 1304 *) 920 1305 $echo "$modename: only absolute run-paths are allowed" 1>&2 921 exit 11306 exit $EXIT_FAILURE 922 1307 ;; 923 1308 esac … … 951 1336 continue 952 1337 ;; 1338 xcclinker) 1339 linker_flags="$linker_flags $qarg" 1340 compiler_flags="$compiler_flags $qarg" 1341 prev= 1342 compile_command="$compile_command $qarg" 1343 finalize_command="$finalize_command $qarg" 1344 continue 1345 ;; 1346 shrext) 1347 shrext_cmds="$arg" 1348 prev= 1349 continue 1350 ;; 953 1351 *) 954 1352 eval "$prev=\"\$arg\"" … … 957 1355 ;; 958 1356 esac 959 fi # test -n $prev1357 fi # test -n "$prev" 960 1358 961 1359 prevarg="$arg" … … 999 1397 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then 1000 1398 $echo "$modename: more than one -exported-symbols argument is not allowed" 1001 exit 11399 exit $EXIT_FAILURE 1002 1400 fi 1003 1401 if test "X$arg" = "X-export-symbols"; then … … 1018 1416 -L[A-Z][A-Z]*:*) 1019 1417 case $with_gcc/$host in 1020 no/*-*-irix* | no/*-*-nonstopux*)1418 no/*-*-irix* | /*-*-irix*) 1021 1419 compile_command="$compile_command $arg" 1022 1420 finalize_command="$finalize_command $arg" … … 1035 1433 if test -z "$absdir"; then 1036 1434 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 1037 exit 11435 exit $EXIT_FAILURE 1038 1436 fi 1039 1437 dir="$absdir" … … 1073 1471 test "X$arg" = "X-lc" && continue 1074 1472 ;; 1473 *-*-rhapsody* | *-*-darwin1.[012]) 1474 # Rhapsody C and math libraries are in the System framework 1475 deplibs="$deplibs -framework System" 1476 continue 1075 1477 esac 1076 elif test "X$arg" = "X-lc_r"; then1077 case $host in1478 elif test "X$arg" = "X-lc_r"; then 1479 case $host in 1078 1480 *-*-openbsd* | *-*-freebsd*) 1079 # Do not include libc_r directly, use -pthread flag.1080 continue1081 ;;1082 esac1481 # Do not include libc_r directly, use -pthread flag. 1482 continue 1483 ;; 1484 esac 1083 1485 fi 1084 1486 deplibs="$deplibs $arg" … … 1086 1488 ;; 1087 1489 1490 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) 1491 deplibs="$deplibs $arg" 1492 continue 1493 ;; 1494 1088 1495 -module) 1089 1496 module=yes 1497 continue 1498 ;; 1499 1500 # gcc -m* arguments should be passed to the linker via $compiler_flags 1501 # in order to pass architecture information to the linker 1502 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo 1503 # but this is not reliable with gcc because gcc may use -mfoo to 1504 # select a different linker, different libraries, etc, while 1505 # -Wl,-mfoo simply passes -mfoo to the linker. 1506 -m*) 1507 # Unknown arguments in both finalize_command and compile_command need 1508 # to be aesthetically quoted because they are evaled later. 1509 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` 1510 case $arg in 1511 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1512 arg="\"$arg\"" 1513 ;; 1514 esac 1515 compile_command="$compile_command $arg" 1516 finalize_command="$finalize_command $arg" 1517 if test "$with_gcc" = "yes" ; then 1518 compiler_flags="$compiler_flags $arg" 1519 fi 1520 continue 1521 ;; 1522 1523 -shrext) 1524 prev=shrext 1090 1525 continue 1091 1526 ;; … … 1115 1550 ;; 1116 1551 1552 -objectlist) 1553 prev=objectlist 1554 continue 1555 ;; 1556 1117 1557 -o) prev=output ;; 1558 1559 -precious-files-regex) 1560 prev=precious_regex 1561 continue 1562 ;; 1118 1563 1119 1564 -release) … … 1139 1584 *) 1140 1585 $echo "$modename: only absolute run-paths are allowed" 1>&2 1141 exit 11586 exit $EXIT_FAILURE 1142 1587 ;; 1143 1588 esac … … 1165 1610 -version-info) 1166 1611 prev=vinfo 1612 continue 1613 ;; 1614 -version-number) 1615 prev=vinfo 1616 vinfo_number=yes 1167 1617 continue 1168 1618 ;; … … 1215 1665 ;; 1216 1666 1667 -XCClinker) 1668 prev=xcclinker 1669 continue 1670 ;; 1671 1217 1672 # Some other compiler flag. 1218 1673 -* | +*) … … 1227 1682 ;; 1228 1683 1229 *.lo | *.$objext) 1230 # A library or standard object. 1231 if test "$prev" = dlfiles; then 1232 # This file was specified with -dlopen. 1233 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1234 dlfiles="$dlfiles $arg" 1235 prev= 1236 continue 1684 *.$objext) 1685 # A standard object. 1686 objs="$objs $arg" 1687 ;; 1688 1689 *.lo) 1690 # A libtool-controlled object. 1691 1692 # Check to see that this really is a libtool object. 1693 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 1694 pic_object= 1695 non_pic_object= 1696 1697 # Read the .lo file 1698 # If there is no directory component, then add one. 1699 case $arg in 1700 */* | *\\*) . $arg ;; 1701 *) . ./$arg ;; 1702 esac 1703 1704 if test -z "$pic_object" || \ 1705 test -z "$non_pic_object" || 1706 test "$pic_object" = none && \ 1707 test "$non_pic_object" = none; then 1708 $echo "$modename: cannot find name of object for \`$arg'" 1>&2 1709 exit $EXIT_FAILURE 1710 fi 1711 1712 # Extract subdirectory from the argument. 1713 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1714 if test "X$xdir" = "X$arg"; then 1715 xdir= 1716 else 1717 xdir="$xdir/" 1718 fi 1719 1720 if test "$pic_object" != none; then 1721 # Prepend the subdirectory the object is found in. 1722 pic_object="$xdir$pic_object" 1723 1724 if test "$prev" = dlfiles; then 1725 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then 1726 dlfiles="$dlfiles $pic_object" 1727 prev= 1728 continue 1729 else 1730 # If libtool objects are unsupported, then we need to preload. 1731 prev=dlprefiles 1732 fi 1733 fi 1734 1735 # CHECK ME: I think I busted this. -Ossama 1736 if test "$prev" = dlprefiles; then 1737 # Preload the old-style object. 1738 dlprefiles="$dlprefiles $pic_object" 1739 prev= 1740 fi 1741 1742 # A PIC object. 1743 libobjs="$libobjs $pic_object" 1744 arg="$pic_object" 1745 fi 1746 1747 # Non-PIC object. 1748 if test "$non_pic_object" != none; then 1749 # Prepend the subdirectory the object is found in. 1750 non_pic_object="$xdir$non_pic_object" 1751 1752 # A standard non-PIC object 1753 non_pic_objects="$non_pic_objects $non_pic_object" 1754 if test -z "$pic_object" || test "$pic_object" = none ; then 1755 arg="$non_pic_object" 1756 fi 1757 fi 1758 else 1759 # Only an error if not doing a dry-run. 1760 if test -z "$run"; then 1761 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 1762 exit $EXIT_FAILURE 1237 1763 else 1238 # If libtool objects are unsupported, then we need to preload. 1239 prev=dlprefiles 1240 fi 1241 fi 1242 1243 if test "$prev" = dlprefiles; then 1244 # Preload the old-style object. 1245 dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"` 1246 prev= 1247 else 1248 case $arg in 1249 *.lo) libobjs="$libobjs $arg" ;; 1250 *) objs="$objs $arg" ;; 1251 esac 1764 # Dry-run case. 1765 1766 # Extract subdirectory from the argument. 1767 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` 1768 if test "X$xdir" = "X$arg"; then 1769 xdir= 1770 else 1771 xdir="$xdir/" 1772 fi 1773 1774 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` 1775 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` 1776 libobjs="$libobjs $pic_object" 1777 non_pic_objects="$non_pic_objects $non_pic_object" 1778 fi 1252 1779 fi 1253 1780 ;; … … 1300 1827 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 1301 1828 $echo "$help" 1>&2 1302 exit 11829 exit $EXIT_FAILURE 1303 1830 fi 1304 1831 … … 1309 1836 fi 1310 1837 1838 oldlibs= 1311 1839 # calculate the name of the file, without its directory 1312 1840 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` … … 1329 1857 fi 1330 1858 # Create the object directory. 1331 if test ! -d $output_objdir; then1859 if test ! -d "$output_objdir"; then 1332 1860 $show "$mkdir $output_objdir" 1333 1861 $run $mkdir $output_objdir 1334 1862 status=$? 1335 if test $status -ne 0 && test ! -d $output_objdir; then1863 if test "$status" -ne 0 && test ! -d "$output_objdir"; then 1336 1864 exit $status 1337 1865 fi … … 1343 1871 $echo "$modename: you must specify an output file" 1>&2 1344 1872 $echo "$help" 1>&2 1345 exit 11873 exit $EXIT_FAILURE 1346 1874 ;; 1347 1875 *.$libext) linkmode=oldlib ;; … … 1351 1879 esac 1352 1880 1881 case $host in 1882 *cygwin* | *mingw* | *pw32*) 1883 # don't eliminate duplications in $postdeps and $predeps 1884 duplicate_compiler_generated_deps=yes 1885 ;; 1886 *) 1887 duplicate_compiler_generated_deps=$duplicate_deps 1888 ;; 1889 esac 1353 1890 specialdeplibs= 1891 1354 1892 libs= 1355 1893 # Find all interdependent deplibs by searching for libraries … … 1363 1901 libs="$libs $deplib" 1364 1902 done 1903 1904 if test "$linkmode" = lib; then 1905 libs="$predeps $libs $compiler_lib_search_path $postdeps" 1906 1907 # Compute libraries that are listed more than once in $predeps 1908 # $postdeps and mark them as special (i.e., whose duplicates are 1909 # not to be eliminated). 1910 pre_post_deps= 1911 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then 1912 for pre_post_dep in $predeps $postdeps; do 1913 case "$pre_post_deps " in 1914 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; 1915 esac 1916 pre_post_deps="$pre_post_deps $pre_post_dep" 1917 done 1918 fi 1919 pre_post_deps= 1920 fi 1921 1365 1922 deplibs= 1366 1923 newdependency_libs= … … 1377 1934 *) 1378 1935 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 1379 exit 11936 exit $EXIT_FAILURE 1380 1937 ;; 1381 1938 esac … … 1394 1951 esac 1395 1952 for pass in $passes; do 1396 if test $linkmode = prog; then 1397 # Determine which files to process 1953 if test "$linkmode,$pass" = "lib,link" || 1954 test "$linkmode,$pass" = "prog,scan"; then 1955 libs="$deplibs" 1956 deplibs= 1957 fi 1958 if test "$linkmode" = prog; then 1398 1959 case $pass in 1399 dlopen) 1400 libs="$dlfiles" 1401 save_deplibs="$deplibs" # Collect dlpreopened libraries 1402 deplibs= 1403 ;; 1960 dlopen) libs="$dlfiles" ;; 1404 1961 dlpreopen) libs="$dlprefiles" ;; 1405 1962 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; 1406 1963 esac 1964 fi 1965 if test "$pass" = dlopen; then 1966 # Collect dlpreopened libraries 1967 save_deplibs="$deplibs" 1968 deplibs= 1407 1969 fi 1408 1970 for deplib in $libs; do … … 1410 1972 found=no 1411 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 ;; 1412 1983 -l*) 1413 if test $linkmode = oldlib && test $linkmode = obj; then1414 $echo "$modename: warning: \`-l' is ignored for archives/objects : $deplib" 1>&21984 if test "$linkmode" != lib && test "$linkmode" != prog; then 1985 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 1415 1986 continue 1416 1987 fi 1417 if test $pass= conv; then1988 if test "$pass" = conv; then 1418 1989 deplibs="$deplib $deplibs" 1419 1990 continue … … 1421 1992 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` 1422 1993 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do 1423 # Search the libtool library 1424 lib="$searchdir/lib${name}.la" 1425 if test -f "$lib"; then 1426 found=yes 1427 break 1428 fi 1994 for search_ext in .la $std_shrext .so .a; do 1995 # Search the libtool library 1996 lib="$searchdir/lib${name}${search_ext}" 1997 if test -f "$lib"; then 1998 if test "$search_ext" = ".la"; then 1999 found=yes 2000 else 2001 found=no 2002 fi 2003 break 2 2004 fi 2005 done 1429 2006 done 1430 2007 if test "$found" != yes; then … … 1435 2012 else 1436 2013 deplibs="$deplib $deplibs" 1437 test $linkmode= lib && newdependency_libs="$deplib $newdependency_libs"2014 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 1438 2015 fi 1439 2016 continue 2017 else # deplib is a libtool library 2018 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, 2019 # We need to do some special things here, and not later. 2020 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 2021 case " $predeps $postdeps " in 2022 *" $deplib "*) 2023 if (${SED} -e '2q' $lib | 2024 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 2025 library_names= 2026 old_library= 2027 case $lib in 2028 */* | *\\*) . $lib ;; 2029 *) . ./$lib ;; 2030 esac 2031 for l in $old_library $library_names; do 2032 ll="$l" 2033 done 2034 if test "X$ll" = "X$old_library" ; then # only static version available 2035 found=no 2036 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` 2037 test "X$ladir" = "X$lib" && ladir="." 2038 lib=$ladir/$old_library 2039 if test "$linkmode,$pass" = "prog,link"; then 2040 compile_deplibs="$deplib $compile_deplibs" 2041 finalize_deplibs="$deplib $finalize_deplibs" 2042 else 2043 deplibs="$deplib $deplibs" 2044 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" 2045 fi 2046 continue 2047 fi 2048 fi 2049 ;; 2050 *) ;; 2051 esac 2052 fi 1440 2053 fi 1441 2054 ;; # -l … … 1444 2057 lib) 1445 2058 deplibs="$deplib $deplibs" 1446 test $pass= conv && continue2059 test "$pass" = conv && continue 1447 2060 newdependency_libs="$deplib $newdependency_libs" 1448 2061 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1449 2062 ;; 1450 2063 prog) 1451 if test $pass= conv; then2064 if test "$pass" = conv; then 1452 2065 deplibs="$deplib $deplibs" 1453 2066 continue 1454 2067 fi 1455 if test $pass= scan; then2068 if test "$pass" = scan; then 1456 2069 deplibs="$deplib $deplibs" 1457 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`1458 2070 else 1459 2071 compile_deplibs="$deplib $compile_deplibs" 1460 2072 finalize_deplibs="$deplib $finalize_deplibs" 1461 2073 fi 2074 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` 1462 2075 ;; 1463 2076 *) 1464 $echo "$modename: warning: \`-L' is ignored for archives/objects : $deplib" 1>&22077 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 1465 2078 ;; 1466 2079 esac # linkmode … … 1468 2081 ;; # -L 1469 2082 -R*) 1470 if test $pass= link; then2083 if test "$pass" = link; then 1471 2084 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` 1472 2085 # Make sure the xrpath contains only unique directories. … … 1481 2094 *.la) lib="$deplib" ;; 1482 2095 *.$libext) 1483 if test $pass= conv; then2096 if test "$pass" = conv; then 1484 2097 deplibs="$deplib $deplibs" 1485 2098 continue … … 1487 2100 case $linkmode in 1488 2101 lib) 1489 if test "$deplibs_check_method" != pass_all; then 1490 echo 1491 echo "*** Warning: Trying to link with static lib archive $deplib." 1492 echo "*** I have the capability to make that library automatically link in when" 1493 echo "*** you link to this library. But I can only do this if you have a" 1494 echo "*** shared version of the library, which you do not appear to have" 1495 echo "*** because the file extensions .$libext of this argument makes me believe" 1496 echo "*** that it is just a static archive that I should not used here." 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 2118 $echo 2119 $echo "*** Warning: Trying to link with static lib archive $deplib." 2120 $echo "*** I have the capability to make that library automatically link in when" 2121 $echo "*** you link to this library. But I can only do this if you have a" 2122 $echo "*** shared version of the library, which you do not appear to have" 2123 $echo "*** because the file extensions .$libext of this argument makes me believe" 2124 $echo "*** that it is just a static archive that I should not used here." 1497 2125 else 1498 echo1499 echo "*** Warning: Linking the shared library $output against the"1500 echo "*** static library $deplib is not portable!"2126 $echo 2127 $echo "*** Warning: Linking the shared library $output against the" 2128 $echo "*** static library $deplib is not portable!" 1501 2129 deplibs="$deplib $deplibs" 1502 2130 fi … … 1504 2132 ;; 1505 2133 prog) 1506 if test $pass!= link; then2134 if test "$pass" != link; then 1507 2135 deplibs="$deplib $deplibs" 1508 2136 else … … 1515 2143 ;; # *.$libext 1516 2144 *.lo | *.$objext) 1517 if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 1518 # If there is no dlopen support or we're linking statically, 1519 # we need to preload. 1520 newdlprefiles="$newdlprefiles $deplib" 1521 compile_deplibs="$deplib $compile_deplibs" 1522 finalize_deplibs="$deplib $finalize_deplibs" 1523 else 1524 newdlfiles="$newdlfiles $deplib" 2145 if test "$pass" = conv; then 2146 deplibs="$deplib $deplibs" 2147 elif test "$linkmode" = prog; then 2148 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then 2149 # If there is no dlopen support or we're linking statically, 2150 # we need to preload. 2151 newdlprefiles="$newdlprefiles $deplib" 2152 compile_deplibs="$deplib $compile_deplibs" 2153 finalize_deplibs="$deplib $finalize_deplibs" 2154 else 2155 newdlfiles="$newdlfiles $deplib" 2156 fi 1525 2157 fi 1526 2158 continue … … 1531 2163 ;; 1532 2164 esac # case $deplib 1533 if test $found= yes || test -f "$lib"; then :2165 if test "$found" = yes || test -f "$lib"; then : 1534 2166 else 1535 2167 $echo "$modename: cannot find the library \`$lib'" 1>&2 1536 exit 12168 exit $EXIT_FAILURE 1537 2169 fi 1538 2170 1539 2171 # Check to see that this really is a libtool archive. 1540 if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :2172 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 1541 2173 else 1542 2174 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 1543 exit 12175 exit $EXIT_FAILURE 1544 2176 fi 1545 2177 … … 1554 2186 old_library= 1555 2187 # If the library was installed with an old release of libtool, 1556 # it will not redefine variable installed.2188 # it will not redefine variables installed, or shouldnotlink 1557 2189 installed=yes 2190 shouldnotlink=no 1558 2191 1559 2192 # Read the .la file … … 1565 2198 if test "$linkmode,$pass" = "lib,link" || 1566 2199 test "$linkmode,$pass" = "prog,scan" || 1567 { test $linkmode = oldlib && test $linkmode = obj; }; then 1568 # Add dl[pre]opened files of deplib 2200 { test "$linkmode" != prog && test "$linkmode" != lib; }; then 1569 2201 test -n "$dlopen" && dlfiles="$dlfiles $dlopen" 1570 2202 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" 1571 2203 fi 1572 2204 1573 if test $pass= conv; then2205 if test "$pass" = conv; then 1574 2206 # Only check for convenience libraries 1575 2207 deplibs="$lib $deplibs" … … 1577 2209 if test -z "$old_library"; then 1578 2210 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 1579 exit 12211 exit $EXIT_FAILURE 1580 2212 fi 1581 2213 # It is a libtool convenience library, so add in its objects. … … 1592 2224 tmp_libs="$tmp_libs $deplib" 1593 2225 done 1594 elif test $linkmode != prog && test $linkmode!= lib; then2226 elif test "$linkmode" != prog && test "$linkmode" != lib; then 1595 2227 $echo "$modename: \`$lib' is not a convenience library" 1>&2 1596 exit 12228 exit $EXIT_FAILURE 1597 2229 fi 1598 2230 continue 1599 2231 fi # $pass = conv 2232 1600 2233 1601 2234 # Get the name of the library we link against. … … 1606 2239 if test -z "$linklib"; then 1607 2240 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 1608 exit 12241 exit $EXIT_FAILURE 1609 2242 fi 1610 2243 1611 2244 # This library was specified with -dlopen. 1612 if test $pass= dlopen; then2245 if test "$pass" = dlopen; then 1613 2246 if test -z "$libdir"; then 1614 2247 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 1615 exit 1 1616 fi 1617 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 1618 2253 # If there is no dlname, no dlopen support or we're linking 1619 # statically, we need to preload. 1620 dlprefiles="$dlprefiles $lib" 2254 # statically, we need to preload. We also need to preload any 2255 # dependent libraries so libltdl's deplib preloader doesn't 2256 # bomb out in the load deplibs phase. 2257 dlprefiles="$dlprefiles $lib $dependency_libs" 1621 2258 else 1622 2259 newdlfiles="$newdlfiles $lib" … … 1651 2288 fi 1652 2289 else 1653 dir="$ladir/$objdir" 1654 absdir="$abs_ladir/$objdir" 1655 # Remove this search path later 1656 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 1657 2301 fi # $installed = yes 1658 2302 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 1659 2303 1660 2304 # This library was specified with -dlpreopen. 1661 if test $pass= dlpreopen; then2305 if test "$pass" = dlpreopen; then 1662 2306 if test -z "$libdir"; then 1663 2307 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 1664 exit 12308 exit $EXIT_FAILURE 1665 2309 fi 1666 2310 # Prefer using a static library (so that no silly _DYNAMIC symbols … … 1678 2322 if test -z "$libdir"; then 1679 2323 # Link the convenience library 1680 if test $linkmode= lib; then2324 if test "$linkmode" = lib; then 1681 2325 deplibs="$dir/$old_library $deplibs" 1682 2326 elif test "$linkmode,$pass" = "prog,link"; then … … 1684 2328 finalize_deplibs="$dir/$old_library $finalize_deplibs" 1685 2329 else 1686 deplibs="$lib $deplibs" 2330 deplibs="$lib $deplibs" # used for prog,scan pass 1687 2331 fi 1688 2332 continue 1689 2333 fi 1690 2334 1691 if test $linkmode = prog && test $pass != link; then 2335 2336 if test "$linkmode" = prog && test "$pass" != link; then 1692 2337 newlib_search_path="$newlib_search_path $ladir" 1693 2338 deplibs="$lib $deplibs" … … 1705 2350 esac 1706 2351 # Need to link against all dependency_libs? 1707 if test $linkalldeplibs= yes; then2352 if test "$linkalldeplibs" = yes; then 1708 2353 deplibs="$deplib $deplibs" 1709 2354 else … … 1722 2367 fi # $linkmode = prog... 1723 2368 1724 link_static=no # Whether the deplib will be linked statically 1725 if test -n "$library_names" && 1726 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1727 # Link against this shared library 1728 1729 if test "$linkmode,$pass" = "prog,link" || 1730 { test $linkmode = lib && test $hardcode_into_libs = yes; }; then 2369 if test "$linkmode,$pass" = "prog,link"; then 2370 if test -n "$library_names" && 2371 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 2372 # We need to hardcode the library path 2373 if test -n "$shlibpath_var"; then 2374 # Make sure the rpath contains only unique directories. 2375 case "$temp_rpath " in 2376 *" $dir "*) ;; 2377 *" $absdir "*) ;; 2378 *) temp_rpath="$temp_rpath $dir" ;; 2379 esac 2380 fi 2381 1731 2382 # Hardcode the library path. 1732 2383 # Skip directories that are in the system default run-time … … 1750 2401 ;; 1751 2402 esac 1752 if test $linkmode = prog; then1753 # We need to hardcode the library path1754 if test -n "$shlibpath_var"; then1755 # Make sure the rpath contains only unique directories.1756 case "$temp_rpath " in1757 *" $dir "*) ;;1758 *" $absdir "*) ;;1759 *) temp_rpath="$temp_rpath $dir" ;;1760 esac1761 fi1762 fi1763 2403 fi # $linkmode,$pass = prog,link... 1764 2404 … … 1770 2410 continue 1771 2411 fi 1772 2412 fi 2413 2414 link_static=no # Whether the deplib will be linked statically 2415 if test -n "$library_names" && 2416 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 1773 2417 if test "$installed" = no; then 1774 2418 notinst_deplibs="$notinst_deplibs $lib" 1775 2419 need_relink=yes 2420 fi 2421 # This is a shared library 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 2426 $echo 2427 if test "$linkmode" = prog; then 2428 $echo "*** Warning: Linking the executable $output against the loadable module" 2429 else 2430 $echo "*** Warning: Linking the shared library $output against the loadable module" 2431 fi 2432 $echo "*** $linklib is not portable!" 2433 fi 2434 if test "$linkmode" = lib && 2435 test "$hardcode_into_libs" = yes; then 2436 # Hardcode the library path. 2437 # Skip directories that are in the system default run-time 2438 # search path. 2439 case " $sys_lib_dlsearch_path " in 2440 *" $absdir "*) ;; 2441 *) 2442 case "$compile_rpath " in 2443 *" $absdir "*) ;; 2444 *) compile_rpath="$compile_rpath $absdir" 2445 esac 2446 ;; 2447 esac 2448 case " $sys_lib_dlsearch_path " in 2449 *" $libdir "*) ;; 2450 *) 2451 case "$finalize_rpath " in 2452 *" $libdir "*) ;; 2453 *) finalize_rpath="$finalize_rpath $libdir" 2454 esac 2455 ;; 2456 esac 1776 2457 fi 1777 2458 … … 1788 2469 # bleh windows 1789 2470 case $host in 1790 *cygwin* )2471 *cygwin* | mingw*) 1791 2472 major=`expr $current - $age` 1792 2473 versuffix="-$major" … … 1800 2481 # Make a new name for the extract_expsyms_cmds to use 1801 2482 soroot="$soname" 1802 soname=` echo $soroot | ${SED} -e 's/^.*\///'`1803 newlib="libimp-` echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"2483 soname=`$echo $soroot | ${SED} -e 's/^.*\///'` 2484 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" 1804 2485 1805 2486 # If the library has no export list, then create one now … … 1808 2489 $show "extracting exported symbol list from \`$soname'" 1809 2490 save_ifs="$IFS"; IFS='~' 1810 eval cmds=\"$extract_expsyms_cmds\"2491 cmds=$extract_expsyms_cmds 1811 2492 for cmd in $cmds; do 1812 2493 IFS="$save_ifs" 2494 eval cmd=\"$cmd\" 1813 2495 $show "$cmd" 1814 2496 $run eval "$cmd" || exit $? … … 1821 2503 $show "generating import library for \`$soname'" 1822 2504 save_ifs="$IFS"; IFS='~' 1823 eval cmds=\"$old_archive_from_expsyms_cmds\"2505 cmds=$old_archive_from_expsyms_cmds 1824 2506 for cmd in $cmds; do 1825 2507 IFS="$save_ifs" 2508 eval cmd=\"$cmd\" 1826 2509 $show "$cmd" 1827 2510 $run eval "$cmd" || exit $? … … 1832 2515 dir=$output_objdir 1833 2516 linklib=$newlib 1834 fi # test -n $old_archive_from_expsyms_cmds1835 1836 if test $linkmode= prog || test "$mode" != relink; then2517 fi # test -n "$old_archive_from_expsyms_cmds" 2518 2519 if test "$linkmode" = prog || test "$mode" != relink; then 1837 2520 add_shlibpath= 1838 2521 add_dir= … … 1843 2526 if test "$hardcode_direct" = no; then 1844 2527 add="$dir/$linklib" 2528 case $host in 2529 *-*-sco3.2v5* ) add_dir="-L$dir" ;; 2530 *-*-darwin* ) 2531 # if the lib is a module then we can not link against 2532 # it, someone is ignoring the new warnings I added 2533 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then 2534 $echo "** Warning, lib $linklib is a module, not a shared library" 2535 if test -z "$old_library" ; then 2536 $echo 2537 $echo "** And there doesn't seem to be a static archive available" 2538 $echo "** The link will probably fail, sorry" 2539 else 2540 add="$dir/$old_library" 2541 fi 2542 fi 2543 esac 1845 2544 elif test "$hardcode_minus_L" = no; then 1846 2545 case $host in … … 1861 2560 elif test "$hardcode_minus_L" = yes; then 1862 2561 add_dir="-L$dir" 2562 # Try looking first in the location we're being installed to. 2563 if test -n "$inst_prefix_dir"; then 2564 case "$libdir" in 2565 [\\/]*) 2566 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2567 ;; 2568 esac 2569 fi 1863 2570 add="-l$name" 1864 2571 elif test "$hardcode_shlibpath_var" = yes; then … … 1874 2581 if test "$lib_linked" != yes; then 1875 2582 $echo "$modename: configuration error: unsupported hardcode properties" 1876 exit 12583 exit $EXIT_FAILURE 1877 2584 fi 1878 2585 … … 1883 2590 esac 1884 2591 fi 1885 if test $linkmode= prog; then2592 if test "$linkmode" = prog; then 1886 2593 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" 1887 2594 test -n "$add" && compile_deplibs="$add $compile_deplibs" … … 1900 2607 fi 1901 2608 1902 if test $linkmode= prog || test "$mode" = relink; then2609 if test "$linkmode" = prog || test "$mode" = relink; then 1903 2610 add_shlibpath= 1904 2611 add_dir= … … 1908 2615 add="$libdir/$linklib" 1909 2616 elif test "$hardcode_minus_L" = yes; then 1910 # Try looking first in the location we're being installed to. 1911 add_dir= 1912 if test -n "$inst_prefix_dir"; then 1913 case "$libdir" in 1914 [\\/]*) 1915 add_dir="-L$inst_prefix_dir$libdir" 1916 ;; 1917 esac 1918 fi 1919 add_dir="$add_dir -L$libdir" 2617 add_dir="-L$libdir" 1920 2618 add="-l$name" 1921 2619 elif test "$hardcode_shlibpath_var" = yes; then … … 1925 2623 esac 1926 2624 add="-l$name" 2625 elif test "$hardcode_automatic" = yes; then 2626 if test -n "$inst_prefix_dir" && 2627 test -f "$inst_prefix_dir$libdir/$linklib" ; then 2628 add="$inst_prefix_dir$libdir/$linklib" 2629 else 2630 add="$libdir/$linklib" 2631 fi 1927 2632 else 1928 2633 # We cannot seem to hardcode it, guess we'll fake it. 2634 add_dir="-L$libdir" 1929 2635 # Try looking first in the location we're being installed to. 1930 add_dir=1931 2636 if test -n "$inst_prefix_dir"; then 1932 2637 case "$libdir" in 1933 [\\/]*)1934 add_dir="-L$inst_prefix_dir$libdir"1935 ;;2638 [\\/]*) 2639 add_dir="$add_dir -L$inst_prefix_dir$libdir" 2640 ;; 1936 2641 esac 1937 2642 fi 1938 add_dir="$add_dir -L$libdir"1939 2643 add="-l$name" 1940 2644 fi 1941 2645 1942 if test $linkmode= prog; then2646 if test "$linkmode" = prog; then 1943 2647 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" 1944 2648 test -n "$add" && finalize_deplibs="$add $finalize_deplibs" … … 1948 2652 fi 1949 2653 fi 1950 elif test $linkmode = prog; then 1951 if test "$alldeplibs" = yes && 1952 { test "$deplibs_check_method" = pass_all || 1953 { test "$build_libtool_libs" = yes && 1954 test -n "$library_names"; }; }; then 1955 # We only need to search for static libraries 1956 continue 1957 fi 1958 1959 # Try to link the static library 2654 elif test "$linkmode" = prog; then 1960 2655 # Here we assume that one of hardcode_direct or hardcode_minus_L 1961 2656 # is not unsupported. This is valid on all known static and … … 1977 2672 # Just print a warning and add the library to dependency_libs so 1978 2673 # that the program can be linked against the static library. 1979 echo1980 echo "*** Warning: This system can not link to static lib archive $lib."1981 echo "*** I have the capability to make that library automatically link in when"1982 echo "*** you link to this library. But I can only do this if you have a"1983 echo "*** shared version of the library, which you do not appear to have."2674 $echo 2675 $echo "*** Warning: This system can not link to static lib archive $lib." 2676 $echo "*** I have the capability to make that library automatically link in when" 2677 $echo "*** you link to this library. But I can only do this if you have a" 2678 $echo "*** shared version of the library, which you do not appear to have." 1984 2679 if test "$module" = yes; then 1985 echo "*** But as you try to build a module library, libtool will still create "1986 echo "*** a static module, that should work as long as the dlopening application"1987 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."2680 $echo "*** But as you try to build a module library, libtool will still create " 2681 $echo "*** a static module, that should work as long as the dlopening application" 2682 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." 1988 2683 if test -z "$global_symbol_pipe"; then 1989 echo1990 echo "*** However, this would only work if libtool was able to extract symbol"1991 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"1992 echo "*** not find such a program. So, this module is probably useless."1993 echo "*** \`nm' from GNU binutils and a full rebuild may help."2684 $echo 2685 $echo "*** However, this would only work if libtool was able to extract symbol" 2686 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 2687 $echo "*** not find such a program. So, this module is probably useless." 2688 $echo "*** \`nm' from GNU binutils and a full rebuild may help." 1994 2689 fi 1995 2690 if test "$build_old_libs" = no; then … … 2008 2703 fi # link shared/static library? 2009 2704 2010 if test $linkmode= lib; then2705 if test "$linkmode" = lib; then 2011 2706 if test -n "$dependency_libs" && 2012 { test $hardcode_into_libs != yes || test $build_old_libs = yes || 2013 test $link_static = yes; }; then 2707 { test "$hardcode_into_libs" != yes || 2708 test "$build_old_libs" = yes || 2709 test "$link_static" = yes; }; then 2014 2710 # Extract -R from dependency_libs 2015 2711 temp_deplibs= … … 2042 2738 done 2043 2739 2044 if test $link_all_deplibs!= no; then2740 if test "$link_all_deplibs" != no; then 2045 2741 # Add the search paths of all dependency libraries 2046 2742 for deplib in $dependency_libs; do … … 2062 2758 esac 2063 2759 if grep "^installed=no" $deplib > /dev/null; then 2064 path=" -L$absdir/$objdir"2760 path="$absdir/$objdir" 2065 2761 else 2066 2762 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` 2067 2763 if test -z "$libdir"; then 2068 2764 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 2069 exit 12765 exit $EXIT_FAILURE 2070 2766 fi 2071 2767 if test "$absdir" != "$libdir"; then 2072 2768 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 2073 2769 fi 2074 path=" -L$absdir"2770 path="$absdir" 2075 2771 fi 2772 depdepl= 2773 case $host in 2774 *-*-darwin*) 2775 # we do not want to link against static libs, 2776 # but need to link against shared 2777 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` 2778 if test -n "$deplibrary_names" ; then 2779 for tmp in $deplibrary_names ; do 2780 depdepl=$tmp 2781 done 2782 if test -f "$path/$depdepl" ; then 2783 depdepl="$path/$depdepl" 2784 fi 2785 # do not add paths which are already there 2786 case " $newlib_search_path " in 2787 *" $path "*) ;; 2788 *) newlib_search_path="$newlib_search_path $path";; 2789 esac 2790 fi 2791 path="" 2792 ;; 2793 *) 2794 path="-L$path" 2795 ;; 2796 esac 2797 ;; 2798 -l*) 2799 case $host in 2800 *-*-darwin*) 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="" 2810 ;; 2811 *) continue ;; 2812 esac 2076 2813 ;; 2077 2814 *) continue ;; 2815 esac 2816 case " $deplibs " in 2817 *" $depdepl "*) ;; 2818 *) deplibs="$depdepl $deplibs" ;; 2078 2819 esac 2079 2820 case " $deplibs " in … … 2085 2826 fi # linkmode = lib 2086 2827 done # for deplib in $libs 2087 if test $pass = dlpreopen; then 2828 dependency_libs="$newdependency_libs" 2829 if test "$pass" = dlpreopen; then 2088 2830 # Link the dlpreopened libraries before other libraries 2089 2831 for deplib in $save_deplibs; do … … 2091 2833 done 2092 2834 fi 2093 if test $pass != dlopen; then 2094 test $pass != scan && dependency_libs="$newdependency_libs" 2095 if test $pass != conv; then 2835 if test "$pass" != dlopen; then 2836 if test "$pass" != conv; then 2096 2837 # Make sure lib_search_path contains only unique directories. 2097 2838 lib_search_path= … … 2115 2856 new_libs= 2116 2857 for deplib in $tmp_libs; do 2858 # FIXME: Pedantically, this is the right thing to do, so 2859 # that some nasty dependency loop isn't accidentally 2860 # broken: 2861 #new_libs="$deplib $new_libs" 2862 # Pragmatically, this seems to cause very few problems in 2863 # practice: 2117 2864 case $deplib in 2118 2865 -L*) new_libs="$deplib $new_libs" ;; 2866 -R*) ;; 2119 2867 *) 2868 # And here is the reason: when a library appears more 2869 # than once as an explicit dependence of a library, or 2870 # is implicitly linked in more than once by the 2871 # compiler, it is considered special, and multiple 2872 # occurrences thereof are not removed. Compare this 2873 # with having the same library being listed as a 2874 # dependency of multiple other libraries: in this case, 2875 # we know (pedantically, we assume) the library does not 2876 # need to be listed more than once, so we keep only the 2877 # last copy. This is not always right, but it is rare 2878 # enough that we require users that really mean to play 2879 # such unportable linking tricks to link the library 2880 # using -Wl,-lname, so that libtool does not consider it 2881 # for duplicate removal. 2120 2882 case " $specialdeplibs " in 2121 2883 *" $deplib "*) new_libs="$deplib $new_libs" ;; … … 2145 2907 done # for var 2146 2908 fi 2147 if test "$pass" = "conv" && 2148 { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then 2149 libs="$deplibs" # reset libs 2150 deplibs= 2151 fi 2909 # Last step: remove runtime libs from dependency_libs 2910 # (they stay in deplibs) 2911 tmp_libs= 2912 for i in $dependency_libs ; do 2913 case " $predeps $postdeps $compiler_lib_search_path " in 2914 *" $i "*) 2915 i="" 2916 ;; 2917 esac 2918 if test -n "$i" ; then 2919 tmp_libs="$tmp_libs $i" 2920 fi 2921 done 2922 dependency_libs=$tmp_libs 2152 2923 done # for pass 2153 if test $linkmode= prog; then2924 if test "$linkmode" = prog; then 2154 2925 dlfiles="$newdlfiles" 2155 2926 dlprefiles="$newdlprefiles" … … 2158 2929 case $linkmode in 2159 2930 oldlib) 2931 if test -n "$deplibs"; then 2932 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 2933 fi 2934 2160 2935 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then 2161 2936 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 … … 2171 2946 2172 2947 if test -n "$vinfo"; then 2173 $echo "$modename: warning: \`-version-info ' is ignored for archives" 1>&22948 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 2174 2949 fi 2175 2950 … … 2193 2968 lib*) 2194 2969 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2970 eval shared_ext=\"$shrext_cmds\" 2195 2971 eval libname=\"$libname_spec\" 2196 2972 ;; … … 2199 2975 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 2200 2976 $echo "$help" 1>&2 2201 exit 12977 exit $EXIT_FAILURE 2202 2978 fi 2203 2979 if test "$need_lib_prefix" != no; then 2204 2980 # Add the "lib" prefix for modules if required 2205 2981 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2982 eval shared_ext=\"$shrext_cmds\" 2206 2983 eval libname=\"$libname_spec\" 2207 2984 else … … 2214 2991 if test "$deplibs_check_method" != pass_all; then 2215 2992 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 2216 exit 12993 exit $EXIT_FAILURE 2217 2994 else 2218 echo2219 echo "*** Warning: Linking the shared library $output against the non-libtool"2220 echo "*** objects $objs is not portable!"2995 $echo 2996 $echo "*** Warning: Linking the shared library $output against the non-libtool" 2997 $echo "*** objects $objs is not portable!" 2221 2998 libobjs="$libobjs $objs" 2222 2999 fi … … 2228 3005 2229 3006 set dummy $rpath 2230 if test $#-gt 2; then3007 if test "$#" -gt 2; then 2231 3008 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 2232 3009 fi … … 2237 3014 if test "$build_libtool_libs" = yes; then 2238 3015 # Building a libtool convenience library. 2239 libext=al 3016 # Some compilers have problems with a `.al' extension so 3017 # convenience libraries should have the same extension an 3018 # archive normally would. 2240 3019 oldlibs="$output_objdir/$libname.$libext $oldlibs" 2241 3020 build_libtool_libs=convenience … … 2244 3023 2245 3024 if test -n "$vinfo"; then 2246 $echo "$modename: warning: \`-version-info ' is ignored for convenience libraries" 1>&23025 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 2247 3026 fi 2248 3027 … … 2260 3039 $echo "$modename: too many parameters to \`-version-info'" 1>&2 2261 3040 $echo "$help" 1>&2 2262 exit 1 2263 fi 2264 2265 current="$2" 2266 revision="$3" 2267 age="$4" 3041 exit $EXIT_FAILURE 3042 fi 3043 3044 # convert absolute version numbers to libtool ages 3045 # this retains compatibility with .la files and attempts 3046 # to make the code below a bit more comprehensible 3047 3048 case $vinfo_number in 3049 yes) 3050 number_major="$2" 3051 number_minor="$3" 3052 number_revision="$4" 3053 # 3054 # There are really only two kinds -- those that 3055 # use the current revision as the major version 3056 # and those that subtract age and use age as 3057 # a minor version. But, then there is irix 3058 # which has an extra 1 added just for fun 3059 # 3060 case $version_type in 3061 darwin|linux|osf|windows) 3062 current=`expr $number_major + $number_minor` 3063 age="$number_minor" 3064 revision="$number_revision" 3065 ;; 3066 freebsd-aout|freebsd-elf|sunos) 3067 current="$number_major" 3068 revision="$number_minor" 3069 age="0" 3070 ;; 3071 irix|nonstopux) 3072 current=`expr $number_major + $number_minor - 1` 3073 age="$number_minor" 3074 revision="$number_minor" 3075 ;; 3076 esac 3077 ;; 3078 no) 3079 current="$2" 3080 revision="$3" 3081 age="$4" 3082 ;; 3083 esac 2268 3084 2269 3085 # Check that each of the things are valid numbers. 2270 3086 case $current in 2271 [0-9]*) ;;3087 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2272 3088 *) 2273 3089 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 2274 3090 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2275 exit 13091 exit $EXIT_FAILURE 2276 3092 ;; 2277 3093 esac 2278 3094 2279 3095 case $revision in 2280 [0-9]*) ;;3096 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2281 3097 *) 2282 3098 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 2283 3099 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2284 exit 13100 exit $EXIT_FAILURE 2285 3101 ;; 2286 3102 esac 2287 3103 2288 3104 case $age in 2289 [0-9]*) ;;3105 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;; 2290 3106 *) 2291 3107 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 2292 3108 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2293 exit 13109 exit $EXIT_FAILURE 2294 3110 ;; 2295 3111 esac 2296 3112 2297 if test $age -gt $current; then3113 if test "$age" -gt "$current"; then 2298 3114 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 2299 3115 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 2300 exit 13116 exit $EXIT_FAILURE 2301 3117 fi 2302 3118 … … 2315 3131 # Darwin ld doesn't like 0 for these options... 2316 3132 minor_current=`expr $current + 1` 2317 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" 2318 3134 ;; 2319 3135 … … 2339 3155 # Add in all the interfaces that we are compatible with. 2340 3156 loop=$revision 2341 while test $loop !=0; do3157 while test "$loop" -ne 0; do 2342 3158 iface=`expr $revision - $loop` 2343 3159 loop=`expr $loop - 1` … … 2362 3178 # Add in all the interfaces that we are compatible with. 2363 3179 loop=$age 2364 while test $loop !=0; do3180 while test "$loop" -ne 0; do 2365 3181 iface=`expr $current - $loop` 2366 3182 loop=`expr $loop - 1` … … 2386 3202 *) 2387 3203 $echo "$modename: unknown library version type \`$version_type'" 1>&2 2388 echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&22389 exit 13204 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 3205 exit $EXIT_FAILURE 2390 3206 ;; 2391 3207 esac … … 2394 3210 if test -z "$vinfo" && test -n "$release"; then 2395 3211 major= 2396 verstring="0.0"2397 3212 case $version_type in 2398 3213 darwin) 2399 3214 # we can't check for "0.0" in archive_cmds due to quoting 2400 3215 # problems, so we reset it completely 2401 verstring= ""3216 verstring= 2402 3217 ;; 2403 3218 *) … … 2433 3248 2434 3249 if test "$mode" != relink; then 2435 # Remove our outputs. 2436 $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*" 2437 $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.* 3250 # Remove our outputs, but don't remove object files since they 3251 # may have been created when compiling PIC objects. 3252 removelist= 3253 tempremovelist=`$echo "$output_objdir/*"` 3254 for p in $tempremovelist; do 3255 case $p in 3256 *.$objext) 3257 ;; 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 3265 removelist="$removelist $p" 3266 ;; 3267 *) ;; 3268 esac 3269 done 3270 if test -n "$removelist"; then 3271 $show "${rm}r $removelist" 3272 $run ${rm}r $removelist 3273 fi 2438 3274 fi 2439 3275 … … 2448 3284 # Eliminate all temporary directories. 2449 3285 for path in $notinst_path; do 2450 lib_search_path=` echo "$lib_search_path " | ${SED} -e 's% $path % %g'`2451 deplibs=` echo "$deplibs " | ${SED} -e 's% -L$path % %g'`2452 dependency_libs=` echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`3286 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` 3287 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` 3288 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` 2453 3289 done 2454 3290 … … 2463 3299 esac 2464 3300 done 2465 if test $hardcode_into_libs != yes || test $build_old_libs= yes; then3301 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then 2466 3302 dependency_libs="$temp_xrpath $dependency_libs" 2467 3303 fi … … 2503 3339 *-*-openbsd* | *-*-freebsd*) 2504 3340 # Do not include libc due to us having libc/libc_r. 3341 test "X$arg" = "X-lc" && continue 2505 3342 ;; 2506 *)3343 *) 2507 3344 # Add libc to deplibs on all other systems if necessary. 2508 if test $build_libtool_need_lc= "yes"; then3345 if test "$build_libtool_need_lc" = "yes"; then 2509 3346 deplibs="$deplibs -lc" 2510 3347 fi … … 2533 3370 # whether the library exists or not. But this is on 2534 3371 # osf3 & osf4 and I'm not really sure... Just 2535 # implementing what was already the behavio ur.3372 # implementing what was already the behavior. 2536 3373 newdeplibs=$deplibs 2537 3374 ;; … … 2546 3383 EOF 2547 3384 $rm conftest 2548 $ CC -o conftest conftest.c $deplibs2549 if test $?-eq 0 ; then3385 $LTCC -o conftest conftest.c $deplibs 3386 if test "$?" -eq 0 ; then 2550 3387 ldd_output=`ldd conftest` 2551 3388 for i in $deplibs; do 2552 3389 name="`expr $i : '-l\(.*\)'`" 2553 3390 # If $name is empty we are operating on a -L argument. 2554 if test -n "$name" && test "$name" != "0"; then 2555 libname=`eval \\$echo \"$libname_spec\"` 2556 deplib_matches=`eval \\$echo \"$library_names_spec\"` 2557 set dummy $deplib_matches 2558 deplib_match=$2 2559 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 2560 newdeplibs="$newdeplibs $i" 2561 else 2562 droppeddeps=yes 2563 echo 2564 echo "*** Warning: dynamic linker does not accept needed library $i." 2565 echo "*** I have the capability to make that library automatically link in when" 2566 echo "*** you link to this library. But I can only do this if you have a" 2567 echo "*** shared version of the library, which I believe you do not have" 2568 echo "*** because a test_compile did reveal that the linker did not use it for" 2569 echo "*** its dynamic dependency list that programs get resolved with at runtime." 2570 fi 2571 else 2572 newdeplibs="$newdeplibs $i" 2573 fi 2574 done 2575 else 2576 # Error occured in the first compile. Let's try to salvage 2577 # the situation: Compile a separate program for each library. 2578 for i in $deplibs; do 2579 name="`expr $i : '-l\(.*\)'`" 2580 # If $name is empty we are operating on a -L argument. 2581 if test -n "$name" && test "$name" != "0"; then 2582 $rm conftest 2583 $CC -o conftest conftest.c $i 2584 # Did it work? 2585 if test $? -eq 0 ; then 2586 ldd_output=`ldd conftest` 3391 if test "$name" != "" && test "$name" -ne "0"; then 3392 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3393 case " $predeps $postdeps " in 3394 *" $i "*) 3395 newdeplibs="$newdeplibs $i" 3396 i="" 3397 ;; 3398 esac 3399 fi 3400 if test -n "$i" ; then 2587 3401 libname=`eval \\$echo \"$libname_spec\"` 2588 3402 deplib_matches=`eval \\$echo \"$library_names_spec\"` … … 2593 3407 else 2594 3408 droppeddeps=yes 2595 echo 2596 echo "*** Warning: dynamic linker does not accept needed library $i." 2597 echo "*** I have the capability to make that library automatically link in when" 2598 echo "*** you link to this library. But I can only do this if you have a" 2599 echo "*** shared version of the library, which you do not appear to have" 2600 echo "*** because a test_compile did reveal that the linker did not use this one" 2601 echo "*** as a dynamic dependency that programs can get resolved with at runtime." 3409 $echo 3410 $echo "*** Warning: dynamic linker does not accept needed library $i." 3411 $echo "*** I have the capability to make that library automatically link in when" 3412 $echo "*** you link to this library. But I can only do this if you have a" 3413 $echo "*** shared version of the library, which I believe you do not have" 3414 $echo "*** because a test_compile did reveal that the linker did not use it for" 3415 $echo "*** its dynamic dependency list that programs get resolved with at runtime." 3416 fi 3417 fi 3418 else 3419 newdeplibs="$newdeplibs $i" 3420 fi 3421 done 3422 else 3423 # Error occurred in the first compile. Let's try to salvage 3424 # the situation: Compile a separate program for each library. 3425 for i in $deplibs; do 3426 name="`expr $i : '-l\(.*\)'`" 3427 # If $name is empty we are operating on a -L argument. 3428 if test "$name" != "" && test "$name" != "0"; then 3429 $rm conftest 3430 $LTCC -o conftest conftest.c $i 3431 # Did it work? 3432 if test "$?" -eq 0 ; then 3433 ldd_output=`ldd conftest` 3434 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3435 case " $predeps $postdeps " in 3436 *" $i "*) 3437 newdeplibs="$newdeplibs $i" 3438 i="" 3439 ;; 3440 esac 3441 fi 3442 if test -n "$i" ; then 3443 libname=`eval \\$echo \"$libname_spec\"` 3444 deplib_matches=`eval \\$echo \"$library_names_spec\"` 3445 set dummy $deplib_matches 3446 deplib_match=$2 3447 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then 3448 newdeplibs="$newdeplibs $i" 3449 else 3450 droppeddeps=yes 3451 $echo 3452 $echo "*** Warning: dynamic linker does not accept needed library $i." 3453 $echo "*** I have the capability to make that library automatically link in when" 3454 $echo "*** you link to this library. But I can only do this if you have a" 3455 $echo "*** shared version of the library, which you do not appear to have" 3456 $echo "*** because a test_compile did reveal that the linker did not use this one" 3457 $echo "*** as a dynamic dependency that programs can get resolved with at runtime." 3458 fi 2602 3459 fi 2603 3460 else 2604 3461 droppeddeps=yes 2605 echo2606 echo "*** Warning! Library $i is needed by this library but I was not able to"2607 echo "*** make it link in! You will probably need to install it or some"2608 echo "*** library that it depends on before this library will be fully"2609 echo "*** functional. Installing it before continuing would be even better."3462 $echo 3463 $echo "*** Warning! Library $i is needed by this library but I was not able to" 3464 $echo "*** make it link in! You will probably need to install it or some" 3465 $echo "*** library that it depends on before this library will be fully" 3466 $echo "*** functional. Installing it before continuing would be even better." 2610 3467 fi 2611 3468 else … … 2621 3478 name="`expr $a_deplib : '-l\(.*\)'`" 2622 3479 # If $name is empty we are operating on a -L argument. 2623 if test -n "$name" && test "$name" != "0"; then 2624 libname=`eval \\$echo \"$libname_spec\"` 2625 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2626 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2627 for potent_lib in $potential_libs; do 3480 if test "$name" != "" && test "$name" != "0"; then 3481 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3482 case " $predeps $postdeps " in 3483 *" $a_deplib "*) 3484 newdeplibs="$newdeplibs $a_deplib" 3485 a_deplib="" 3486 ;; 3487 esac 3488 fi 3489 if test -n "$a_deplib" ; then 3490 libname=`eval \\$echo \"$libname_spec\"` 3491 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3492 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3493 for potent_lib in $potential_libs; do 2628 3494 # Follow soft links. 2629 3495 if ls -lLd "$potent_lib" 2>/dev/null \ … … 2646 3512 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ 2647 3513 | ${SED} 10q \ 2648 | egrep"$file_magic_regex" > /dev/null; then3514 | $EGREP "$file_magic_regex" > /dev/null; then 2649 3515 newdeplibs="$newdeplibs $a_deplib" 2650 3516 a_deplib="" 2651 3517 break 2 2652 3518 fi 2653 done 2654 done 3519 done 3520 done 3521 fi 2655 3522 if test -n "$a_deplib" ; then 2656 3523 droppeddeps=yes 2657 echo2658 echo "*** Warning: linker path does not have real file for library $a_deplib."2659 echo "*** I have the capability to make that library automatically link in when"2660 echo "*** you link to this library. But I can only do this if you have a"2661 echo "*** shared version of the library, which you do not appear to have"2662 echo "*** because I did check the linker path looking for a file starting"3524 $echo 3525 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3526 $echo "*** I have the capability to make that library automatically link in when" 3527 $echo "*** you link to this library. But I can only do this if you have a" 3528 $echo "*** shared version of the library, which you do not appear to have" 3529 $echo "*** because I did check the linker path looking for a file starting" 2663 3530 if test -z "$potlib" ; then 2664 echo "*** with $libname but no candidates were found. (...for file magic test)"3531 $echo "*** with $libname but no candidates were found. (...for file magic test)" 2665 3532 else 2666 echo "*** with $libname and none of the candidates passed a file format test"2667 echo "*** using a file magic. Last file checked: $potlib"3533 $echo "*** with $libname and none of the candidates passed a file format test" 3534 $echo "*** using a file magic. Last file checked: $potlib" 2668 3535 fi 2669 3536 fi … … 2681 3548 # If $name is empty we are operating on a -L argument. 2682 3549 if test -n "$name" && test "$name" != "0"; then 2683 libname=`eval \\$echo \"$libname_spec\"` 2684 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 2685 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 2686 for potent_lib in $potential_libs; do 2687 potlib="$potent_lib" # see symlink-check below in file_magic test 2688 if eval echo \"$potent_lib\" 2>/dev/null \ 2689 | ${SED} 10q \ 2690 | egrep "$match_pattern_regex" > /dev/null; then 2691 newdeplibs="$newdeplibs $a_deplib" 2692 a_deplib="" 2693 break 2 2694 fi 3550 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3551 case " $predeps $postdeps " in 3552 *" $a_deplib "*) 3553 newdeplibs="$newdeplibs $a_deplib" 3554 a_deplib="" 3555 ;; 3556 esac 3557 fi 3558 if test -n "$a_deplib" ; then 3559 libname=`eval \\$echo \"$libname_spec\"` 3560 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do 3561 potential_libs=`ls $i/$libname[.-]* 2>/dev/null` 3562 for potent_lib in $potential_libs; do 3563 potlib="$potent_lib" # see symlink-check above in file_magic test 3564 if eval $echo \"$potent_lib\" 2>/dev/null \ 3565 | ${SED} 10q \ 3566 | $EGREP "$match_pattern_regex" > /dev/null; then 3567 newdeplibs="$newdeplibs $a_deplib" 3568 a_deplib="" 3569 break 2 3570 fi 3571 done 2695 3572 done 2696 done3573 fi 2697 3574 if test -n "$a_deplib" ; then 2698 3575 droppeddeps=yes 2699 echo2700 echo "*** Warning: linker path does not have real file for library $a_deplib."2701 echo "*** I have the capability to make that library automatically link in when"2702 echo "*** you link to this library. But I can only do this if you have a"2703 echo "*** shared version of the library, which you do not appear to have"2704 echo "*** because I did check the linker path looking for a file starting"3576 $echo 3577 $echo "*** Warning: linker path does not have real file for library $a_deplib." 3578 $echo "*** I have the capability to make that library automatically link in when" 3579 $echo "*** you link to this library. But I can only do this if you have a" 3580 $echo "*** shared version of the library, which you do not appear to have" 3581 $echo "*** because I did check the linker path looking for a file starting" 2705 3582 if test -z "$potlib" ; then 2706 echo "*** with $libname but no candidates were found. (...for regex pattern test)"3583 $echo "*** with $libname but no candidates were found. (...for regex pattern test)" 2707 3584 else 2708 echo "*** with $libname and none of the candidates passed a file format test"2709 echo "*** using a regex pattern. Last file checked: $potlib"3585 $echo "*** with $libname and none of the candidates passed a file format test" 3586 $echo "*** using a regex pattern. Last file checked: $potlib" 2710 3587 fi 2711 3588 fi … … 2718 3595 none | unknown | *) 2719 3596 newdeplibs="" 2720 if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ 2721 -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' | 2722 grep . >/dev/null; then 2723 echo 3597 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ 3598 -e 's/ -[LR][^ ]*//g'` 3599 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then 3600 for i in $predeps $postdeps ; do 3601 # can't use Xsed below, because $i might contain '/' 3602 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` 3603 done 3604 fi 3605 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ 3606 | grep . >/dev/null; then 3607 $echo 2724 3608 if test "X$deplibs_check_method" = "Xnone"; then 2725 echo "*** Warning: inter-library dependencies are not supported in this platform."3609 $echo "*** Warning: inter-library dependencies are not supported in this platform." 2726 3610 else 2727 echo "*** Warning: inter-library dependencies are not known to be supported."3611 $echo "*** Warning: inter-library dependencies are not known to be supported." 2728 3612 fi 2729 echo "*** All declared inter-library dependencies are being dropped."3613 $echo "*** All declared inter-library dependencies are being dropped." 2730 3614 droppeddeps=yes 2731 3615 fi … … 2747 3631 if test "$droppeddeps" = yes; then 2748 3632 if test "$module" = yes; then 2749 echo2750 echo "*** Warning: libtool could not satisfy all declared inter-library"2751 echo "*** dependencies of module $libname. Therefore, libtool will create"2752 echo "*** a static module, that should work as long as the dlopening"2753 echo "*** application is linked with the -dlopen flag."3633 $echo 3634 $echo "*** Warning: libtool could not satisfy all declared inter-library" 3635 $echo "*** dependencies of module $libname. Therefore, libtool will create" 3636 $echo "*** a static module, that should work as long as the dlopening" 3637 $echo "*** application is linked with the -dlopen flag." 2754 3638 if test -z "$global_symbol_pipe"; then 2755 echo2756 echo "*** However, this would only work if libtool was able to extract symbol"2757 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"2758 echo "*** not find such a program. So, this module is probably useless."2759 echo "*** \`nm' from GNU binutils and a full rebuild may help."3639 $echo 3640 $echo "*** However, this would only work if libtool was able to extract symbol" 3641 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" 3642 $echo "*** not find such a program. So, this module is probably useless." 3643 $echo "*** \`nm' from GNU binutils and a full rebuild may help." 2760 3644 fi 2761 3645 if test "$build_old_libs" = no; then … … 2767 3651 fi 2768 3652 else 2769 echo "*** The inter-library dependencies that have been dropped here will be"2770 echo "*** automatically added whenever a program is linked with this library"2771 echo "*** or is declared to -dlopen it."2772 2773 if test $allow_undefined= no; then2774 echo2775 echo "*** Since this library must not contain undefined symbols,"2776 echo "*** because either the platform does not support them or"2777 echo "*** it was explicitly requested with -no-undefined,"2778 echo "*** libtool will only create a static version of it."3653 $echo "*** The inter-library dependencies that have been dropped here will be" 3654 $echo "*** automatically added whenever a program is linked with this library" 3655 $echo "*** or is declared to -dlopen it." 3656 3657 if test "$allow_undefined" = no; then 3658 $echo 3659 $echo "*** Since this library must not contain undefined symbols," 3660 $echo "*** because either the platform does not support them or" 3661 $echo "*** it was explicitly requested with -no-undefined," 3662 $echo "*** libtool will only create a static version of it." 2779 3663 if test "$build_old_libs" = no; then 2780 3664 oldlibs="$output_objdir/$libname.$libext" … … 2798 3682 # Test again, we may have decided not to build it any more 2799 3683 if test "$build_libtool_libs" = yes; then 2800 if test $hardcode_into_libs= yes; then3684 if test "$hardcode_into_libs" = yes; then 2801 3685 # Hardcode the library paths 2802 3686 hardcode_libdirs= … … 2834 3718 test -n "$hardcode_libdirs"; then 2835 3719 libdir="$hardcode_libdirs" 2836 eval dep_rpath=\"$hardcode_libdir_flag_spec\" 3720 if test -n "$hardcode_libdir_flag_spec_ld"; then 3721 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" 3722 else 3723 eval dep_rpath=\"$hardcode_libdir_flag_spec\" 3724 fi 2837 3725 fi 2838 3726 if test -n "$runpath_var" && test -n "$perm_rpath"; then … … 2854 3742 2855 3743 # Get the real and link names of the library. 3744 eval shared_ext=\"$shrext_cmds\" 2856 3745 eval library_names=\"$library_names_spec\" 2857 3746 set dummy $library_names … … 2864 3753 soname="$realname" 2865 3754 fi 2866 test -z "$dlname" && dlname=$soname 3755 if test -z "$dlname"; then 3756 dlname=$soname 3757 fi 2867 3758 2868 3759 lib="$output_objdir/$realname" … … 2870 3761 do 2871 3762 linknames="$linknames $link" 2872 done2873 2874 # Ensure that we have .o objects for linkers which dislike .lo2875 # (e.g. aix) in case we are running --disable-static2876 for obj in $libobjs; do2877 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`2878 if test "X$xdir" = "X$obj"; then2879 xdir="."2880 else2881 xdir="$xdir"2882 fi2883 baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`2884 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`2885 if test ! -f $xdir/$oldobj; then2886 $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"2887 $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?2888 fi2889 3763 done 2890 3764 … … 2898 3772 export_symbols="$output_objdir/$libname.exp" 2899 3773 $run $rm $export_symbols 2900 eval cmds=\"$export_symbols_cmds\"3774 cmds=$export_symbols_cmds 2901 3775 save_ifs="$IFS"; IFS='~' 2902 3776 for cmd in $cmds; do 2903 3777 IFS="$save_ifs" 2904 $show "$cmd" 2905 $run eval "$cmd" || exit $? 3778 eval cmd=\"$cmd\" 3779 if len=`expr "X$cmd" : ".*"` && 3780 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3781 $show "$cmd" 3782 $run eval "$cmd" || exit $? 3783 skipped_export=false 3784 else 3785 # The command line is too long to execute in one step. 3786 $show "using reloadable object file for export list..." 3787 skipped_export=: 3788 fi 2906 3789 done 2907 3790 IFS="$save_ifs" 2908 3791 if test -n "$export_symbols_regex"; then 2909 $show " egrep-e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""2910 $run eval ' egrep-e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'3792 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" 3793 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' 2911 3794 $show "$mv \"${export_symbols}T\" \"$export_symbols\"" 2912 3795 $run eval '$mv "${export_symbols}T" "$export_symbols"' … … 2919 3802 fi 2920 3803 3804 tmp_deplibs= 3805 for test_deplib in $deplibs; do 3806 case " $convenience " in 3807 *" $test_deplib "*) ;; 3808 *) 3809 tmp_deplibs="$tmp_deplibs $test_deplib" 3810 ;; 3811 esac 3812 done 3813 deplibs="$tmp_deplibs" 3814 2921 3815 if test -n "$convenience"; then 2922 3816 if test -n "$whole_archive_flag_spec"; then 3817 save_libobjs=$libobjs 2923 3818 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 2924 3819 else 2925 3820 gentop="$output_objdir/${outputname}x" 2926 $show "${rm}r $gentop"2927 $run ${rm}r "$gentop"2928 $show "mkdir $gentop"2929 $run mkdir "$gentop"2930 status=$?2931 if test $status -ne 0 && test ! -d "$gentop"; then2932 exit $status2933 fi2934 3821 generated="$generated $gentop" 2935 3822 2936 for xlib in $convenience; do 2937 # Extract the objects. 2938 case $xlib in 2939 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 2940 *) xabs=`pwd`"/$xlib" ;; 2941 esac 2942 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 2943 xdir="$gentop/$xlib" 2944 2945 $show "${rm}r $xdir" 2946 $run ${rm}r "$xdir" 2947 $show "mkdir $xdir" 2948 $run mkdir "$xdir" 2949 status=$? 2950 if test $status -ne 0 && test ! -d "$xdir"; then 2951 exit $status 2952 fi 2953 $show "(cd $xdir && $AR x $xabs)" 2954 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 2955 2956 libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` 2957 done 2958 fi 2959 fi 2960 3823 func_extract_archives $gentop $convenience 3824 libobjs="$libobjs $func_extract_archives_result" 3825 fi 3826 fi 3827 2961 3828 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then 2962 3829 eval flag=\"$thread_safe_flag_spec\" … … 2970 3837 2971 3838 # Do each of the archive commands. 3839 if test "$module" = yes && test -n "$module_cmds" ; then 3840 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then 3841 eval test_cmds=\"$module_expsym_cmds\" 3842 cmds=$module_expsym_cmds 3843 else 3844 eval test_cmds=\"$module_cmds\" 3845 cmds=$module_cmds 3846 fi 3847 else 2972 3848 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 2973 eval cmds=\"$archive_expsym_cmds\" 3849 eval test_cmds=\"$archive_expsym_cmds\" 3850 cmds=$archive_expsym_cmds 2974 3851 else 2975 save_deplibs="$deplibs" 2976 for conv in $convenience; do 2977 tmp_deplibs= 2978 for test_deplib in $deplibs; do 2979 if test "$test_deplib" != "$conv"; then 2980 tmp_deplibs="$tmp_deplibs $test_deplib" 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" : ".*"` && 3858 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 3859 : 3860 else 3861 # The command line is too long to link in one step, link piecewise. 3862 $echo "creating reloadable object files..." 3863 3864 # Save the value of $output and $libobjs because we want to 3865 # use them later. If we have whole_archive_flag_spec, we 3866 # want to use save_libobjs as it was before 3867 # whole_archive_flag_spec was expanded, because we can't 3868 # assume the linker understands whole_archive_flag_spec. 3869 # This may have to be revisited, in case too many 3870 # convenience libraries get linked in and end up exceeding 3871 # the spec. 3872 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then 3873 save_libobjs=$libobjs 3874 fi 3875 save_output=$output 3876 3877 # Clear the reloadable object creation command queue and 3878 # initialize k to one. 3879 test_cmds= 3880 concat_cmds= 3881 objlist= 3882 delfiles= 3883 last_robj= 3884 k=1 3885 output=$output_objdir/$save_output-${k}.$objext 3886 # Loop over the list of objects to be linked. 3887 for obj in $save_libobjs 3888 do 3889 eval test_cmds=\"$reload_cmds $objlist $last_robj\" 3890 if test "X$objlist" = X || 3891 { len=`expr "X$test_cmds" : ".*"` && 3892 test "$len" -le "$max_cmd_len"; }; then 3893 objlist="$objlist $obj" 3894 else 3895 # The command $test_cmds is almost too long, add a 3896 # command to the queue. 3897 if test "$k" -eq 1 ; then 3898 # The first file doesn't have a previous command to add. 3899 eval concat_cmds=\"$reload_cmds $objlist $last_robj\" 3900 else 3901 # All subsequent reloadable object files will link in 3902 # the last one created. 3903 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" 2981 3904 fi 2982 done 2983 deplibs="$tmp_deplibs" 3905 last_robj=$output_objdir/$save_output-${k}.$objext 3906 k=`expr $k + 1` 3907 output=$output_objdir/$save_output-${k}.$objext 3908 objlist=$obj 3909 len=1 3910 fi 2984 3911 done 2985 eval cmds=\"$archive_cmds\" 2986 deplibs="$save_deplibs" 3912 # Handle the remaining objects by creating one last 3913 # reloadable object file. All subsequent reloadable object 3914 # files will link in the last one created. 3915 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 3916 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" 3917 3918 if ${skipped_export-false}; then 3919 $show "generating symbol list for \`$libname.la'" 3920 export_symbols="$output_objdir/$libname.exp" 3921 $run $rm $export_symbols 3922 libobjs=$output 3923 # Append the command to create the export file. 3924 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" 3925 fi 3926 3927 # Set up a command to remove the reloadale object files 3928 # after they are used. 3929 i=0 3930 while test "$i" -lt "$k" 3931 do 3932 i=`expr $i + 1` 3933 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" 3934 done 3935 3936 $echo "creating a temporary reloadable object file: $output" 3937 3938 # Loop through the commands generated above and execute them. 3939 save_ifs="$IFS"; IFS='~' 3940 for cmd in $concat_cmds; do 3941 IFS="$save_ifs" 3942 $show "$cmd" 3943 $run eval "$cmd" || exit $? 3944 done 3945 IFS="$save_ifs" 3946 3947 libobjs=$output 3948 # Restore the value of output. 3949 output=$save_output 3950 3951 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then 3952 eval libobjs=\"\$libobjs $whole_archive_flag_spec\" 3953 fi 3954 # Expand the library linking commands again to reset the 3955 # value of $libobjs for piecewise linking. 3956 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 3965 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then 3966 cmds=$archive_expsym_cmds 3967 else 3968 cmds=$archive_cmds 3969 fi 3970 fi 3971 3972 # Append the command to remove the reloadable object files 3973 # to the just-reset $cmds. 3974 eval cmds=\"\$cmds~\$rm $delfiles\" 2987 3975 fi 2988 3976 save_ifs="$IFS"; IFS='~' 2989 3977 for cmd in $cmds; do 2990 3978 IFS="$save_ifs" 3979 eval cmd=\"$cmd\" 2991 3980 $show "$cmd" 2992 3981 $run eval "$cmd" || exit $? … … 2997 3986 if test "$mode" = relink; then 2998 3987 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? 2999 exit 03988 exit $EXIT_SUCCESS 3000 3989 fi 3001 3990 … … 3045 4034 if test -n "$objs$old_deplibs"; then 3046 4035 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 3047 exit 14036 exit $EXIT_FAILURE 3048 4037 fi 3049 4038 libobj="$output" … … 3074 4063 else 3075 4064 gentop="$output_objdir/${obj}x" 3076 $show "${rm}r $gentop"3077 $run ${rm}r "$gentop"3078 $show "mkdir $gentop"3079 $run mkdir "$gentop"3080 status=$?3081 if test $status -ne 0 && test ! -d "$gentop"; then3082 exit $status3083 fi3084 4065 generated="$generated $gentop" 3085 4066 3086 for xlib in $convenience; do 3087 # Extract the objects. 3088 case $xlib in 3089 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3090 *) xabs=`pwd`"/$xlib" ;; 3091 esac 3092 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3093 xdir="$gentop/$xlib" 3094 3095 $show "${rm}r $xdir" 3096 $run ${rm}r "$xdir" 3097 $show "mkdir $xdir" 3098 $run mkdir "$xdir" 3099 status=$? 3100 if test $status -ne 0 && test ! -d "$xdir"; then 3101 exit $status 3102 fi 3103 $show "(cd $xdir && $AR x $xabs)" 3104 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3105 3106 reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP` 3107 done 4067 func_extract_archives $gentop $convenience 4068 reload_conv_objs="$reload_objs $func_extract_archives_result" 3108 4069 fi 3109 4070 fi … … 3113 4074 3114 4075 output="$obj" 3115 eval cmds=\"$reload_cmds\"4076 cmds=$reload_cmds 3116 4077 save_ifs="$IFS"; IFS='~' 3117 4078 for cmd in $cmds; do 3118 4079 IFS="$save_ifs" 4080 eval cmd=\"$cmd\" 3119 4081 $show "$cmd" 3120 4082 $run eval "$cmd" || exit $? … … 3129 4091 fi 3130 4092 3131 exit 04093 exit $EXIT_SUCCESS 3132 4094 fi 3133 4095 … … 3140 4102 # Create an invalid libtool object if no PIC, so that we don't 3141 4103 # accidentally link it into a program. 3142 $show "echo timestamp > $libobj"3143 $run eval "echo timestamp > $libobj" || exit $?3144 exit 04104 # $show "echo timestamp > $libobj" 4105 # $run eval "echo timestamp > $libobj" || exit $? 4106 exit $EXIT_SUCCESS 3145 4107 fi 3146 4108 … … 3149 4111 reload_objs="$libobjs $reload_conv_objs" 3150 4112 output="$libobj" 3151 eval cmds=\"$reload_cmds\"4113 cmds=$reload_cmds 3152 4114 save_ifs="$IFS"; IFS='~' 3153 4115 for cmd in $cmds; do 3154 4116 IFS="$save_ifs" 4117 eval cmd=\"$cmd\" 3155 4118 $show "$cmd" 3156 4119 $run eval "$cmd" || exit $? 3157 4120 done 3158 4121 IFS="$save_ifs" 3159 else3160 # Just create a symlink.3161 $show $rm $libobj3162 $run $rm $libobj3163 xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`3164 if test "X$xdir" = "X$libobj"; then3165 xdir="."3166 else3167 xdir="$xdir"3168 fi3169 baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`3170 oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`3171 $show "(cd $xdir && $LN_S $oldobj $baseobj)"3172 $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?3173 4122 fi 3174 4123 … … 3178 4127 fi 3179 4128 3180 exit 04129 exit $EXIT_SUCCESS 3181 4130 ;; 3182 4131 3183 4132 prog) 3184 4133 case $host in 3185 *cygwin*) output=` echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;4134 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; 3186 4135 esac 3187 4136 if test -n "$vinfo"; then … … 3205 4154 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3206 4155 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` 3207 case $host in 3208 *darwin*) 3209 # Don't allow lazy linking, it breaks C++ global constructors 3210 compile_command="$compile_command ${wl}-bind_at_load" 3211 finalize_command="$finalize_command ${wl}-bind_at_load" 3212 ;; 3213 esac 3214 ;; 4156 ;; 4157 esac 4158 4159 case $host in 4160 *darwin*) 4161 # Don't allow lazy linking, it breaks C++ global constructors 4162 if test "$tagname" = CXX ; then 4163 compile_command="$compile_command ${wl}-bind_at_load" 4164 finalize_command="$finalize_command ${wl}-bind_at_load" 4165 fi 4166 ;; 3215 4167 esac 3216 4168 … … 3365 4317 3366 4318 if test -n "$exclude_expsyms"; then 3367 $run eval ' egrep-v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'4319 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' 3368 4320 $run eval '$mv "$nlist"T "$nlist"' 3369 4321 fi 3370 4322 3371 4323 if test -n "$export_symbols_regex"; then 3372 $run eval ' egrep-e "$export_symbols_regex" "$nlist" > "$nlist"T'4324 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' 3373 4325 $run eval '$mv "$nlist"T "$nlist"' 3374 4326 fi … … 3388 4340 for arg in $dlprefiles; do 3389 4341 $show "extracting global C symbols from \`$arg'" 3390 name=` echo "$arg" | ${SED} -e 's%^.*/%%'`3391 $run eval ' echo ": $name " >> "$nlist"'4342 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` 4343 $run eval '$echo ": $name " >> "$nlist"' 3392 4344 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" 3393 4345 done … … 3398 4350 3399 4351 if test -n "$exclude_expsyms"; then 3400 egrep-v " ($exclude_expsyms)$" "$nlist" > "$nlist"T4352 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T 3401 4353 $mv "$nlist"T "$nlist" 3402 4354 fi … … 3418 4370 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' 3419 4371 else 3420 echo '/* NONE */' >> "$output_objdir/$dlsyms"4372 $echo '/* NONE */' >> "$output_objdir/$dlsyms" 3421 4373 fi 3422 4374 … … 3470 4422 case "$compile_command " in 3471 4423 *" -static "*) ;; 3472 *) pic_flag_for_symtable=" $pic_flag -D PIC -DFREEBSD_WORKAROUND";;4424 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; 3473 4425 esac;; 3474 4426 *-*-hpux*) 3475 4427 case "$compile_command " in 3476 4428 *" -static "*) ;; 3477 *) pic_flag_for_symtable=" $pic_flag -DPIC";;4429 *) pic_flag_for_symtable=" $pic_flag";; 3478 4430 esac 3479 4431 esac 3480 4432 3481 4433 # Now compile the dynamic symbol file. 3482 $show "(cd $output_objdir && $ CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"3483 $run eval '(cd $output_objdir && $ CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?4434 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" 4435 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? 3484 4436 3485 4437 # Clean up the generated files. … … 3493 4445 *) 3494 4446 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 3495 exit 14447 exit $EXIT_FAILURE 3496 4448 ;; 3497 4449 esac … … 3506 4458 fi 3507 4459 3508 if test $need_relink= no || test "$build_libtool_libs" != yes; then4460 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then 3509 4461 # Replace the output file specification. 3510 4462 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` … … 3581 4533 $show "$link_command" 3582 4534 $run eval "$link_command" || exit $? 3583 exit 04535 exit $EXIT_SUCCESS 3584 4536 fi 3585 4537 … … 3636 4588 3637 4589 # Quote $echo for shipping. 3638 if test "X$echo" = "X$SHELL $ 0--fallback-echo"; then3639 case $ 0in3640 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $ 0--fallback-echo";;3641 *) 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";; 3642 4594 esac 3643 4595 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` … … 3651 4603 # a .exe suffix, so we strip it off here. 3652 4604 case $output in 3653 *.exe) output=` echo $output|${SED} 's,.exe$,,'` ;;4605 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; 3654 4606 esac 3655 4607 # test for cygwin because mv fails w/o .exe extensions 3656 4608 case $host in 3657 *cygwin*) exeext=.exe ;; 4609 *cygwin*) 4610 exeext=.exe 4611 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; 3658 4612 *) exeext= ;; 3659 4613 esac 4614 case $host in 4615 *cygwin* | *mingw* ) 4616 cwrappersource=`$echo ${objdir}/lt-${output}.c` 4617 cwrapper=`$echo ${output}.exe` 4618 $rm $cwrappersource $cwrapper 4619 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 4620 4621 cat > $cwrappersource <<EOF 4622 4623 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname 4624 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP 4625 4626 The $output program cannot be directly executed until all the libtool 4627 libraries that it depends on are installed. 4628 4629 This wrapper executable should never be moved out of the build directory. 4630 If it is, it will not operate correctly. 4631 4632 Currently, it simply execs the wrapper *script* "/bin/sh $output", 4633 but could eventually absorb all of the scripts functionality and 4634 exec $objdir/$outputname directly. 4635 */ 4636 EOF 4637 cat >> $cwrappersource<<"EOF" 4638 #include <stdio.h> 4639 #include <stdlib.h> 4640 #include <unistd.h> 4641 #include <malloc.h> 4642 #include <stdarg.h> 4643 #include <assert.h> 4644 4645 #if defined(PATH_MAX) 4646 # define LT_PATHMAX PATH_MAX 4647 #elif defined(MAXPATHLEN) 4648 # define LT_PATHMAX MAXPATHLEN 4649 #else 4650 # define LT_PATHMAX 1024 4651 #endif 4652 4653 #ifndef DIR_SEPARATOR 4654 #define DIR_SEPARATOR '/' 4655 #endif 4656 4657 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ 4658 defined (__OS2__) 4659 #define HAVE_DOS_BASED_FILE_SYSTEM 4660 #ifndef DIR_SEPARATOR_2 4661 #define DIR_SEPARATOR_2 '\\' 4662 #endif 4663 #endif 4664 4665 #ifndef DIR_SEPARATOR_2 4666 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) 4667 #else /* DIR_SEPARATOR_2 */ 4668 # define IS_DIR_SEPARATOR(ch) \ 4669 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) 4670 #endif /* DIR_SEPARATOR_2 */ 4671 4672 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) 4673 #define XFREE(stale) do { \ 4674 if (stale) { free ((void *) stale); stale = 0; } \ 4675 } while (0) 4676 4677 const char *program_name = NULL; 4678 4679 void * xmalloc (size_t num); 4680 char * xstrdup (const char *string); 4681 char * basename (const char *name); 4682 char * fnqualify(const char *path); 4683 char * strendzap(char *str, const char *pat); 4684 void lt_fatal (const char *message, ...); 4685 4686 int 4687 main (int argc, char *argv[]) 4688 { 4689 char **newargz; 4690 int i; 4691 4692 program_name = (char *) xstrdup ((char *) basename (argv[0])); 4693 newargz = XMALLOC(char *, argc+2); 4694 EOF 4695 4696 cat >> $cwrappersource <<EOF 4697 newargz[0] = "$SHELL"; 4698 EOF 4699 4700 cat >> $cwrappersource <<"EOF" 4701 newargz[1] = fnqualify(argv[0]); 4702 /* we know the script has the same name, without the .exe */ 4703 /* so make sure newargz[1] doesn't end in .exe */ 4704 strendzap(newargz[1],".exe"); 4705 for (i = 1; i < argc; i++) 4706 newargz[i+1] = xstrdup(argv[i]); 4707 newargz[argc+1] = NULL; 4708 EOF 4709 4710 cat >> $cwrappersource <<EOF 4711 execv("$SHELL",newargz); 4712 EOF 4713 4714 cat >> $cwrappersource <<"EOF" 4715 } 4716 4717 void * 4718 xmalloc (size_t num) 4719 { 4720 void * p = (void *) malloc (num); 4721 if (!p) 4722 lt_fatal ("Memory exhausted"); 4723 4724 return p; 4725 } 4726 4727 char * 4728 xstrdup (const char *string) 4729 { 4730 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL 4731 ; 4732 } 4733 4734 char * 4735 basename (const char *name) 4736 { 4737 const char *base; 4738 4739 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4740 /* Skip over the disk name in MSDOS pathnames. */ 4741 if (isalpha (name[0]) && name[1] == ':') 4742 name += 2; 4743 #endif 4744 4745 for (base = name; *name; name++) 4746 if (IS_DIR_SEPARATOR (*name)) 4747 base = name + 1; 4748 return (char *) base; 4749 } 4750 4751 char * 4752 fnqualify(const char *path) 4753 { 4754 size_t size; 4755 char *p; 4756 char tmp[LT_PATHMAX + 1]; 4757 4758 assert(path != NULL); 4759 4760 /* Is it qualified already? */ 4761 #if defined (HAVE_DOS_BASED_FILE_SYSTEM) 4762 if (isalpha (path[0]) && path[1] == ':') 4763 return xstrdup (path); 4764 #endif 4765 if (IS_DIR_SEPARATOR (path[0])) 4766 return xstrdup (path); 4767 4768 /* prepend the current directory */ 4769 /* doesn't handle '~' */ 4770 if (getcwd (tmp, LT_PATHMAX) == NULL) 4771 lt_fatal ("getcwd failed"); 4772 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ 4773 p = XMALLOC(char, size); 4774 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); 4775 return p; 4776 } 4777 4778 char * 4779 strendzap(char *str, const char *pat) 4780 { 4781 size_t len, patlen; 4782 4783 assert(str != NULL); 4784 assert(pat != NULL); 4785 4786 len = strlen(str); 4787 patlen = strlen(pat); 4788 4789 if (patlen <= len) 4790 { 4791 str += len - patlen; 4792 if (strcmp(str, pat) == 0) 4793 *str = '\0'; 4794 } 4795 return str; 4796 } 4797 4798 static void 4799 lt_error_core (int exit_status, const char * mode, 4800 const char * message, va_list ap) 4801 { 4802 fprintf (stderr, "%s: %s: ", program_name, mode); 4803 vfprintf (stderr, message, ap); 4804 fprintf (stderr, ".\n"); 4805 4806 if (exit_status >= 0) 4807 exit (exit_status); 4808 } 4809 4810 void 4811 lt_fatal (const char *message, ...) 4812 { 4813 va_list ap; 4814 va_start (ap, message); 4815 lt_error_core (EXIT_FAILURE, "FATAL", message, ap); 4816 va_end (ap); 4817 } 4818 EOF 4819 # we should really use a build-platform specific compiler 4820 # here, but OTOH, the wrappers (shell script and this C one) 4821 # are only useful if you want to execute the "real" binary. 4822 # Since the "real" binary is built for $host, then this 4823 # wrapper might as well be built for $host, too. 4824 $run $LTCC -s -o $cwrapper $cwrappersource 4825 ;; 4826 esac 3660 4827 $rm $output 3661 trap "$rm $output; exit 1" 1 2 154828 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 3662 4829 3663 4830 $echo > $output "\ … … 3675 4842 # Sed substitution that helps us do robust quoting. It backslashifies 3676 4843 # metacharacters that are still active within double-quoted strings. 3677 Xsed= "${SED}"'-e 1s/^X//'4844 Xsed='${SED} -e 1s/^X//' 3678 4845 sed_quote_subst='$sed_quote_subst' 3679 4846 3680 4847 # The HP-UX ksh and POSIX shell print the target directory to stdout 3681 4848 # if CDPATH is set. 3682 if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi 4849 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH 3683 4850 3684 4851 relink_command=\"$relink_command\" … … 3735 4902 3736 4903 if test "$fast_install" = yes; then 3737 echo >> $output "\4904 $echo >> $output "\ 3738 4905 program=lt-'$outputname'$exeext 3739 4906 progdir=\"\$thisdir/$objdir\" … … 3751 4918 fi" 3752 4919 3753 echo >> $output "\4920 $echo >> $output "\ 3754 4921 3755 4922 # relink executable if necessary … … 3759 4926 $echo \"\$relink_command_output\" >&2 3760 4927 $rm \"\$progdir/\$file\" 3761 exit 14928 exit $EXIT_FAILURE 3762 4929 fi 3763 4930 fi … … 3769 4936 fi" 3770 4937 else 3771 echo >> $output "\4938 $echo >> $output "\ 3772 4939 program='$outputname' 3773 4940 progdir=\"\$thisdir/$objdir\" … … 3775 4942 fi 3776 4943 3777 echo >> $output "\4944 $echo >> $output "\ 3778 4945 3779 4946 if test -f \"\$progdir/\$program\"; then" … … 3786 4953 3787 4954 # Some systems cannot cope with colon-terminated $shlibpath_var 3788 # The second colon is a workaround for a bug in BeOS R4 ${SED}4955 # The second colon is a workaround for a bug in BeOS R4 sed 3789 4956 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` 3790 4957 … … 3806 4973 " 3807 4974 case $host in 3808 # win32 systems need to use the prog path for dll3809 # lookup to work3810 *-*-cygwin* | *-*-pw32*)3811 $echo >> $output "\3812 exec \$progdir/\$program \${1+\"\$@\"}3813 "3814 ;;3815 3816 4975 # Backslashes separate directories on plain windows 3817 4976 *-*-mingw | *-*-os2*) … … 3823 4982 *) 3824 4983 $echo >> $output "\ 3825 # Export the path to the program. 3826 PATH=\"\$progdir:\$PATH\" 3827 export PATH 3828 3829 exec \$program \${1+\"\$@\"} 4984 exec \$progdir/\$program \${1+\"\$@\"} 3830 4985 " 3831 4986 ;; … … 3833 4988 $echo >> $output "\ 3834 4989 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" 3835 exit 14990 exit $EXIT_FAILURE 3836 4991 fi 3837 4992 else … … 3839 4994 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 3840 4995 \$echo \"This script is just a wrapper for \$program.\" 1>&2 3841 echo \"See the $PACKAGE documentation for more information.\" 1>&23842 exit 14996 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 4997 exit $EXIT_FAILURE 3843 4998 fi 3844 4999 fi\ … … 3846 5001 chmod +x $output 3847 5002 fi 3848 exit 05003 exit $EXIT_SUCCESS 3849 5004 ;; 3850 5005 esac … … 3862 5017 build_libtool_libs=no 3863 5018 else 3864 oldobjs="$o bjs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`5019 oldobjs="$old_deplibs $non_pic_objects" 3865 5020 fi 3866 5021 addlibs="$old_convenience" … … 3869 5024 if test -n "$addlibs"; then 3870 5025 gentop="$output_objdir/${outputname}x" 3871 $show "${rm}r $gentop"3872 $run ${rm}r "$gentop"3873 $show "mkdir $gentop"3874 $run mkdir "$gentop"3875 status=$?3876 if test $status -ne 0 && test ! -d "$gentop"; then3877 exit $status3878 fi3879 5026 generated="$generated $gentop" 3880 5027 3881 # Add in members from convenience archives. 3882 for xlib in $addlibs; do 3883 # Extract the objects. 3884 case $xlib in 3885 [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; 3886 *) xabs=`pwd`"/$xlib" ;; 3887 esac 3888 xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` 3889 xdir="$gentop/$xlib" 3890 3891 $show "${rm}r $xdir" 3892 $run ${rm}r "$xdir" 3893 $show "mkdir $xdir" 3894 $run mkdir "$xdir" 3895 status=$? 3896 if test $status -ne 0 && test ! -d "$xdir"; then 3897 exit $status 3898 fi 3899 $show "(cd $xdir && $AR x $xabs)" 3900 $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? 3901 3902 oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` 3903 done 5028 func_extract_archives $gentop $addlibs 5029 oldobjs="$oldobjs $func_extract_archives_result" 3904 5030 fi 3905 5031 3906 5032 # Do each command in the archive commands. 3907 5033 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then 3908 eval cmds=\"$old_archive_from_new_cmds\" 5034 cmds=$old_archive_from_new_cmds 3909 5035 else 3910 # Ensure that we have .o objects in place in case we decided 3911 # not to build a shared library, and have fallen back to building 3912 # static libs even though --disable-static was passed! 3913 for oldobj in $oldobjs; do 3914 if test ! -f $oldobj; then 3915 xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'` 3916 if test "X$xdir" = "X$oldobj"; then 3917 xdir="." 5036 eval cmds=\"$old_archive_cmds\" 5037 5038 if len=`expr "X$cmds" : ".*"` && 5039 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5040 cmds=$old_archive_cmds 5041 else 5042 # the command line is too long to link in one step, link in parts 5043 $echo "using piecewise archive linking..." 5044 save_RANLIB=$RANLIB 5045 RANLIB=: 5046 objlist= 5047 concat_cmds= 5048 save_oldobjs=$oldobjs 5049 # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5050 # encoded into archives. This makes 'ar r' malfunction in 5051 # this piecewise linking case whenever conflicting object 5052 # names appear in distinct ar calls; check, warn and compensate. 5053 if (for obj in $save_oldobjs 5054 do 5055 $echo "X$obj" | $Xsed -e 's%^.*/%%' 5056 done | sort | sort -uc >/dev/null 2>&1); then 5057 : 5058 else 5059 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 5060 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 5061 AR_FLAGS=cq 5062 fi 5063 # Is there a better way of finding the last object in the list? 5064 for obj in $save_oldobjs 5065 do 5066 last_oldobj=$obj 5067 done 5068 for obj in $save_oldobjs 5069 do 5070 oldobjs="$objlist $obj" 5071 objlist="$objlist $obj" 5072 eval test_cmds=\"$old_archive_cmds\" 5073 if len=`expr "X$test_cmds" : ".*"` && 5074 test "$len" -le "$max_cmd_len"; then 5075 : 3918 5076 else 3919 xdir="$xdir" 5077 # the above command should be used before it gets too long 5078 oldobjs=$objlist 5079 if test "$obj" = "$last_oldobj" ; then 5080 RANLIB=$save_RANLIB 5081 fi 5082 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5083 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 5084 objlist= 3920 5085 fi 3921 baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'` 3922 obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"` 3923 $show "(cd $xdir && ${LN_S} $obj $baseobj)" 3924 $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $? 3925 fi 3926 done 3927 3928 eval cmds=\"$old_archive_cmds\" 5086 done 5087 RANLIB=$save_RANLIB 5088 oldobjs=$objlist 5089 if test "X$oldobjs" = "X" ; then 5090 eval cmds=\"\$concat_cmds\" 5091 else 5092 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 5093 fi 5094 fi 3929 5095 fi 3930 5096 save_ifs="$IFS"; IFS='~' 3931 5097 for cmd in $cmds; do 5098 eval cmd=\"$cmd\" 3932 5099 IFS="$save_ifs" 3933 5100 $show "$cmd" … … 3961 5128 done 3962 5129 # Quote the link command for shipping. 3963 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@)" 3964 5131 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` 5132 if test "$hardcode_automatic" = yes ; then 5133 relink_command= 5134 fi 5135 3965 5136 3966 5137 # Only create the output if not a dry run. … … 3981 5152 if test -z "$libdir"; then 3982 5153 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 3983 exit 15154 exit $EXIT_FAILURE 3984 5155 fi 3985 5156 newdependency_libs="$newdependency_libs $libdir/$name" … … 3995 5166 if test -z "$libdir"; then 3996 5167 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 3997 exit 15168 exit $EXIT_FAILURE 3998 5169 fi 3999 5170 newdlfiles="$newdlfiles $libdir/$name" … … 4006 5177 if test -z "$libdir"; then 4007 5178 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4008 exit 15179 exit $EXIT_FAILURE 4009 5180 fi 4010 5181 newdlprefiles="$newdlprefiles $libdir/$name" 4011 5182 done 4012 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" 5201 done 5202 dlprefiles="$newdlprefiles" 4013 5203 fi 4014 5204 $rm $output … … 4016 5206 tdlname=$dlname 4017 5207 case $host,$output,$installed,$module,$dlname in 4018 *cygwin*,*lai,yes,no,*.dll ) tdlname=../bin/$dlname ;;5208 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; 4019 5209 esac 4020 5210 $echo > $output "\ … … 4045 5235 installed=$installed 4046 5236 5237 # Should we warn about portability when linking against -modules? 5238 shouldnotlink=$module 5239 4047 5240 # Files to dlopen/dlpreopen 4048 5241 dlopen='$dlfiles' … … 4051 5244 # Directory that this library needs to be installed in: 4052 5245 libdir='$install_libdir'" 4053 if test "$installed" = no && test $need_relink= yes; then5246 if test "$installed" = no && test "$need_relink" = yes; then 4054 5247 $echo >> $output "\ 4055 5248 relink_command=\"$relink_command\"" … … 4064 5257 ;; 4065 5258 esac 4066 exit 05259 exit $EXIT_SUCCESS 4067 5260 ;; 4068 5261 … … 4153 5346 $echo "$modename: you must specify an install program" 1>&2 4154 5347 $echo "$help" 1>&2 4155 exit 15348 exit $EXIT_FAILURE 4156 5349 fi 4157 5350 … … 4159 5352 $echo "$modename: the \`$prev' option requires an argument" 1>&2 4160 5353 $echo "$help" 1>&2 4161 exit 15354 exit $EXIT_FAILURE 4162 5355 fi 4163 5356 … … 4169 5362 fi 4170 5363 $echo "$help" 1>&2 4171 exit 15364 exit $EXIT_FAILURE 4172 5365 fi 4173 5366 … … 4187 5380 # Not a directory, so check to see that there is only one file specified. 4188 5381 set dummy $files 4189 if test $#-gt 2; then5382 if test "$#" -gt 2; then 4190 5383 $echo "$modename: \`$dest' is not a directory" 1>&2 4191 5384 $echo "$help" 1>&2 4192 exit 15385 exit $EXIT_FAILURE 4193 5386 fi 4194 5387 fi … … 4202 5395 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 4203 5396 $echo "$help" 1>&2 4204 exit 15397 exit $EXIT_FAILURE 4205 5398 ;; 4206 5399 esac … … 4227 5420 *.la) 4228 5421 # Check to see that this really is a libtool archive. 4229 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :5422 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 4230 5423 else 4231 5424 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 4232 5425 $echo "$help" 1>&2 4233 exit 15426 exit $EXIT_FAILURE 4234 5427 fi 4235 5428 … … 4263 5456 if test -n "$relink_command"; then 4264 5457 # Determine the prefix the user has applied to our future dir. 4265 inst_prefix_dir=`$echo "$destdir" | sed"s%$libdir\$%%"`5458 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` 4266 5459 4267 5460 # Don't allow the user to place us outside of our expected 4268 5461 # location b/c this prevents finding dependent libraries that 4269 5462 # are installed to the same prefix. 5463 # At present, this check doesn't affect windows .dll's that 5464 # are installed into $libdir/../bin (currently, that works fine) 5465 # but it's something to keep an eye on. 4270 5466 if test "$inst_prefix_dir" = "$destdir"; then 4271 5467 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 4272 exit 15468 exit $EXIT_FAILURE 4273 5469 fi 4274 5470 4275 5471 if test -n "$inst_prefix_dir"; then 4276 5472 # Stick the inst_prefix_dir data into the link command. 4277 relink_command=`$echo "$relink_command" | sed"s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`5473 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` 4278 5474 else 4279 relink_command=`$echo "$relink_command" | sed"s%@inst_prefix_dir@%%"`5475 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` 4280 5476 fi 4281 5477 … … 4285 5481 else 4286 5482 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 4287 exit 15483 exit $EXIT_FAILURE 4288 5484 fi 4289 5485 fi … … 4307 5503 fi 4308 5504 4309 if test $#-gt 0; then5505 if test "$#" -gt 0; then 4310 5506 # Delete the old symlinks, and create new ones. 4311 5507 for linkname … … 4320 5516 # Do each command in the postinstall commands. 4321 5517 lib="$destdir/$realname" 4322 eval cmds=\"$postinstall_cmds\"5518 cmds=$postinstall_cmds 4323 5519 save_ifs="$IFS"; IFS='~' 4324 5520 for cmd in $cmds; do 4325 5521 IFS="$save_ifs" 5522 eval cmd=\"$cmd\" 4326 5523 $show "$cmd" 4327 5524 $run eval "$cmd" || exit $? … … 4363 5560 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 4364 5561 $echo "$help" 1>&2 4365 exit 15562 exit $EXIT_FAILURE 4366 5563 ;; 4367 5564 esac … … 4381 5578 $run eval "$install_prog \$staticobj \$staticdest" || exit $? 4382 5579 fi 4383 exit 05580 exit $EXIT_SUCCESS 4384 5581 ;; 4385 5582 … … 4393 5590 fi 4394 5591 5592 # If the file is missing, and there is a .exe on the end, strip it 5593 # because it is most likely a libtool script we actually want to 5594 # install 5595 stripped_ext="" 5596 case $file in 5597 *.exe) 5598 if test ! -f "$file"; then 5599 file=`$echo $file|${SED} 's,.exe$,,'` 5600 stripped_ext=".exe" 5601 fi 5602 ;; 5603 esac 5604 4395 5605 # Do a test to see if this is really a libtool program. 4396 5606 case $host in 4397 5607 *cygwin*|*mingw*) 4398 wrapper=` echo $file | ${SED} -e 's,.exe$,,'`5608 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` 4399 5609 ;; 4400 5610 *) … … 4402 5612 ;; 4403 5613 esac 4404 if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then5614 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then 4405 5615 notinst_deplibs= 4406 5616 relink_command= 4407 5617 5618 # To insure that "foo" is sourced, and not "foo.exe", 5619 # finese the cygwin/MSYS system by explicitly sourcing "foo." 5620 # which disallows the automatic-append-.exe behavior. 5621 case $build in 5622 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 5623 *) wrapperdot=${wrapper} ;; 5624 esac 4408 5625 # If there is no directory component, then add one. 4409 5626 case $file in 4410 */* | *\\*) . $ wrapper;;4411 *) . ./$ wrapper;;5627 */* | *\\*) . ${wrapperdot} ;; 5628 *) . ./${wrapperdot} ;; 4412 5629 esac 4413 5630 … … 4415 5632 if test -z "$notinst_deplibs"; then 4416 5633 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 4417 exit 15634 exit $EXIT_FAILURE 4418 5635 fi 4419 5636 … … 4437 5654 4438 5655 relink_command= 5656 # To insure that "foo" is sourced, and not "foo.exe", 5657 # finese the cygwin/MSYS system by explicitly sourcing "foo." 5658 # which disallows the automatic-append-.exe behavior. 5659 case $build in 5660 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; 5661 *) wrapperdot=${wrapper} ;; 5662 esac 4439 5663 # If there is no directory component, then add one. 4440 5664 case $file in 4441 */* | *\\*) . $ wrapper;;4442 *) . ./$ wrapper;;5665 */* | *\\*) . ${wrapperdot} ;; 5666 *) . ./${wrapperdot} ;; 4443 5667 esac 4444 5668 … … 4448 5672 tmpdir="/tmp" 4449 5673 test -n "$TMPDIR" && tmpdir="$TMPDIR" 4450 tmpdir_mktemp=`mktemp -d $tmpdir/libtool-XXXXXX 2> /dev/null` 4451 if test $? = 0 ; then 4452 tmpdir="$tmpdir_mktemp" 4453 unset tmpdir_mktemp 4454 else 4455 tmpdir="$tmpdir/libtool-$$" 4456 fi 4457 if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then : 5674 tmpdir="$tmpdir/libtool-$$" 5675 save_umask=`umask` 5676 umask 0077 5677 if $mkdir "$tmpdir"; then 5678 umask $save_umask 4458 5679 else 5680 umask $save_umask 4459 5681 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 4460 5682 continue 4461 5683 fi 4462 file=`$echo "X$file " | $Xsed -e 's%^.*/%%'`5684 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` 4463 5685 outputname="$tmpdir/$file" 4464 5686 # Replace the output file specification. … … 4478 5700 else 4479 5701 # Install the binary that we compiled earlier. 4480 file=`$echo "X$file " | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`5702 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` 4481 5703 fi 4482 5704 fi … … 4485 5707 # one anyways 4486 5708 case $install_prog,$host in 4487 /usr/bin/install*,*cygwin*)5709 */usr/bin/install*,*cygwin*) 4488 5710 case $file:$destfile in 4489 5711 *.exe:*.exe) … … 4494 5716 ;; 4495 5717 *:*.exe) 4496 destfile=` echo $destfile | ${SED} -e 's,.exe$,,'`5718 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` 4497 5719 ;; 4498 5720 esac … … 4515 5737 $run eval "$install_prog \$file \$oldlib" || exit $? 4516 5738 4517 if test -n "$stripme" && test -n "$ striplib"; then5739 if test -n "$stripme" && test -n "$old_striplib"; then 4518 5740 $show "$old_striplib $oldlib" 4519 5741 $run eval "$old_striplib $oldlib" || exit $? … … 4521 5743 4522 5744 # Do each command in the postinstall commands. 4523 eval cmds=\"$old_postinstall_cmds\"5745 cmds=$old_postinstall_cmds 4524 5746 save_ifs="$IFS"; IFS='~' 4525 5747 for cmd in $cmds; do 4526 5748 IFS="$save_ifs" 5749 eval cmd=\"$cmd\" 4527 5750 $show "$cmd" 4528 5751 $run eval "$cmd" || exit $? … … 4538 5761 # Maybe just do a dry run. 4539 5762 test -n "$run" && current_libdirs=" -n$current_libdirs" 4540 exec_cmd='$SHELL $ 0--finish$current_libdirs'5763 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' 4541 5764 else 4542 exit 05765 exit $EXIT_SUCCESS 4543 5766 fi 4544 5767 ;; … … 4559 5782 if test -n "$finish_cmds"; then 4560 5783 # Do each command in the finish commands. 4561 eval cmds=\"$finish_cmds\"5784 cmds=$finish_cmds 4562 5785 save_ifs="$IFS"; IFS='~' 4563 5786 for cmd in $cmds; do 4564 5787 IFS="$save_ifs" 5788 eval cmd=\"$cmd\" 4565 5789 $show "$cmd" 4566 5790 $run eval "$cmd" || admincmds="$admincmds … … 4579 5803 4580 5804 # Exit here if they wanted silent mode. 4581 test "$show" = ":" && exit 04582 4583 echo "----------------------------------------------------------------------"4584 echo "Libraries have been installed in:"5805 test "$show" = : && exit $EXIT_SUCCESS 5806 5807 $echo "----------------------------------------------------------------------" 5808 $echo "Libraries have been installed in:" 4585 5809 for libdir in $libdirs; do 4586 echo " $libdir"5810 $echo " $libdir" 4587 5811 done 4588 echo4589 echo "If you ever happen to want to link against installed libraries"4590 echo "in a given directory, LIBDIR, you must either use libtool, and"4591 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"4592 echo "flag during linking and do at least one of the following:"5812 $echo 5813 $echo "If you ever happen to want to link against installed libraries" 5814 $echo "in a given directory, LIBDIR, you must either use libtool, and" 5815 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" 5816 $echo "flag during linking and do at least one of the following:" 4593 5817 if test -n "$shlibpath_var"; then 4594 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"4595 echo " during execution"5818 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" 5819 $echo " during execution" 4596 5820 fi 4597 5821 if test -n "$runpath_var"; then 4598 echo " - add LIBDIR to the \`$runpath_var' environment variable"4599 echo " during linking"5822 $echo " - add LIBDIR to the \`$runpath_var' environment variable" 5823 $echo " during linking" 4600 5824 fi 4601 5825 if test -n "$hardcode_libdir_flag_spec"; then … … 4603 5827 eval flag=\"$hardcode_libdir_flag_spec\" 4604 5828 4605 echo " - use the \`$flag' linker flag"5829 $echo " - use the \`$flag' linker flag" 4606 5830 fi 4607 5831 if test -n "$admincmds"; then 4608 echo " - have your system administrator run these commands:$admincmds"5832 $echo " - have your system administrator run these commands:$admincmds" 4609 5833 fi 4610 5834 if test -f /etc/ld.so.conf; then 4611 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"5835 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" 4612 5836 fi 4613 echo4614 echo "See any operating system documentation about shared libraries for"4615 echo "more information, such as the ld(1) and ld.so(8) manual pages."4616 echo "----------------------------------------------------------------------"4617 exit 05837 $echo 5838 $echo "See any operating system documentation about shared libraries for" 5839 $echo "more information, such as the ld(1) and ld.so(8) manual pages." 5840 $echo "----------------------------------------------------------------------" 5841 exit $EXIT_SUCCESS 4618 5842 ;; 4619 5843 … … 4627 5851 $echo "$modename: you must specify a COMMAND" 1>&2 4628 5852 $echo "$help" 4629 exit 15853 exit $EXIT_FAILURE 4630 5854 fi 4631 5855 … … 4635 5859 $echo "$modename: \`$file' is not a file" 1>&2 4636 5860 $echo "$help" 1>&2 4637 exit 15861 exit $EXIT_FAILURE 4638 5862 fi 4639 5863 … … 4642 5866 *.la) 4643 5867 # Check to see that this really is a libtool archive. 4644 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :5868 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : 4645 5869 else 4646 5870 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 4647 5871 $echo "$help" 1>&2 4648 exit 15872 exit $EXIT_FAILURE 4649 5873 fi 4650 5874 … … 4673 5897 else 4674 5898 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 4675 exit 15899 exit $EXIT_FAILURE 4676 5900 fi 4677 5901 ;; … … 4713 5937 *) 4714 5938 # Do a test to see if this is really a libtool program. 4715 if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then5939 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4716 5940 # If there is no directory component, then add one. 4717 5941 case $file in … … 4736 5960 fi 4737 5961 4738 # Restore saved enviro ment variables5962 # Restore saved environment variables 4739 5963 if test "${save_LC_ALL+set}" = set; then 4740 5964 LC_ALL="$save_LC_ALL"; export LC_ALL … … 4745 5969 4746 5970 # Now prepare to actually exec the command. 4747 exec_cmd="\ $cmd$args"5971 exec_cmd="\"\$cmd\"$args" 4748 5972 else 4749 5973 # Display what would be done. … … 4752 5976 $echo "export $shlibpath_var" 4753 5977 fi 4754 $echo "$cmd$args"4755 exit 05978 eval \$echo \"\$cmd\"$args 5979 exit $EXIT_SUCCESS 4756 5980 fi 4757 5981 ;; … … 4781 6005 $echo "$modename: you must specify an RM program" 1>&2 4782 6006 $echo "$help" 1>&2 4783 exit 16007 exit $EXIT_FAILURE 4784 6008 fi 4785 6009 4786 6010 rmdirs= 4787 6011 6012 origobjdir="$objdir" 4788 6013 for file in $files; do 4789 6014 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` 4790 6015 if test "X$dir" = "X$file"; then 4791 6016 dir=. 4792 objdir="$o bjdir"6017 objdir="$origobjdir" 4793 6018 else 4794 objdir="$dir/$o bjdir"6019 objdir="$dir/$origobjdir" 4795 6020 fi 4796 6021 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` 4797 test $mode= uninstall && objdir="$dir"6022 test "$mode" = uninstall && objdir="$dir" 4798 6023 4799 6024 # Remember objdir for removal later, being careful to avoid duplicates 4800 if test $mode= clean; then6025 if test "$mode" = clean; then 4801 6026 case " $rmdirs " in 4802 6027 *" $objdir "*) ;; … … 4822 6047 *.la) 4823 6048 # Possibly a libtool archive, so verify it. 4824 if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then6049 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4825 6050 . $dir/$name 4826 6051 … … 4830 6055 done 4831 6056 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" 4832 test $mode= clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"4833 4834 if test $mode= uninstall; then6057 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" 6058 6059 if test "$mode" = uninstall; then 4835 6060 if test -n "$library_names"; then 4836 6061 # Do each command in the postuninstall commands. 4837 eval cmds=\"$postuninstall_cmds\"6062 cmds=$postuninstall_cmds 4838 6063 save_ifs="$IFS"; IFS='~' 4839 6064 for cmd in $cmds; do 4840 6065 IFS="$save_ifs" 6066 eval cmd=\"$cmd\" 4841 6067 $show "$cmd" 4842 6068 $run eval "$cmd" 4843 if test $? !=0 && test "$rmforce" != yes; then6069 if test "$?" -ne 0 && test "$rmforce" != yes; then 4844 6070 exit_status=1 4845 6071 fi … … 4850 6076 if test -n "$old_library"; then 4851 6077 # Do each command in the old_postuninstall commands. 4852 eval cmds=\"$old_postuninstall_cmds\"6078 cmds=$old_postuninstall_cmds 4853 6079 save_ifs="$IFS"; IFS='~' 4854 6080 for cmd in $cmds; do 4855 6081 IFS="$save_ifs" 6082 eval cmd=\"$cmd\" 4856 6083 $show "$cmd" 4857 6084 $run eval "$cmd" 4858 if test $? !=0 && test "$rmforce" != yes; then6085 if test "$?" -ne 0 && test "$rmforce" != yes; then 4859 6086 exit_status=1 4860 6087 fi … … 4868 6095 4869 6096 *.lo) 4870 if test "$build_old_libs" = yes; then 4871 oldobj=`$echo "X$name" | $Xsed -e "$lo2o"` 4872 rmfiles="$rmfiles $dir/$oldobj" 6097 # Possibly a libtool object, so verify it. 6098 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6099 6100 # Read the .lo file 6101 . $dir/$name 6102 6103 # Add PIC object to the list of files to remove. 6104 if test -n "$pic_object" \ 6105 && test "$pic_object" != none; then 6106 rmfiles="$rmfiles $dir/$pic_object" 6107 fi 6108 6109 # Add non-PIC object to the list of files to remove. 6110 if test -n "$non_pic_object" \ 6111 && test "$non_pic_object" != none; then 6112 rmfiles="$rmfiles $dir/$non_pic_object" 6113 fi 4873 6114 fi 4874 6115 ;; 4875 6116 4876 6117 *) 4877 # Do a test to see if this is a libtool program. 4878 if test $mode = clean && 4879 (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 4880 relink_command= 4881 . $dir/$file 4882 4883 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" 4884 if test "$fast_install" = yes && test -n "$relink_command"; then 4885 rmfiles="$rmfiles $objdir/lt-$name" 6118 if test "$mode" = clean ; then 6119 noexename=$name 6120 case $file in 6121 *.exe) 6122 file=`$echo $file|${SED} 's,.exe$,,'` 6123 noexename=`$echo $name|${SED} 's,.exe$,,'` 6124 # $file with .exe has already been added to rmfiles, 6125 # add $file without .exe 6126 rmfiles="$rmfiles $file" 6127 ;; 6128 esac 6129 # Do a test to see if this is a libtool program. 6130 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then 6131 relink_command= 6132 . $dir/$noexename 6133 6134 # note $name still contains .exe if it was in $file originally 6135 # as does the version of $file that was added into $rmfiles 6136 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" 6137 if test "$fast_install" = yes && test -n "$relink_command"; then 6138 rmfiles="$rmfiles $objdir/lt-$name" 6139 fi 6140 if test "X$noexename" != "X$name" ; then 6141 rmfiles="$rmfiles $objdir/lt-${noexename}.c" 6142 fi 4886 6143 fi 4887 6144 fi … … 4891 6148 $run $rm $rmfiles || exit_status=1 4892 6149 done 6150 objdir="$origobjdir" 4893 6151 4894 6152 # Try to remove the ${objdir}s in the directories where we deleted files … … 4906 6164 $echo "$modename: you must specify a MODE" 1>&2 4907 6165 $echo "$generic_help" 1>&2 4908 exit 16166 exit $EXIT_FAILURE 4909 6167 ;; 4910 6168 esac … … 4913 6171 $echo "$modename: invalid operation mode \`$mode'" 1>&2 4914 6172 $echo "$generic_help" 1>&2 4915 exit 16173 exit $EXIT_FAILURE 4916 6174 fi 4917 6175 fi # test -z "$show_help" … … 4919 6177 if test -n "$exec_cmd"; then 4920 6178 eval exec $exec_cmd 4921 exit 16179 exit $EXIT_FAILURE 4922 6180 fi 4923 6181 … … 4938 6196 --quiet same as \`--silent' 4939 6197 --silent don't print informational messages 6198 --tag=TAG use configuration variables from tag TAG 4940 6199 --version print version information 4941 6200 … … 4951 6210 4952 6211 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for 4953 a more detailed description of MODE." 4954 exit 0 6212 a more detailed description of MODE. 6213 6214 Report bugs to <bug-libtool@gnu.org>." 6215 exit $EXIT_SUCCESS 4955 6216 ;; 4956 6217 … … 5063 6324 -no-undefined declare that a library does not refer to external symbols 5064 6325 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects 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 5065 6329 -release RELEASE specify package release information 5066 6330 -rpath LIBDIR the created library will eventually be installed in LIBDIR … … 5104 6368 $echo "$modename: invalid operation mode \`$mode'" 1>&2 5105 6369 $echo "$help" 1>&2 5106 exit 16370 exit $EXIT_FAILURE 5107 6371 ;; 5108 6372 esac 5109 6373 5110 echo6374 $echo 5111 6375 $echo "Try \`$modename --help' for more information about other modes." 5112 6376 5113 exit 0 6377 exit $EXIT_SUCCESS 6378 6379 # The TAGs below are defined such that we never get into a situation 6380 # in which we disable both kinds of libraries. Given conflicting 6381 # choices, we go for a static library, that is the most portable, 6382 # since we can't tell whether shared libraries were disabled because 6383 # the user asked for that or because the platform doesn't support 6384 # them. This is particularly important on AIX, because we don't 6385 # support having both static and shared libraries enabled at the same 6386 # time on that platform, so we default to a shared-only configuration. 6387 # If a disable-shared tag is given, we'll fallback to a static-only 6388 # configuration. But we'll never go from static-only to shared-only. 6389 6390 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared 6391 build_libtool_libs=no 6392 build_old_libs=yes 6393 # ### END LIBTOOL TAG CONFIG: disable-shared 6394 6395 # ### BEGIN LIBTOOL TAG CONFIG: disable-static 6396 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` 6397 # ### END LIBTOOL TAG CONFIG: disable-static 5114 6398 5115 6399 # Local Variables: -
trunk/psLib/pslib.kdevses
r3381 r3407 4 4 <DocsAndViews NumberOfDocuments="5" > 5 5 <Doc0 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/astronomy/psMetadata.c" > 6 <View0 line=" 593" Type="Source" />6 <View0 line="477" Type="Source" /> 7 7 </Doc0> 8 8 <Doc1 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/astronomy/psMetadata.h" > 9 <View0 line="1 03" Type="Source" />9 <View0 line="130" Type="Source" /> 10 10 </Doc1> 11 11 <Doc2 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/collections/psList.h" > 12 <View0 line=" 79" Type="Source" />12 <View0 line="88" Type="Source" /> 13 13 </Doc2> 14 <Doc3 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/ astronomy/psAstronomyErrors.dat" >15 <View0 line=" 50" Type="Source" />14 <Doc3 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/fileUtils/psFits.c" > 15 <View0 line="1658" Type="Source" /> 16 16 </Doc3> 17 <Doc4 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/ collections/psList.c" >18 <View0 line="2 16" Type="Source" />17 <Doc4 NumberOfViews="1" URL="file:/home/desonia/panstarrs/psLib/src/fileUtils/psFits.h" > 18 <View0 line="260" Type="Source" /> 19 19 </Doc4> 20 20 </DocsAndViews> -
trunk/psLib/src/astronomy/psMetadata.c
r3381 r3407 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.5 4$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03- 07 20:58:50$14 * @version $Revision: 1.55 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-11 20:38:56 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 67 67 /* FUNCTION IMPLEMENTATION - LOCAL */ 68 68 /*****************************************************************************/ 69 70 static psMetadataItem* makeMetaMulti(psHash* table, const char* key, psMetadataItem* existing) 71 { 72 73 if (existing != NULL && existing->type == PS_META_MULTI) { 74 return existing; 75 } 76 77 // move any existing entry into a psList 78 psList* newList = psListAlloc(existing); 79 80 psMetadataItem* item = psMetadataItemAlloc(key, 81 PS_META_MULTI, 82 "", 83 newList); 84 85 if (existing != NULL) { 86 psHashRemove(table,key); // take out the old entry 87 } 88 89 psHashAdd(table, key, item); // put in the new entry 90 91 // free local references of newly allocated items. 92 psFree(newList); 93 psFree(item); 94 95 return item; 96 } 69 97 70 98 static void metadataItemFree(psMetadataItem* metadataItem) … … 253 281 existingEntry = (psMetadataItem*)psHashLookup(mdTable, key); 254 282 255 // how the item is added to the hash depends on flags & prior existence 256 if(existingEntry != NULL) { 257 if ((flags & PS_META_DUPLICATE_OK) != 0) { 283 if (metadataItem->type == PS_META_MULTI) { 284 // the incoming entry is PS_META_MULTI 285 286 // force the hash entry to be PS_META_MULTI 287 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 288 289 // add all the items in the incoming entry to metadata 290 psList* list = metadataItem->data.list; 291 if (list != NULL) { 292 psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD,true); 293 psMetadataItem* listItem; 294 while ((listItem=(psMetadataItem*)psListGetAndIncrement(iter)) != NULL) { 295 psMetadataAddItem(md,listItem,location,flags); 296 } 297 psFree(iter); 298 } 299 300 return true; // all done. 301 } 302 303 // how the item is added to the hash depends on prior existence, flags, etc. 304 if(existingEntry != NULL) { // prior existence 305 if (existingEntry->type == PS_META_MULTI || (flags & PS_META_DUPLICATE_OK) != 0) { 258 306 // duplicate entries allowed - add another entry. 259 if (existingEntry->type != PS_META_MULTI) { 260 // first duplicate, transfer the hash's old entry into a 261 // list of entries with the type PS_META_MULTI. 262 263 // add entry to a list and dereference the local pointer 264 psList* newList = psListAlloc(existingEntry); 265 266 existingEntry = psMetadataItemAlloc(key, 267 PS_META_MULTI, 268 "", 269 newList); 270 psHashRemove(mdTable,key); // take out the old entry 271 psHashAdd(mdTable, key, existingEntry); // put in the new entry 272 273 // free local references of newly allocated items. 274 psFree(newList); 275 psFree(existingEntry); 276 277 } 307 308 // make sure the existing entry is PS_META_MULTI 309 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 278 310 279 311 // add to the hash's list of duplicate entries … … 282 314 return false; 283 315 } 284 // (added to list below)285 286 316 } else if ((flags & PS_META_REPLACE) != 0) { 287 317 // replace entry instead of creating a duplicate entry. 288 318 289 319 // remove the existing entry from metadata 290 psListRemoveData(mdList, existingEntry); 291 psHashRemove(mdTable, key); 320 psMetadataRemove(md,0,key); 292 321 293 322 // treat as if new (added to list below) … … 423 452 // multiple entries with same key, remove just the specified one 424 453 psListRemoveData(tableItem->data.list, entry); 425 if (psListGet(tableItem->data.list,PS_LIST_HEAD) == NULL) {426 // list is empty, so let's clear the whole entry now.427 if (!psHashRemove(mdTable, key)) {428 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);429 return false;430 }431 }432 454 } else { 433 455 if (!psHashRemove(mdTable, key)) { -
trunk/psLib/src/astronomy/psMetadata.h
r3381 r3407 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-03- 07 20:58:50$13 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-11 20:38:56 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 */ 38 38 typedef enum { 39 PS_META_S32 ,///< psS32 primitive data.40 PS_META_F32 ,///< psF32 primitive data.41 PS_META_F64 ,///< psF64 primitive data.42 PS_META_BOOL ,///< psBool primitive data.43 PS_META_LIST ,///< List data (Stored as item.data.list).39 PS_META_S32 = PS_TYPE_S32, ///< psS32 primitive data. 40 PS_META_F32 = PS_TYPE_F32, ///< psF32 primitive data. 41 PS_META_F64 = PS_TYPE_F64, ///< psF64 primitive data. 42 PS_META_BOOL = PS_TYPE_BOOL, ///< psBool primitive data. 43 PS_META_LIST = 0x10000, ///< List data (Stored as item.data.list). 44 44 PS_META_STR, ///< String data (Stored as item.data.V). 45 45 PS_META_VEC, ///< Vector data (Stored as item.data.V). … … 51 51 PS_META_ASTROM, ///< Astrometric coefficients (Stored as item.data.V). 52 52 PS_META_UNKNOWN, ///< Other data (Stored as item.data.V). 53 PS_META_MULTI, ///< Used internally, do not create an metadata item of this type. 54 PS_META_NTYPE ///< Number of types. Must be last. 53 PS_META_MULTI ///< Used internally, do not create an metadata item of this type. 55 54 } psMetadataType; 56 55 -
trunk/psLib/src/collections/psMetadata.c
r3381 r3407 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.5 4$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03- 07 20:58:50$14 * @version $Revision: 1.55 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-11 20:38:56 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 67 67 /* FUNCTION IMPLEMENTATION - LOCAL */ 68 68 /*****************************************************************************/ 69 70 static psMetadataItem* makeMetaMulti(psHash* table, const char* key, psMetadataItem* existing) 71 { 72 73 if (existing != NULL && existing->type == PS_META_MULTI) { 74 return existing; 75 } 76 77 // move any existing entry into a psList 78 psList* newList = psListAlloc(existing); 79 80 psMetadataItem* item = psMetadataItemAlloc(key, 81 PS_META_MULTI, 82 "", 83 newList); 84 85 if (existing != NULL) { 86 psHashRemove(table,key); // take out the old entry 87 } 88 89 psHashAdd(table, key, item); // put in the new entry 90 91 // free local references of newly allocated items. 92 psFree(newList); 93 psFree(item); 94 95 return item; 96 } 69 97 70 98 static void metadataItemFree(psMetadataItem* metadataItem) … … 253 281 existingEntry = (psMetadataItem*)psHashLookup(mdTable, key); 254 282 255 // how the item is added to the hash depends on flags & prior existence 256 if(existingEntry != NULL) { 257 if ((flags & PS_META_DUPLICATE_OK) != 0) { 283 if (metadataItem->type == PS_META_MULTI) { 284 // the incoming entry is PS_META_MULTI 285 286 // force the hash entry to be PS_META_MULTI 287 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 288 289 // add all the items in the incoming entry to metadata 290 psList* list = metadataItem->data.list; 291 if (list != NULL) { 292 psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD,true); 293 psMetadataItem* listItem; 294 while ((listItem=(psMetadataItem*)psListGetAndIncrement(iter)) != NULL) { 295 psMetadataAddItem(md,listItem,location,flags); 296 } 297 psFree(iter); 298 } 299 300 return true; // all done. 301 } 302 303 // how the item is added to the hash depends on prior existence, flags, etc. 304 if(existingEntry != NULL) { // prior existence 305 if (existingEntry->type == PS_META_MULTI || (flags & PS_META_DUPLICATE_OK) != 0) { 258 306 // duplicate entries allowed - add another entry. 259 if (existingEntry->type != PS_META_MULTI) { 260 // first duplicate, transfer the hash's old entry into a 261 // list of entries with the type PS_META_MULTI. 262 263 // add entry to a list and dereference the local pointer 264 psList* newList = psListAlloc(existingEntry); 265 266 existingEntry = psMetadataItemAlloc(key, 267 PS_META_MULTI, 268 "", 269 newList); 270 psHashRemove(mdTable,key); // take out the old entry 271 psHashAdd(mdTable, key, existingEntry); // put in the new entry 272 273 // free local references of newly allocated items. 274 psFree(newList); 275 psFree(existingEntry); 276 277 } 307 308 // make sure the existing entry is PS_META_MULTI 309 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 278 310 279 311 // add to the hash's list of duplicate entries … … 282 314 return false; 283 315 } 284 // (added to list below)285 286 316 } else if ((flags & PS_META_REPLACE) != 0) { 287 317 // replace entry instead of creating a duplicate entry. 288 318 289 319 // remove the existing entry from metadata 290 psListRemoveData(mdList, existingEntry); 291 psHashRemove(mdTable, key); 320 psMetadataRemove(md,0,key); 292 321 293 322 // treat as if new (added to list below) … … 423 452 // multiple entries with same key, remove just the specified one 424 453 psListRemoveData(tableItem->data.list, entry); 425 if (psListGet(tableItem->data.list,PS_LIST_HEAD) == NULL) {426 // list is empty, so let's clear the whole entry now.427 if (!psHashRemove(mdTable, key)) {428 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);429 return false;430 }431 }432 454 } else { 433 455 if (!psHashRemove(mdTable, key)) { -
trunk/psLib/src/collections/psMetadata.h
r3381 r3407 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-03- 07 20:58:50$13 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-11 20:38:56 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 */ 38 38 typedef enum { 39 PS_META_S32 ,///< psS32 primitive data.40 PS_META_F32 ,///< psF32 primitive data.41 PS_META_F64 ,///< psF64 primitive data.42 PS_META_BOOL ,///< psBool primitive data.43 PS_META_LIST ,///< List data (Stored as item.data.list).39 PS_META_S32 = PS_TYPE_S32, ///< psS32 primitive data. 40 PS_META_F32 = PS_TYPE_F32, ///< psF32 primitive data. 41 PS_META_F64 = PS_TYPE_F64, ///< psF64 primitive data. 42 PS_META_BOOL = PS_TYPE_BOOL, ///< psBool primitive data. 43 PS_META_LIST = 0x10000, ///< List data (Stored as item.data.list). 44 44 PS_META_STR, ///< String data (Stored as item.data.V). 45 45 PS_META_VEC, ///< Vector data (Stored as item.data.V). … … 51 51 PS_META_ASTROM, ///< Astrometric coefficients (Stored as item.data.V). 52 52 PS_META_UNKNOWN, ///< Other data (Stored as item.data.V). 53 PS_META_MULTI, ///< Used internally, do not create an metadata item of this type. 54 PS_META_NTYPE ///< Number of types. Must be last. 53 PS_META_MULTI ///< Used internally, do not create an metadata item of this type. 55 54 } psMetadataType; 56 55 -
trunk/psLib/src/collections/psVector.c
r3264 r3407 1 2 1 /** @file psVector.c 3 2 * … … 10 9 * @author Robert DeSonia, MHPCC 11 10 * 12 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 2-17 19:26:23$11 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-03-11 20:38:56 $ 14 13 * 15 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 18 17 #include <string.h> // for memcpy 19 18 #include <stdlib.h> 19 #include <stdio.h> 20 20 #include <math.h> 21 21 … … 407 407 return outVector; 408 408 } 409 410 char* psVectorToString(psVector* vector, int maxLength) 411 { 412 413 if (maxLength < 5) { 414 return NULL; 415 } 416 417 char* str = psAlloc(sizeof(char)*maxLength+1); 418 419 if (vector == NULL) { 420 snprintf(str,maxLength, "NULL"); 421 return str; 422 } 423 424 int size = vector->n; 425 426 if (size == 0) { 427 snprintf(str,maxLength, "[]"); 428 return str; 429 } 430 431 char* tempStr = psAlloc(sizeof(char)*maxLength+1); 432 *str = '\0'; 433 bool full = false; 434 435 #define APPEND_ELEMENTS_CASE(TYPE, NATIVE_TYPE, FORMAT) \ 436 case PS_TYPE_##TYPE: \ 437 for (lcv=0; lcv < size && ! full; lcv++) { \ 438 snprintf(tempStr, maxLength, "%s" FORMAT, prefix, (NATIVE_TYPE) (vector->data.TYPE[lcv])); \ 439 strncat(str,tempStr,maxLength); \ 440 full = (strlen(str) > maxLength-2); \ 441 prefix = ","; \ 442 } \ 443 break; 444 445 #define APPEND_ELEMENTS_CASE_COMPLEX(TYPE,CREAL,CIMAG) \ 446 case PS_TYPE_##TYPE: \ 447 for (lcv=0; lcv < size && ! full; lcv++) { \ 448 snprintf(tempStr, maxLength, "%s%g%+gi", prefix, \ 449 CREAL(vector->data.TYPE[lcv]), \ 450 CIMAG(vector->data.TYPE[lcv])); \ 451 full = (strlen(str) > maxLength-2); \ 452 prefix = ","; \ 453 } \ 454 break; 455 456 int lcv; 457 char* prefix = "["; 458 switch(vector->type.type) { 459 APPEND_ELEMENTS_CASE(S8,char,"%hd") 460 APPEND_ELEMENTS_CASE(S16,short int,"%hd") 461 APPEND_ELEMENTS_CASE(S32,int,"%d") 462 APPEND_ELEMENTS_CASE(S64,long,"%ld") 463 APPEND_ELEMENTS_CASE(U8,unsigned char,"%hu") 464 APPEND_ELEMENTS_CASE(U16,unsigned short,"%hu") 465 APPEND_ELEMENTS_CASE(U32,unsigned int, "%u") 466 APPEND_ELEMENTS_CASE(U64,unsigned long,"%lu") 467 APPEND_ELEMENTS_CASE(F32,double,"%g") 468 APPEND_ELEMENTS_CASE(F64,double,"%g") 469 APPEND_ELEMENTS_CASE_COMPLEX(C32,crealf,cimagf) 470 APPEND_ELEMENTS_CASE_COMPLEX(C64,creal,cimag) 471 default: 472 snprintf(str,maxLength,"[...]"); 473 break; 474 } 475 476 if (full) { 477 // couldn't all fit in given string length 478 479 // remove elements until there is room for ",...]" 480 while (strlen(str) > maxLength - 5) { 481 char* lastComma = strrchr(str,','); 482 if (lastComma == NULL) { // no comma, must be first number 483 str[1] = '\0'; 484 } else { 485 *lastComma = '\0'; 486 } 487 } 488 strncat(str,",...]",maxLength); 489 } else { 490 strncat(str,"]",maxLength); 491 } 492 493 psFree(tempStr); 494 495 return str; 496 } 497 -
trunk/psLib/src/collections/psVector.h
r3264 r3407 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 2-17 19:26:23$13 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-11 20:38:56 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 144 144 ); 145 145 146 /** Creates a string from a psVector's values in the form "[x0,x1,x2]". 147 * 148 * @return psPtr a newly allocated string 149 */ 150 char* psVectorToString( 151 psVector* vector, ///< vector to create a string from 152 int maxLength ///< the maximum length of the resulting string 153 ); 154 146 155 /// @} 147 156 -
trunk/psLib/src/dataIO/psFits.c
r3341 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-28 23:34:10$9 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 98 98 break; 99 99 100 case PS_TYPE_BOOL: 100 101 case PS_TYPE_S8: 101 102 bitpix = BYTE_IMG; … … 1450 1451 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1451 1452 PS_ERRORTEXT_psFits_NULL); 1452 return NULL;1453 return false; 1453 1454 } 1454 1455 … … 1619 1620 return true; 1620 1621 } 1622 1623 bool psFitsUpdateTable(psFits* fits, 1624 psMetadata* data, 1625 int row) 1626 { 1627 int status = 0; 1628 1629 if (fits == NULL) { 1630 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1631 PS_ERRORTEXT_psFits_NULL); 1632 return false; 1633 } 1634 1635 if (data == NULL) { 1636 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1637 PS_ERRORTEXT_psFits_IMAGE_NULL); 1638 return false; 1639 } 1640 1641 1642 // check to see if we even are positioned on a table HDU 1643 int hdutype; 1644 if ( fits_get_hdu_type(fits->p_fd,&hdutype, &status) != 0) { 1645 char fitsErr[MAX_STRING_LENGTH]; 1646 (void)fits_get_errstatus(status, fitsErr); 1647 psError(PS_ERR_IO, true, 1648 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED, 1649 fitsErr); 1650 return false; 1651 } 1652 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 1653 psError(PS_ERR_IO, true, 1654 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE); 1655 return false; 1656 } 1657 1658 1659 psMetadataIterator* iter = psMetadataIteratorAlloc(data,PS_LIST_HEAD,NULL); 1660 1661 psMetadataItem* item; 1662 1663 while ( (item=psMetadataGetAndIncrement(iter)) != NULL) { 1664 if (PS_META_IS_PRIMITIVE(item->type)) { 1665 // operating on primitive data type, i.e., not a complex object 1666 int colnum = 0; 1667 1668 if ( fits_get_colnum(fits->p_fd, CASESEN, item->name, &colnum, &status) == 0) { 1669 // cooresponding column found in table 1670 int dataType = 0; 1671 convertPsTypeToFits(item->type, NULL, NULL, &dataType); 1672 1673 if (fits_write_col(fits->p_fd, dataType, colnum, row, 0,1,&item->data,&status) != 0) { 1674 char fitsErr[MAX_STRING_LENGTH]; 1675 (void)fits_get_errstatus(status, fitsErr); 1676 psError(PS_ERR_IO, true, 1677 PS_ERRORTEXT_psFits_WRITE_FAILED, 1678 fits->filename, fitsErr); 1679 return false; 1680 } 1681 } 1682 } 1683 } 1684 1685 psFree(iter); 1686 1687 return true; 1688 } -
trunk/psLib/src/dataIO/psFits.h
r3264 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:24$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 249 249 ); 250 250 251 #if 0 251 252 252 /** Updates a FITS table. The current HDU type must be either 253 253 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. … … 259 259 bool psFitsUpdateTable( 260 260 psFits* fits, ///< the psFits object 261 ps Array* table261 psMetadata* data, 262 262 ///< Array of psMetadata items, which contains the output data items of each row. 263 int row ///< the row number to update. 264 263 265 ); 264 266 … … 266 268 267 269 #endif 268 269 #endif -
trunk/psLib/src/fileUtils/psFits.c
r3341 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-28 23:34:10$9 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 98 98 break; 99 99 100 case PS_TYPE_BOOL: 100 101 case PS_TYPE_S8: 101 102 bitpix = BYTE_IMG; … … 1450 1451 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1451 1452 PS_ERRORTEXT_psFits_NULL); 1452 return NULL;1453 return false; 1453 1454 } 1454 1455 … … 1619 1620 return true; 1620 1621 } 1622 1623 bool psFitsUpdateTable(psFits* fits, 1624 psMetadata* data, 1625 int row) 1626 { 1627 int status = 0; 1628 1629 if (fits == NULL) { 1630 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1631 PS_ERRORTEXT_psFits_NULL); 1632 return false; 1633 } 1634 1635 if (data == NULL) { 1636 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1637 PS_ERRORTEXT_psFits_IMAGE_NULL); 1638 return false; 1639 } 1640 1641 1642 // check to see if we even are positioned on a table HDU 1643 int hdutype; 1644 if ( fits_get_hdu_type(fits->p_fd,&hdutype, &status) != 0) { 1645 char fitsErr[MAX_STRING_LENGTH]; 1646 (void)fits_get_errstatus(status, fitsErr); 1647 psError(PS_ERR_IO, true, 1648 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED, 1649 fitsErr); 1650 return false; 1651 } 1652 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 1653 psError(PS_ERR_IO, true, 1654 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE); 1655 return false; 1656 } 1657 1658 1659 psMetadataIterator* iter = psMetadataIteratorAlloc(data,PS_LIST_HEAD,NULL); 1660 1661 psMetadataItem* item; 1662 1663 while ( (item=psMetadataGetAndIncrement(iter)) != NULL) { 1664 if (PS_META_IS_PRIMITIVE(item->type)) { 1665 // operating on primitive data type, i.e., not a complex object 1666 int colnum = 0; 1667 1668 if ( fits_get_colnum(fits->p_fd, CASESEN, item->name, &colnum, &status) == 0) { 1669 // cooresponding column found in table 1670 int dataType = 0; 1671 convertPsTypeToFits(item->type, NULL, NULL, &dataType); 1672 1673 if (fits_write_col(fits->p_fd, dataType, colnum, row, 0,1,&item->data,&status) != 0) { 1674 char fitsErr[MAX_STRING_LENGTH]; 1675 (void)fits_get_errstatus(status, fitsErr); 1676 psError(PS_ERR_IO, true, 1677 PS_ERRORTEXT_psFits_WRITE_FAILED, 1678 fits->filename, fitsErr); 1679 return false; 1680 } 1681 } 1682 } 1683 } 1684 1685 psFree(iter); 1686 1687 return true; 1688 } -
trunk/psLib/src/fileUtils/psFits.h
r3264 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:24$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 249 249 ); 250 250 251 #if 0 251 252 252 /** Updates a FITS table. The current HDU type must be either 253 253 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. … … 259 259 bool psFitsUpdateTable( 260 260 psFits* fits, ///< the psFits object 261 ps Array* table261 psMetadata* data, 262 262 ///< Array of psMetadata items, which contains the output data items of each row. 263 int row ///< the row number to update. 264 263 265 ); 264 266 … … 266 268 267 269 #endif 268 269 #endif -
trunk/psLib/src/fits/psFits.c
r3341 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.2 0$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-28 23:34:10$9 * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 98 98 break; 99 99 100 case PS_TYPE_BOOL: 100 101 case PS_TYPE_S8: 101 102 bitpix = BYTE_IMG; … … 1450 1451 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1451 1452 PS_ERRORTEXT_psFits_NULL); 1452 return NULL;1453 return false; 1453 1454 } 1454 1455 … … 1619 1620 return true; 1620 1621 } 1622 1623 bool psFitsUpdateTable(psFits* fits, 1624 psMetadata* data, 1625 int row) 1626 { 1627 int status = 0; 1628 1629 if (fits == NULL) { 1630 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1631 PS_ERRORTEXT_psFits_NULL); 1632 return false; 1633 } 1634 1635 if (data == NULL) { 1636 psError(PS_ERR_BAD_PARAMETER_NULL, true, 1637 PS_ERRORTEXT_psFits_IMAGE_NULL); 1638 return false; 1639 } 1640 1641 1642 // check to see if we even are positioned on a table HDU 1643 int hdutype; 1644 if ( fits_get_hdu_type(fits->p_fd,&hdutype, &status) != 0) { 1645 char fitsErr[MAX_STRING_LENGTH]; 1646 (void)fits_get_errstatus(status, fitsErr); 1647 psError(PS_ERR_IO, true, 1648 PS_ERRORTEXT_psFits_GET_HDU_TYPE_FAILED, 1649 fitsErr); 1650 return false; 1651 } 1652 if (hdutype != ASCII_TBL && hdutype != BINARY_TBL) { 1653 psError(PS_ERR_IO, true, 1654 PS_ERRORTEXT_psFits_NOT_TABLE_TYPE); 1655 return false; 1656 } 1657 1658 1659 psMetadataIterator* iter = psMetadataIteratorAlloc(data,PS_LIST_HEAD,NULL); 1660 1661 psMetadataItem* item; 1662 1663 while ( (item=psMetadataGetAndIncrement(iter)) != NULL) { 1664 if (PS_META_IS_PRIMITIVE(item->type)) { 1665 // operating on primitive data type, i.e., not a complex object 1666 int colnum = 0; 1667 1668 if ( fits_get_colnum(fits->p_fd, CASESEN, item->name, &colnum, &status) == 0) { 1669 // cooresponding column found in table 1670 int dataType = 0; 1671 convertPsTypeToFits(item->type, NULL, NULL, &dataType); 1672 1673 if (fits_write_col(fits->p_fd, dataType, colnum, row, 0,1,&item->data,&status) != 0) { 1674 char fitsErr[MAX_STRING_LENGTH]; 1675 (void)fits_get_errstatus(status, fitsErr); 1676 psError(PS_ERR_IO, true, 1677 PS_ERRORTEXT_psFits_WRITE_FAILED, 1678 fits->filename, fitsErr); 1679 return false; 1680 } 1681 } 1682 } 1683 } 1684 1685 psFree(iter); 1686 1687 return true; 1688 } -
trunk/psLib/src/fits/psFits.h
r3264 r3407 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $10 * @date $Date: 2005-0 2-17 19:26:24$9 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2005-03-11 20:38:56 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 249 249 ); 250 250 251 #if 0 251 252 252 /** Updates a FITS table. The current HDU type must be either 253 253 * PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE. … … 259 259 bool psFitsUpdateTable( 260 260 psFits* fits, ///< the psFits object 261 ps Array* table261 psMetadata* data, 262 262 ///< Array of psMetadata items, which contains the output data items of each row. 263 int row ///< the row number to update. 264 263 265 ); 264 266 … … 266 268 267 269 #endif 268 269 #endif -
trunk/psLib/src/mathtypes/psVector.c
r3264 r3407 1 2 1 /** @file psVector.c 3 2 * … … 10 9 * @author Robert DeSonia, MHPCC 11 10 * 12 * @version $Revision: 1.3 4$ $Name: not supported by cvs2svn $13 * @date $Date: 2005-0 2-17 19:26:23$11 * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2005-03-11 20:38:56 $ 14 13 * 15 14 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 18 17 #include <string.h> // for memcpy 19 18 #include <stdlib.h> 19 #include <stdio.h> 20 20 #include <math.h> 21 21 … … 407 407 return outVector; 408 408 } 409 410 char* psVectorToString(psVector* vector, int maxLength) 411 { 412 413 if (maxLength < 5) { 414 return NULL; 415 } 416 417 char* str = psAlloc(sizeof(char)*maxLength+1); 418 419 if (vector == NULL) { 420 snprintf(str,maxLength, "NULL"); 421 return str; 422 } 423 424 int size = vector->n; 425 426 if (size == 0) { 427 snprintf(str,maxLength, "[]"); 428 return str; 429 } 430 431 char* tempStr = psAlloc(sizeof(char)*maxLength+1); 432 *str = '\0'; 433 bool full = false; 434 435 #define APPEND_ELEMENTS_CASE(TYPE, NATIVE_TYPE, FORMAT) \ 436 case PS_TYPE_##TYPE: \ 437 for (lcv=0; lcv < size && ! full; lcv++) { \ 438 snprintf(tempStr, maxLength, "%s" FORMAT, prefix, (NATIVE_TYPE) (vector->data.TYPE[lcv])); \ 439 strncat(str,tempStr,maxLength); \ 440 full = (strlen(str) > maxLength-2); \ 441 prefix = ","; \ 442 } \ 443 break; 444 445 #define APPEND_ELEMENTS_CASE_COMPLEX(TYPE,CREAL,CIMAG) \ 446 case PS_TYPE_##TYPE: \ 447 for (lcv=0; lcv < size && ! full; lcv++) { \ 448 snprintf(tempStr, maxLength, "%s%g%+gi", prefix, \ 449 CREAL(vector->data.TYPE[lcv]), \ 450 CIMAG(vector->data.TYPE[lcv])); \ 451 full = (strlen(str) > maxLength-2); \ 452 prefix = ","; \ 453 } \ 454 break; 455 456 int lcv; 457 char* prefix = "["; 458 switch(vector->type.type) { 459 APPEND_ELEMENTS_CASE(S8,char,"%hd") 460 APPEND_ELEMENTS_CASE(S16,short int,"%hd") 461 APPEND_ELEMENTS_CASE(S32,int,"%d") 462 APPEND_ELEMENTS_CASE(S64,long,"%ld") 463 APPEND_ELEMENTS_CASE(U8,unsigned char,"%hu") 464 APPEND_ELEMENTS_CASE(U16,unsigned short,"%hu") 465 APPEND_ELEMENTS_CASE(U32,unsigned int, "%u") 466 APPEND_ELEMENTS_CASE(U64,unsigned long,"%lu") 467 APPEND_ELEMENTS_CASE(F32,double,"%g") 468 APPEND_ELEMENTS_CASE(F64,double,"%g") 469 APPEND_ELEMENTS_CASE_COMPLEX(C32,crealf,cimagf) 470 APPEND_ELEMENTS_CASE_COMPLEX(C64,creal,cimag) 471 default: 472 snprintf(str,maxLength,"[...]"); 473 break; 474 } 475 476 if (full) { 477 // couldn't all fit in given string length 478 479 // remove elements until there is room for ",...]" 480 while (strlen(str) > maxLength - 5) { 481 char* lastComma = strrchr(str,','); 482 if (lastComma == NULL) { // no comma, must be first number 483 str[1] = '\0'; 484 } else { 485 *lastComma = '\0'; 486 } 487 } 488 strncat(str,",...]",maxLength); 489 } else { 490 strncat(str,"]",maxLength); 491 } 492 493 psFree(tempStr); 494 495 return str; 496 } 497 -
trunk/psLib/src/mathtypes/psVector.h
r3264 r3407 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-0 2-17 19:26:23$13 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-11 20:38:56 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 144 144 ); 145 145 146 /** Creates a string from a psVector's values in the form "[x0,x1,x2]". 147 * 148 * @return psPtr a newly allocated string 149 */ 150 char* psVectorToString( 151 psVector* vector, ///< vector to create a string from 152 int maxLength ///< the maximum length of the resulting string 153 ); 154 146 155 /// @} 147 156 -
trunk/psLib/src/types/psMetadata.c
r3381 r3407 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.5 4$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03- 07 20:58:50$14 * @version $Revision: 1.55 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-11 20:38:56 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 67 67 /* FUNCTION IMPLEMENTATION - LOCAL */ 68 68 /*****************************************************************************/ 69 70 static psMetadataItem* makeMetaMulti(psHash* table, const char* key, psMetadataItem* existing) 71 { 72 73 if (existing != NULL && existing->type == PS_META_MULTI) { 74 return existing; 75 } 76 77 // move any existing entry into a psList 78 psList* newList = psListAlloc(existing); 79 80 psMetadataItem* item = psMetadataItemAlloc(key, 81 PS_META_MULTI, 82 "", 83 newList); 84 85 if (existing != NULL) { 86 psHashRemove(table,key); // take out the old entry 87 } 88 89 psHashAdd(table, key, item); // put in the new entry 90 91 // free local references of newly allocated items. 92 psFree(newList); 93 psFree(item); 94 95 return item; 96 } 69 97 70 98 static void metadataItemFree(psMetadataItem* metadataItem) … … 253 281 existingEntry = (psMetadataItem*)psHashLookup(mdTable, key); 254 282 255 // how the item is added to the hash depends on flags & prior existence 256 if(existingEntry != NULL) { 257 if ((flags & PS_META_DUPLICATE_OK) != 0) { 283 if (metadataItem->type == PS_META_MULTI) { 284 // the incoming entry is PS_META_MULTI 285 286 // force the hash entry to be PS_META_MULTI 287 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 288 289 // add all the items in the incoming entry to metadata 290 psList* list = metadataItem->data.list; 291 if (list != NULL) { 292 psListIterator* iter = psListIteratorAlloc(list,PS_LIST_HEAD,true); 293 psMetadataItem* listItem; 294 while ((listItem=(psMetadataItem*)psListGetAndIncrement(iter)) != NULL) { 295 psMetadataAddItem(md,listItem,location,flags); 296 } 297 psFree(iter); 298 } 299 300 return true; // all done. 301 } 302 303 // how the item is added to the hash depends on prior existence, flags, etc. 304 if(existingEntry != NULL) { // prior existence 305 if (existingEntry->type == PS_META_MULTI || (flags & PS_META_DUPLICATE_OK) != 0) { 258 306 // duplicate entries allowed - add another entry. 259 if (existingEntry->type != PS_META_MULTI) { 260 // first duplicate, transfer the hash's old entry into a 261 // list of entries with the type PS_META_MULTI. 262 263 // add entry to a list and dereference the local pointer 264 psList* newList = psListAlloc(existingEntry); 265 266 existingEntry = psMetadataItemAlloc(key, 267 PS_META_MULTI, 268 "", 269 newList); 270 psHashRemove(mdTable,key); // take out the old entry 271 psHashAdd(mdTable, key, existingEntry); // put in the new entry 272 273 // free local references of newly allocated items. 274 psFree(newList); 275 psFree(existingEntry); 276 277 } 307 308 // make sure the existing entry is PS_META_MULTI 309 existingEntry = makeMetaMulti(mdTable,key,existingEntry); 278 310 279 311 // add to the hash's list of duplicate entries … … 282 314 return false; 283 315 } 284 // (added to list below)285 286 316 } else if ((flags & PS_META_REPLACE) != 0) { 287 317 // replace entry instead of creating a duplicate entry. 288 318 289 319 // remove the existing entry from metadata 290 psListRemoveData(mdList, existingEntry); 291 psHashRemove(mdTable, key); 320 psMetadataRemove(md,0,key); 292 321 293 322 // treat as if new (added to list below) … … 423 452 // multiple entries with same key, remove just the specified one 424 453 psListRemoveData(tableItem->data.list, entry); 425 if (psListGet(tableItem->data.list,PS_LIST_HEAD) == NULL) {426 // list is empty, so let's clear the whole entry now.427 if (!psHashRemove(mdTable, key)) {428 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);429 return false;430 }431 }432 454 } else { 433 455 if (!psHashRemove(mdTable, key)) { -
trunk/psLib/src/types/psMetadata.h
r3381 r3407 11 11 * @author Ross Harman, MHPCC 12 12 * 13 * @version $Revision: 1. 39$ $Name: not supported by cvs2svn $14 * @date $Date: 2005-03- 07 20:58:50$13 * @version $Revision: 1.40 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2005-03-11 20:38:56 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 */ 38 38 typedef enum { 39 PS_META_S32 ,///< psS32 primitive data.40 PS_META_F32 ,///< psF32 primitive data.41 PS_META_F64 ,///< psF64 primitive data.42 PS_META_BOOL ,///< psBool primitive data.43 PS_META_LIST ,///< List data (Stored as item.data.list).39 PS_META_S32 = PS_TYPE_S32, ///< psS32 primitive data. 40 PS_META_F32 = PS_TYPE_F32, ///< psF32 primitive data. 41 PS_META_F64 = PS_TYPE_F64, ///< psF64 primitive data. 42 PS_META_BOOL = PS_TYPE_BOOL, ///< psBool primitive data. 43 PS_META_LIST = 0x10000, ///< List data (Stored as item.data.list). 44 44 PS_META_STR, ///< String data (Stored as item.data.V). 45 45 PS_META_VEC, ///< Vector data (Stored as item.data.V). … … 51 51 PS_META_ASTROM, ///< Astrometric coefficients (Stored as item.data.V). 52 52 PS_META_UNKNOWN, ///< Other data (Stored as item.data.V). 53 PS_META_MULTI, ///< Used internally, do not create an metadata item of this type. 54 PS_META_NTYPE ///< Number of types. Must be last. 53 PS_META_MULTI ///< Used internally, do not create an metadata item of this type. 55 54 } psMetadataType; 56 55 -
trunk/psLib/test/astronomy/tst_psMetadataIO.c
r3381 r3407 14 14 * @author Robert DeSonia, MHPCC 15 15 * 16 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-03- 07 20:58:50$16 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-03-11 20:38:56 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 66 66 static void printMetadataItem(psMetadataItem *metadataItem, char *spaces) 67 67 { 68 char* vecStr; 69 68 70 printf("%sKey Name: %8s ", spaces, metadataItem->name); 69 printf("Key mdType: %d", metadataItem->type);71 printf("Key mdType: 0x%08x ", metadataItem->type); 70 72 71 73 switch (metadataItem->type) { … … 85 87 printf("Key Value: %15.3f ", metadataItem->data.F64); 86 88 break; 89 case PS_META_VEC: 90 vecStr = (char*)psVectorToString((psVector*)metadataItem->data.V, 15); 91 printf("Key Value: %15s ", vecStr); 92 psFree(vecStr); 93 break; 87 94 case PS_META_STR: 88 95 printf("Key Value: %15s ", (char*)metadataItem->data.V); 89 96 break; 90 97 default: 91 printf("Bad type: %d", metadataItem->type);98 printf("Bad type: 0x%08x ", metadataItem->type); 92 99 } 93 100 printf("Key Comment: %s\n", metadataItem->comment); -
trunk/psLib/test/astronomy/tst_psMetadata_01.c
r3381 r3407 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-03- 07 20:58:50$20 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-03-11 20:38:56 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 72 72 { 73 73 printf("%sKey Name: %8s ", spaces, metadataItem->name); 74 printf("Key mdType: %d", metadataItem->type);74 printf("Key mdType: 0x%08x ", metadataItem->type); 75 75 76 76 switch (metadataItem->type) { … … 126 126 printFooter(stdout, "psMetadata", "Test A - Read 1st hdr from simple FITS file", true); 127 127 128 printf("ID=%d\n",(int)psMemGetId()); 128 129 129 130 // Test B - Read 2nd hdr from complex FITS file … … 173 174 printFooter(stdout, "psMetadata", "Test B - Read 2nd hdr from complex FITS file", true); 174 175 176 printf("ID=%d\n",(int)psMemGetId()); 175 177 176 178 // Test C - Read named hdr from complex FITS file -
trunk/psLib/test/astronomy/tst_psMetadata_02.c
r3381 r3407 15 15 * @author Robert DeSonia, MHPCC 16 16 * 17 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $18 * @date $Date: 2005-03- 07 20:58:50$17 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2005-03-11 20:38:56 $ 19 19 * 20 20 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 29 29 { 30 30 printf("Key Name: %8s ", metadataItem->name); 31 printf("Key mdType: %2d", metadataItem->type);31 printf("Key mdType: 0x%08x ", metadataItem->type); 32 32 33 33 switch (metadataItem->type) { … … 98 98 printNegativeTestHeader(stdout,"psMetadata", "Test C - Attempt to create metadata item with invalid type", 99 99 "Invalid psMetadataType: 6", 0); 100 badItem = psMetadataItemAlloc("badItem", PS_META_NTYPE, "I am bad", "Bad comment");100 badItem = psMetadataItemAlloc("badItem", -1, "I am bad", "Bad comment"); 101 101 printFooter(stdout, "psMetadata", "Test C - Attempt to create metadata item with invalid type", true); 102 102 -
trunk/psLib/test/astronomy/tst_psMetadata_03.c
r3381 r3407 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-03- 07 20:58:50$20 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-03-11 20:38:56 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 { 33 33 printf("Key Name: %8s ", metadataItem->name); 34 printf("Key mdType: %2d", metadataItem->type);34 printf("Key mdType: 0x%08x ", metadataItem->type); 35 35 36 36 switch (metadataItem->type) { -
trunk/psLib/test/astronomy/tst_psMetadata_04.c
r3381 r3407 23 23 * @author Ross Harman, MHPCC 24 24 * 25 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $26 * @date $Date: 2005-03- 07 20:58:50$25 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 26 * @date $Date: 2005-03-11 20:38:56 $ 27 27 * 28 28 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 { 38 38 printf("Key Name: %8s ", metadataItem->name); 39 printf("Key mdType: %2d", metadataItem->type);39 printf("Key mdType: 0x%08x ", metadataItem->type); 40 40 41 41 switch (metadataItem->type) { -
trunk/psLib/test/astronomy/tst_psMetadata_05.c
r3381 r3407 22 22 * @author Ross Harman, MHPCC 23 23 * 24 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $25 * @date $Date: 2005-03- 07 20:58:50$24 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 25 * @date $Date: 2005-03-11 20:38:56 $ 26 26 * 27 27 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 36 36 { 37 37 printf("Key Name: %8s ", metadataItem->name); 38 printf("Key mdType: %2d", metadataItem->type);38 printf("Key mdType: 0x%08x ", metadataItem->type); 39 39 40 40 switch (metadataItem->type) { -
trunk/psLib/test/astronomy/tst_psMetadata_06.c
r3381 r3407 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-03- 07 20:58:50$15 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-03-11 20:38:56 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 { 28 28 printf("Key Name: %8s ", metadataItem->name); 29 printf("Key mdType: %2d", metadataItem->type);29 printf("Key mdType: 0x%08x ", metadataItem->type); 30 30 31 31 switch (metadataItem->type) { -
trunk/psLib/test/astronomy/verified/tst_psMetadataIO.stdout
r3381 r3407 7 7 Failed lines: 6 Expected: 6 8 8 Contents of metadata list: 9 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi10 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:11 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:12 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable13 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value14 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type15 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers16 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:17 Key Name: comment Key mdType: 5Key Value: This Key Comment:18 Key Name: comment Key mdType: 5Key Value: is Key Comment:19 Key Name: comment Key mdType: 5Key Value: an Key Comment:20 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:21 Key Name: comment Key mdType: 5Key Value: comment Key Comment:22 Key Name: comment Key mdType: 5Key Value: but Key Comment:23 Key Name: comment Key mdType: 5Key Value: still Key Comment:24 Key Name: comment Key mdType: 5Key Value: valid Key Comment:25 Key Name: speed Key mdType: 1Key Value: 66.660 Key Comment:9 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 10 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 11 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 12 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 13 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 14 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 15 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 16 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 17 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 18 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 19 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 20 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 21 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 22 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 23 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 24 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 25 Key Name: speed Key mdType: 0x00000404 Key Value: 66.660 Key Comment: 26 26 27 27 Contents of metadata table: 28 Key Name: comment Key mdType: 14Key Value: Key Comment:29 Key Name: comment Key mdType: 5Key Value: This Key Comment:30 Key Name: comment Key mdType: 5Key Value: is Key Comment:31 Key Name: comment Key mdType: 5Key Value: an Key Comment:32 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:33 Key Name: comment Key mdType: 5Key Value: comment Key Comment:34 Key Name: comment Key mdType: 5Key Value: but Key Comment:35 Key Name: comment Key mdType: 5Key Value: still Key Comment:36 Key Name: comment Key mdType: 5Key Value: valid Key Comment:37 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type38 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:39 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:40 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi41 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable42 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers43 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:44 Key Name: speed Key mdType: 1Key Value: 66.660 Key Comment:45 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value28 Key Name: comment Key mdType: 0x0001000a Key Value: Key Comment: 29 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 30 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 31 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 32 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 33 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 34 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 35 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 36 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 37 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 38 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 39 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 40 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 41 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 42 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 43 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 44 Key Name: speed Key mdType: 0x00000404 Key Value: 66.660 Key Comment: 45 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 46 46 47 47 ---> TESTPOINT PASSED (psMetadata{Test A - Read config file with overwrite set true} | tst_psMetadataIO.c) … … 54 54 55 55 Failed lines: 7 Expected: 7 Contents of metadata list: 56 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi57 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:58 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:59 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable60 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value61 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type62 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers63 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:64 Key Name: comment Key mdType: 5Key Value: This Key Comment:65 Key Name: comment Key mdType: 5Key Value: is Key Comment:66 Key Name: comment Key mdType: 5Key Value: an Key Comment:67 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:68 Key Name: comment Key mdType: 5Key Value: comment Key Comment:69 Key Name: comment Key mdType: 5Key Value: but Key Comment:70 Key Name: comment Key mdType: 5Key Value: still Key Comment:71 Key Name: comment Key mdType: 5Key Value: valid Key Comment:72 Key Name: speed Key mdType: 1Key Value: 55.550 Key Comment:56 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 57 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 58 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 59 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 60 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 61 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 62 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 63 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 64 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 65 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 66 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 67 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 68 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 69 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 70 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 71 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 72 Key Name: speed Key mdType: 0x00000404 Key Value: 55.550 Key Comment: 73 73 74 74 Contents of metadata table: 75 Key Name: comment Key mdType: 14Key Value: Key Comment:76 Key Name: comment Key mdType: 5Key Value: This Key Comment:77 Key Name: comment Key mdType: 5Key Value: is Key Comment:78 Key Name: comment Key mdType: 5Key Value: an Key Comment:79 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:80 Key Name: comment Key mdType: 5Key Value: comment Key Comment:81 Key Name: comment Key mdType: 5Key Value: but Key Comment:82 Key Name: comment Key mdType: 5Key Value: still Key Comment:83 Key Name: comment Key mdType: 5Key Value: valid Key Comment:84 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type85 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:86 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:87 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi88 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable89 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers90 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:91 Key Name: speed Key mdType: 1Key Value: 55.550 Key Comment:92 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value75 Key Name: comment Key mdType: 0x0001000a Key Value: Key Comment: 76 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 77 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 78 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 79 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 80 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 81 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 82 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 83 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 84 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 85 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 86 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 87 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 88 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 89 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 90 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 91 Key Name: speed Key mdType: 0x00000404 Key Value: 55.550 Key Comment: 92 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 93 93 94 94 ---> TESTPOINT PASSED (psMetadata{Test B - Read config file with overwrite set false} | tst_psMetadataIO.c) … … 101 101 102 102 Failed lines: 6 Expected: 6 Contents of metadata list: 103 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi104 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:105 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:106 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable107 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value108 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type109 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers110 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:111 Key Name: comment Key mdType: 5Key Value: This Key Comment:112 Key Name: comment Key mdType: 5Key Value: is Key Comment:113 Key Name: comment Key mdType: 5Key Value: an Key Comment:114 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:115 Key Name: comment Key mdType: 5Key Value: comment Key Comment:116 Key Name: comment Key mdType: 5Key Value: but Key Comment:117 Key Name: comment Key mdType: 5Key Value: still Key Comment:118 Key Name: comment Key mdType: 5Key Value: valid Key Comment:119 Key Name: speed Key mdType: 1Key Value: 66.660 Key Comment:103 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 104 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 105 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 106 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 107 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 108 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 109 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 110 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 111 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 112 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 113 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 114 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 115 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 116 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 117 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 118 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 119 Key Name: speed Key mdType: 0x00000404 Key Value: 66.660 Key Comment: 120 120 121 121 Contents of metadata table: 122 Key Name: comment Key mdType: 14Key Value: Key Comment:123 Key Name: comment Key mdType: 5Key Value: This Key Comment:124 Key Name: comment Key mdType: 5Key Value: is Key Comment:125 Key Name: comment Key mdType: 5Key Value: an Key Comment:126 Key Name: comment Key mdType: 5Key Value: ugly Key Comment:127 Key Name: comment Key mdType: 5Key Value: comment Key Comment:128 Key Name: comment Key mdType: 5Key Value: but Key Comment:129 Key Name: comment Key mdType: 5Key Value: still Key Comment:130 Key Name: comment Key mdType: 5Key Value: valid Key Comment:131 Key Name: title2 Key mdType: 5Key Value: Good bye world Key Comment: STRING or STR may be used as the string type132 Key Name: time Key mdType: 1Key Value: 1234.568 Key Comment:133 Key Name: negatives Key mdType: 6 Bad type: 6Key Comment:134 Key Name: pi Key mdType: 2Key Value: 3.142 Key Comment: Definition of pi135 Key Name: myBool Key mdType: 3Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable136 Key Name: primes Key mdType: 6 Bad type: 6Key Comment: These are prime numbers137 Key Name: altitude Key mdType: 0 Key Value: 10000 Key Comment:138 Key Name: speed Key mdType: 1Key Value: 66.660 Key Comment:139 Key Name: title1 Key mdType: 5Key Value: Hello world Key Comment: This is a comment for the string value122 Key Name: comment Key mdType: 0x0001000a Key Value: Key Comment: 123 Key Name: comment Key mdType: 0x00010001 Key Value: This Key Comment: 124 Key Name: comment Key mdType: 0x00010001 Key Value: is Key Comment: 125 Key Name: comment Key mdType: 0x00010001 Key Value: an Key Comment: 126 Key Name: comment Key mdType: 0x00010001 Key Value: ugly Key Comment: 127 Key Name: comment Key mdType: 0x00010001 Key Value: comment Key Comment: 128 Key Name: comment Key mdType: 0x00010001 Key Value: but Key Comment: 129 Key Name: comment Key mdType: 0x00010001 Key Value: still Key Comment: 130 Key Name: comment Key mdType: 0x00010001 Key Value: valid Key Comment: 131 Key Name: title2 Key mdType: 0x00010001 Key Value: Good bye world Key Comment: STRING or STR may be used as the string type 132 Key Name: time Key mdType: 0x00000404 Key Value: 1234.568 Key Comment: 133 Key Name: negatives Key mdType: 0x00010002 Key Value: [-1,-2,-3,...] Key Comment: 134 Key Name: pi Key mdType: 0x00000408 Key Value: 3.142 Key Comment: Definition of pi 135 Key Name: myBool Key mdType: 0x00001301 Key Value: 0 Key Comment: F, f, 0, T, t, 1 are also acceptable 136 Key Name: primes Key mdType: 0x00010002 Key Value: [2,3,5,7,...] Key Comment: These are prime numbers 137 Key Name: altitude Key mdType: 0x00000104 Key Value: 10000 Key Comment: 138 Key Name: speed Key mdType: 0x00000404 Key Value: 66.660 Key Comment: 139 Key Name: title1 Key mdType: 0x00010001 Key Value: Hello world Key Comment: This is a comment for the string value 140 140 141 141 ---> TESTPOINT PASSED (psMetadata{Test C - Read config file without auto-allocation of metadata} | tst_psMetadataIO.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_01.stdout
r3381 r3407 6 6 7 7 Contents of metadata list: 8 Key Name: SIMPLE Key mdType: 3Key Value: 1 Key Comment: file does conform to FITS standard9 Key Name: BITPIX Key mdType: 0 Key Value: 8 Key Comment: number of bits per data pixel10 Key Name: NAXIS Key mdType: 0 Key Value: 0 Key Comment: number of data axes11 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>8 Key Name: SIMPLE Key mdType: 0x00001301 Key Value: 1 Key Comment: file does conform to FITS standard 9 Key Name: BITPIX Key mdType: 0x00000104 Key Value: 8 Key Comment: number of bits per data pixel 10 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 0 Key Comment: number of data axes 11 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 12 12 13 13 Contents of metadata table: 14 Key Name: NAXIS Key mdType: 0 Key Value: 0 Key Comment: number of data axes15 Key Name: SIMPLE Key mdType: 3Key Value: 1 Key Comment: file does conform to FITS standard16 Key Name: BITPIX Key mdType: 0 Key Value: 8 Key Comment: number of bits per data pixel17 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>14 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 0 Key Comment: number of data axes 15 Key Name: SIMPLE Key mdType: 0x00001301 Key Value: 1 Key Comment: file does conform to FITS standard 16 Key Name: BITPIX Key mdType: 0x00000104 Key Value: 8 Key Comment: number of bits per data pixel 17 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 18 18 19 19 ---> TESTPOINT PASSED (psMetadata{Test A - Read 1st hdr from simple FITS file} | tst_psMetadata_01.c) 20 20 21 ID=34 21 22 /***************************** TESTPOINT ******************************************\ 22 23 * TestFile: tst_psMetadata_01.c * … … 26 27 27 28 Contents of metadata list: 28 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension29 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel30 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes31 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 132 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 033 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 134 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel35 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_1' Key Comment:36 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>37 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>38 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>39 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>29 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 30 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 31 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 32 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 33 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 34 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 35 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 36 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_1' Key Comment: 37 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 38 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 39 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 40 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 40 41 41 42 Contents of metadata table: 42 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes43 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 144 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 045 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension46 Key Name: BITPIX Key mdType: 14Key Value: Key Comment:47 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel48 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel49 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 150 Key Name: HISTORY Key mdType: 14Key Value: Key Comment:51 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>52 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>53 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>54 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>55 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_1' Key Comment:43 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 44 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 45 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 46 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 47 Key Name: BITPIX Key mdType: 0x0001000a Key Value: Key Comment: 48 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 49 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 50 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 51 Key Name: HISTORY Key mdType: 0x0001000a Key Value: Key Comment: 52 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 53 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 54 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 55 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 56 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_1' Key Comment: 56 57 57 58 ---> TESTPOINT PASSED (psMetadata{Test B - Read 2nd hdr from complex FITS file} | tst_psMetadata_01.c) 58 59 60 ID=138 59 61 /***************************** TESTPOINT ******************************************\ 60 62 * TestFile: tst_psMetadata_01.c * … … 64 66 65 67 Contents of metadata list: 66 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension67 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel68 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes69 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 170 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 071 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 172 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_2' Key Comment:73 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>74 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>68 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 69 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 70 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 71 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 72 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 73 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 74 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_2' Key Comment: 75 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 76 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 75 77 76 78 Contents of metadata table: 77 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes78 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 179 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 080 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension81 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 182 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel83 Key Name: HISTORY Key mdType: 14Key Value: Key Comment:84 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>85 Key Name: HISTORY Key mdType: 5Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE>86 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_2' Key Comment:79 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 80 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 81 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 82 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 83 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 84 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 85 Key Name: HISTORY Key mdType: 0x0001000a Key Value: Key Comment: 86 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 87 Key Name: HISTORY Key mdType: 0x00010001 Key Value: Key Comment: File modified by user 'harman' with fv on 2004-08-04T<DATE> 88 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_2' Key Comment: 87 89 88 90 ---> TESTPOINT PASSED (psMetadata{Test C - Read named hdr from complex FITS file} | tst_psMetadata_01.c) … … 97 99 98 100 Contents of metadata list: 99 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension100 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel101 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes102 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 1103 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 0104 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 1105 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_2' Key Comment:101 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 102 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 103 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 104 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 105 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 106 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 107 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_2' Key Comment: 106 108 107 109 Contents of metadata table: 108 Key Name: NAXIS Key mdType: 0 Key Value: 1 Key Comment: number of data axes109 Key Name: NAXIS1 Key mdType: 0 Key Value: 64 Key Comment: length of data axis 1110 Key Name: PCOUNT Key mdType: 0 Key Value: 0 Key Comment: required keyword; must = 0111 Key Name: XTENSION Key mdType: 5Key Value: 'IMAGE ' Key Comment: IMAGE extension112 Key Name: GCOUNT Key mdType: 0 Key Value: 1 Key Comment: required keyword; must = 1113 Key Name: BITPIX Key mdType: 0 Key Value: -64 Key Comment: number of bits per data pixel114 Key Name: EXTNAME Key mdType: 5Key Value: 'MY_DATA_2' Key Comment:110 Key Name: NAXIS Key mdType: 0x00000104 Key Value: 1 Key Comment: number of data axes 111 Key Name: NAXIS1 Key mdType: 0x00000104 Key Value: 64 Key Comment: length of data axis 1 112 Key Name: PCOUNT Key mdType: 0x00000104 Key Value: 0 Key Comment: required keyword; must = 0 113 Key Name: XTENSION Key mdType: 0x00010001 Key Value: 'IMAGE ' Key Comment: IMAGE extension 114 Key Name: GCOUNT Key mdType: 0x00000104 Key Value: 1 Key Comment: required keyword; must = 1 115 Key Name: BITPIX Key mdType: 0x00000104 Key Value: -64 Key Comment: number of bits per data pixel 116 Key Name: EXTNAME Key mdType: 0x00010001 Key Value: 'MY_DATA_2' Key Comment: 115 117 116 118 ---> TESTPOINT PASSED (psMetadata{Test D - Remove items with same name from all metadata} | tst_psMetadata_01.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_02.stderr
r3381 r3407 4 4 Unallowable operation: name is NULL. 5 5 <DATE><TIME>|<HOST>|E|psMetadataItemAllocV (FILE:LINENO) 6 Specified psMetadataType, 15, is not supported.6 Specified psMetadataType, -1, is not supported. 7 7 <DATE><TIME>|<HOST>|E|psMetadataAddItem (FILE:LINENO) 8 8 Unallowable operation: md is NULL. -
trunk/psLib/test/astronomy/verified/tst_psMetadata_02.stdout
r3341 r3407 5 5 \**********************************************************************************/ 6 6 7 Key Name: myItem1 Key mdType: 3Key Value: 1 Key Comment: I am a boolean8 Key Name: myItem2 Key mdType: 0Key Value: 111 Key Comment: I am a signed integer9 Key Name: myItem3 Key mdType: 1Key Value: 222.222 Key Comment: I am a single precision floating point10 Key Name: myItem4 Key mdType: 2Key Value: 333.333 Key Comment: I am a double precision floating point11 Key Name: myItem5 Key mdType: 5Key Value: HELLO WORLD Key Comment: I am a string7 Key Name: myItem1 Key mdType: 0x00001301 Key Value: 1 Key Comment: I am a boolean 8 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 111 Key Comment: I am a signed integer 9 Key Name: myItem3 Key mdType: 0x00000404 Key Value: 222.222 Key Comment: I am a single precision floating point 10 Key Name: myItem4 Key mdType: 0x00000408 Key Value: 333.333 Key Comment: I am a double precision floating point 11 Key Name: myItem5 Key mdType: 0x00010001 Key Value: HELLO WORLD Key Comment: I am a string 12 12 13 13 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata items} | tst_psMetadata_02.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_03.stdout
r3341 r3407 5 5 \**********************************************************************************/ 6 6 7 Key Name: myItem1 Key mdType: 3Key Value: 1 Key Comment: I am a boolean8 Key Name: myItem2 Key mdType: 0Key Value: 55 Key Comment: I am a integer9 Key Name: myItem3 Key mdType: 3Key Value: 0 Key Comment: I am a boolean10 Key Name: myItem4 Key mdType: 0Key Value: 66 Key Comment: I am a integer7 Key Name: myItem1 Key mdType: 0x00001301 Key Value: 1 Key Comment: I am a boolean 8 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 55 Key Comment: I am a integer 9 Key Name: myItem3 Key mdType: 0x00001301 Key Value: 0 Key Comment: I am a boolean 10 Key Name: myItem4 Key mdType: 0x00000104 Key Value: 66 Key Comment: I am a integer 11 11 12 12 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata items} | tst_psMetadata_03.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_04.stdout
r3341 r3407 5 5 \**********************************************************************************/ 6 6 7 Key Name: myItem1 Key mdType: 3Key Value: 1 Key Comment: I am a boolean8 Key Name: myItem2 Key mdType: 0Key Value: 55 Key Comment: I am a integer9 Key Name: myItem3 Key mdType: 3Key Value: 0 Key Comment: I am a boolean10 Key Name: myItem4 Key mdType: 0Key Value: 66 Key Comment: I am a integer11 Key Name: myItem5 Key mdType: 2Key Value: 3.140 Key Comment: I am a double7 Key Name: myItem1 Key mdType: 0x00001301 Key Value: 1 Key Comment: I am a boolean 8 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 55 Key Comment: I am a integer 9 Key Name: myItem3 Key mdType: 0x00001301 Key Value: 0 Key Comment: I am a boolean 10 Key Name: myItem4 Key mdType: 0x00000104 Key Value: 66 Key Comment: I am a integer 11 Key Name: myItem5 Key mdType: 0x00000408 Key Value: 3.140 Key Comment: I am a double 12 12 13 13 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata items} | tst_psMetadata_04.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_05.stdout
r3341 r3407 5 5 \**********************************************************************************/ 6 6 7 Key Name: myItem1 Key mdType: 3Key Value: 1 Key Comment: I am a boolean8 Key Name: myItem2 Key mdType: 0Key Value: 55 Key Comment: I am a integer9 Key Name: myItem3 Key mdType: 3Key Value: 0 Key Comment: I am a boolean10 Key Name: myItem4 Key mdType: 0Key Value: 66 Key Comment: I am a integer7 Key Name: myItem1 Key mdType: 0x00001301 Key Value: 1 Key Comment: I am a boolean 8 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 55 Key Comment: I am a integer 9 Key Name: myItem3 Key mdType: 0x00001301 Key Value: 0 Key Comment: I am a boolean 10 Key Name: myItem4 Key mdType: 0x00000104 Key Value: 66 Key Comment: I am a integer 11 11 12 12 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata items} | tst_psMetadata_05.c) -
trunk/psLib/test/astronomy/verified/tst_psMetadata_06.stdout
r3381 r3407 5 5 \**********************************************************************************/ 6 6 7 Key Name: myItem1 Key mdType: 3Key Value: 1 Key Comment: I am a boolean8 Key Name: myItem1 Key mdType: 0Key Value: 111 Key Comment: I am a signed integer9 Key Name: myItem1 Key mdType: 0Key Value: 222 Key Comment: I am a signed integer10 Key Name: myItem2 Key mdType: 0Key Value: 333 Key Comment: I am a signed integer11 Key Name: myItem2 Key mdType: 4Key Value: psList Key Comment: I am a list7 Key Name: myItem1 Key mdType: 0x00001301 Key Value: 1 Key Comment: I am a boolean 8 Key Name: myItem1 Key mdType: 0x00000104 Key Value: 111 Key Comment: I am a signed integer 9 Key Name: myItem1 Key mdType: 0x00000104 Key Value: 222 Key Comment: I am a signed integer 10 Key Name: myItem2 Key mdType: 0x00000104 Key Value: 333 Key Comment: I am a signed integer 11 Key Name: myItem2 Key mdType: 0x00010000 Key Value: psList Key Comment: I am a list 12 12 13 13 ---> TESTPOINT PASSED (psMetadata{Test A - Allocate metadata and items} | tst_psMetadata_06.c) -
trunk/psLib/test/collections/tst_psMetadataIO.c
r3381 r3407 14 14 * @author Robert DeSonia, MHPCC 15 15 * 16 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $17 * @date $Date: 2005-03- 07 20:58:50$16 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 17 * @date $Date: 2005-03-11 20:38:56 $ 18 18 * 19 19 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 66 66 static void printMetadataItem(psMetadataItem *metadataItem, char *spaces) 67 67 { 68 char* vecStr; 69 68 70 printf("%sKey Name: %8s ", spaces, metadataItem->name); 69 printf("Key mdType: %d", metadataItem->type);71 printf("Key mdType: 0x%08x ", metadataItem->type); 70 72 71 73 switch (metadataItem->type) { … … 85 87 printf("Key Value: %15.3f ", metadataItem->data.F64); 86 88 break; 89 case PS_META_VEC: 90 vecStr = (char*)psVectorToString((psVector*)metadataItem->data.V, 15); 91 printf("Key Value: %15s ", vecStr); 92 psFree(vecStr); 93 break; 87 94 case PS_META_STR: 88 95 printf("Key Value: %15s ", (char*)metadataItem->data.V); 89 96 break; 90 97 default: 91 printf("Bad type: %d", metadataItem->type);98 printf("Bad type: 0x%08x ", metadataItem->type); 92 99 } 93 100 printf("Key Comment: %s\n", metadataItem->comment); -
trunk/psLib/test/collections/tst_psMetadata_01.c
r3381 r3407 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.2 2$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-03- 07 20:58:50$20 * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-03-11 20:38:56 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 72 72 { 73 73 printf("%sKey Name: %8s ", spaces, metadataItem->name); 74 printf("Key mdType: %d", metadataItem->type);74 printf("Key mdType: 0x%08x ", metadataItem->type); 75 75 76 76 switch (metadataItem->type) { … … 126 126 printFooter(stdout, "psMetadata", "Test A - Read 1st hdr from simple FITS file", true); 127 127 128 printf("ID=%d\n",(int)psMemGetId()); 128 129 129 130 // Test B - Read 2nd hdr from complex FITS file … … 173 174 printFooter(stdout, "psMetadata", "Test B - Read 2nd hdr from complex FITS file", true); 174 175 176 printf("ID=%d\n",(int)psMemGetId()); 175 177 176 178 // Test C - Read named hdr from complex FITS file -
trunk/psLib/test/collections/tst_psMetadata_02.c
r3381 r3407 15 15 * @author Robert DeSonia, MHPCC 16 16 * 17 * @version $Revision: 1.1 3$ $Name: not supported by cvs2svn $18 * @date $Date: 2005-03- 07 20:58:50$17 * @version $Revision: 1.14 $ $Name: not supported by cvs2svn $ 18 * @date $Date: 2005-03-11 20:38:56 $ 19 19 * 20 20 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 29 29 { 30 30 printf("Key Name: %8s ", metadataItem->name); 31 printf("Key mdType: %2d", metadataItem->type);31 printf("Key mdType: 0x%08x ", metadataItem->type); 32 32 33 33 switch (metadataItem->type) { … … 98 98 printNegativeTestHeader(stdout,"psMetadata", "Test C - Attempt to create metadata item with invalid type", 99 99 "Invalid psMetadataType: 6", 0); 100 badItem = psMetadataItemAlloc("badItem", PS_META_NTYPE, "I am bad", "Bad comment");100 badItem = psMetadataItemAlloc("badItem", -1, "I am bad", "Bad comment"); 101 101 printFooter(stdout, "psMetadata", "Test C - Attempt to create metadata item with invalid type", true); 102 102 -
trunk/psLib/test/collections/tst_psMetadata_03.c
r3381 r3407 18 18 * @author Ross Harman, MHPCC 19 19 * 20 * @version $Revision: 1.1 5$ $Name: not supported by cvs2svn $21 * @date $Date: 2005-03- 07 20:58:50$20 * @version $Revision: 1.16 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2005-03-11 20:38:56 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 32 32 { 33 33 printf("Key Name: %8s ", metadataItem->name); 34 printf("Key mdType: %2d", metadataItem->type);34 printf("Key mdType: 0x%08x ", metadataItem->type); 35 35 36 36 switch (metadataItem->type) { -
trunk/psLib/test/collections/tst_psMetadata_04.c
r3381 r3407 23 23 * @author Ross Harman, MHPCC 24 24 * 25 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $26 * @date $Date: 2005-03- 07 20:58:50$25 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 26 * @date $Date: 2005-03-11 20:38:56 $ 27 27 * 28 28 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 { 38 38 printf("Key Name: %8s ", metadataItem->name); 39 printf("Key mdType: %2d", metadataItem->type);39 printf("Key mdType: 0x%08x ", metadataItem->type); 40 40 41 41 switch (metadataItem->type) { -
trunk/psLib/test/collections/tst_psMetadata_05.c
r3381 r3407 22 22 * @author Ross Harman, MHPCC 23 23 * 24 * @version $Revision: 1.2 1$ $Name: not supported by cvs2svn $25 * @date $Date: 2005-03- 07 20:58:50$24 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $ 25 * @date $Date: 2005-03-11 20:38:56 $ 26 26 * 27 27 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 36 36 { 37 37 printf("Key Name: %8s ", metadataItem->name); 38 printf("Key mdType: %2d", metadataItem->type);38 printf("Key mdType: 0x%08x ", metadataItem->type); 39 39 40 40 switch (metadataItem->type) { -
trunk/psLib/test/collections/tst_psMetadata_06.c
r3381 r3407 13 13 * @author Ross Harman, MHPCC 14 14 * 15 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $16 * @date $Date: 2005-03- 07 20:58:50$15 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 16 * @date $Date: 2005-03-11 20:38:56 $ 17 17 * 18 18 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 27 27 { 28 28 printf("Key Name: %8s ", metadataItem->name); 29 printf("Key mdType: %2d", metadataItem->type);29 printf("Key mdType: 0x%08x ", metadataItem->type); 30 30 31 31 switch (metadataItem->type) {
Note:
See TracChangeset
for help on using the changeset viewer.
