Commit | Line | Data |
---|---|---|
d8c68341 CS |
1 | --- Configure.dist Fri Feb 28 10:45:27 1997 |
2 | +++ Configure Fri Feb 28 10:45:31 1997 | |
3 | @@ -1481,7 +1481,7 @@ | |
8566f259 | 4 | *) |
5 | echo "I don't know where '$file' is, and my life depends on it." >&4 | |
6 | echo "Go find a public domain implementation or fix your PATH setting!" >&4 | |
7 | - exit 1 | |
8 | + #exit 1 | |
9 | ;; | |
10 | esac | |
11 | done | |
d8c68341 | 12 | @@ -1490,7 +1490,9 @@ |
8566f259 | 13 | say=offhand |
14 | for file in $trylist; do | |
15 | xxx=`./loc $file $file $pth` | |
16 | - eval $file=$xxx | |
17 | + if test "X$file" != "X$xxx" ; then | |
18 | + eval $file=$xxx | |
19 | + fi | |
20 | eval _$file=$xxx | |
21 | case "$xxx" in | |
22 | /*) | |
d8c68341 | 23 | @@ -3178,7 +3180,7 @@ |
8566f259 | 24 | exit(0); |
25 | } | |
26 | EOM | |
27 | -if $cc -o gccvers gccvers.c >/dev/null 2>&1; then | |
28 | +if $cc -o gccvers gccvers.c $ldflags >/dev/null 2>&1; then | |
29 | gccversion=`./gccvers` | |
30 | case "$gccversion" in | |
31 | '') echo "You are not using GNU cc." ;; | |
d8c68341 | 32 | @@ -3381,6 +3383,12 @@ |
8566f259 | 33 | *"-l$thislib "*);; |
34 | *) dflt="$dflt -l$thislib";; | |
35 | esac | |
36 | + elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then | |
37 | + echo "Found -l$thislib." | |
38 | + case " $dflt " in | |
39 | + *"-l$thislib "*);; | |
40 | + *) dflt="$dflt -l$thislib";; | |
41 | + esac | |
42 | else | |
43 | echo "No -l$thislib." | |
44 | fi | |
d8c68341 | 45 | @@ -3930,7 +3938,7 @@ |
8566f259 | 46 | esac |
47 | ;; | |
48 | esac | |
49 | -libnames=''; | |
50 | +#libnames=''; | |
51 | case "$libs" in | |
52 | '') ;; | |
53 | *) for thislib in $libs; do | |
d8c68341 | 54 | @@ -4136,6 +4144,10 @@ |
8566f259 | 55 | eval $xscan;\ |
56 | $contains '^fprintf$' libc.list >/dev/null 2>&1; then | |
57 | eval $xrun | |
58 | +elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\ | |
59 | + eval $xscan;\ | |
60 | + $contains '^fprintf$' libc.list >/dev/null 2>&1; then | |
61 | + eval $xrun | |
62 | else | |
63 | nm -p $* 2>/dev/null >libc.tmp | |
64 | $grep fprintf libc.tmp > libc.ptf | |
d8c68341 | 65 | @@ -4146,23 +4158,33 @@ |
8566f259 | 66 | eval $xrun |
67 | else | |
68 | echo " " | |
69 | - echo "nm didn't seem to work right. Trying ar instead..." >&4 | |
70 | + echo "nm didn't seem to work right. Trying $ar instead..." >&4 | |
71 | com='' | |
72 | - if ar t $libc > libc.tmp; then | |
73 | - for thisname in $libnames; do | |
74 | - ar t $thisname >>libc.tmp | |
75 | + if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi | |
76 | + if $ar $ar_opt $libc > libc.tmp; then | |
77 | + echo \; > libc.tmp | |
78 | + for thisname in $libnames $libc; do | |
79 | + $ar $ar_opt $thisname >>libc.tmp | |
80 | + if test "X$osname" = "Xos2"; then | |
81 | + # Revision 50 of EMX has bug in $ar: | |
82 | + emximp -o tmp.imp $thisname \ | |
83 | + 2>/dev/null && \ | |
84 | + $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \ | |
85 | + < tmp.imp >>libc.tmp | |
86 | + $rm tmp.imp | |
87 | + fi | |
88 | done | |
89 | - $sed -e 's/\.o$//' < libc.tmp > libc.list | |
90 | + $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list | |
91 | echo "Ok." >&4 | |
92 | else | |
93 | - echo "ar didn't seem to work right." >&4 | |
94 | + echo "$ar didn't seem to work right." >&4 | |
95 | echo "Maybe this is a Cray...trying bld instead..." >&4 | |
96 | if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list | |
97 | then | |
98 | for thisname in $libnames; do | |
99 | bld t $libnames | \ | |
100 | $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list | |
101 | - ar t $thisname >>libc.tmp | |
102 | + $ar t $thisname >>libc.tmp | |
103 | done | |
104 | echo "Ok." >&4 | |
105 | else | |
d8c68341 | 106 | @@ -5871,7 +5893,7 @@ |
8566f259 | 107 | exit(result); |
108 | } | |
109 | EOCP | |
110 | -if $cc -o try $ccflags try.c >/dev/null 2>&1; then | |
111 | +if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then | |
112 | ./try | |
113 | yyy=$? | |
114 | else | |
d8c68341 | 115 | @@ -5952,7 +5974,7 @@ |
8566f259 | 116 | |
117 | } | |
118 | EOCP | |
119 | -if $cc -o try $ccflags try.c >/dev/null 2>&1; then | |
120 | +if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then | |
121 | ./try | |
122 | castflags=$? | |
123 | else | |
d8c68341 | 124 | @@ -5991,7 +6013,7 @@ |
8566f259 | 125 | exit((unsigned long)vsprintf(buf,"%s",args) > 10L); |
126 | } | |
127 | EOF | |
128 | - if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then | |
129 | + if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then | |
130 | echo "Your vsprintf() returns (int)." >&4 | |
131 | val2="$undef" | |
132 | else | |
d8c68341 | 133 | @@ -6336,7 +6358,7 @@ |
8566f259 | 134 | EOCP |
135 | : check sys/file.h first to get FREAD on Sun | |
136 | if $test `./findhdr sys/file.h` && \ | |
137 | - $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then | |
138 | + $cc $cppflags $ldflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then | |
139 | h_sysfile=true; | |
140 | echo "<sys/file.h> defines the O_* constants..." >&4 | |
141 | if ./open3; then | |
d8c68341 | 142 | @@ -6347,7 +6369,7 @@ |
8566f259 | 143 | val="$undef" |
144 | fi | |
145 | elif $test `./findhdr fcntl.h` && \ | |
146 | - $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then | |
147 | + $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then | |
148 | h_fcntl=true; | |
149 | echo "<fcntl.h> defines the O_* constants..." >&4 | |
150 | if ./open3; then | |
d8c68341 | 151 | @@ -6853,7 +6875,7 @@ |
8566f259 | 152 | y*|true) |
153 | usemymalloc='y' | |
154 | mallocsrc='malloc.c' | |
155 | - mallocobj='malloc.o' | |
156 | + mallocobj="malloc$obj_ext" | |
157 | d_mymalloc="$define" | |
158 | case "$libs" in | |
159 | *-lmalloc*) | |
d8c68341 | 160 | @@ -8111,7 +8133,7 @@ |
8566f259 | 161 | printf("%d\n", (char *)&try.bar - (char *)&try.foo); |
162 | } | |
163 | EOCP | |
164 | - if $cc $ccflags try.c -o try >/dev/null 2>&1; then | |
165 | + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then | |
166 | dflt=`./try` | |
167 | else | |
168 | dflt='8' | |
d8c68341 | 169 | @@ -8159,7 +8181,7 @@ |
8566f259 | 170 | } |
171 | EOCP | |
172 | xxx_prompt=y | |
173 | - if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then | |
174 | + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then | |
175 | dflt=`./try` | |
176 | case "$dflt" in | |
177 | [1-4][1-4][1-4][1-4]|12345678|87654321) | |
d8c68341 | 178 | @@ -8692,7 +8714,7 @@ |
8566f259 | 179 | '') $echo $n ".$c" |
180 | if $cc $ccflags \ | |
181 | $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \ | |
182 | - try.c -o try >/dev/null 2>&1 ; then | |
183 | + try.c -o try $ldflags >/dev/null 2>&1 ; then | |
184 | set X $i_time $i_systime $i_systimek $sysselect $s_timeval | |
185 | shift | |
186 | flags="$*" | |
d8c68341 | 187 | @@ -8761,7 +8783,7 @@ |
8566f259 | 188 | #endif |
189 | } | |
190 | EOCP | |
191 | -if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then | |
192 | +if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then | |
193 | d_fds_bits="$define" | |
194 | d_fd_set="$define" | |
195 | echo "Well, your system knows about the normal fd_set typedef..." >&4 | |
d8c68341 | 196 | @@ -8778,7 +8800,7 @@ |
8566f259 | 197 | $cat <<'EOM' |
198 | Hmm, your compiler has some difficulty with fd_set. Checking further... | |
199 | EOM | |
200 | - if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then | |
201 | + if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then | |
202 | d_fds_bits="$undef" | |
203 | d_fd_set="$define" | |
204 | echo "Well, your system has some sort of fd_set available..." >&4 | |
d8c68341 | 205 | @@ -9525,7 +9547,7 @@ |
8566f259 | 206 | else |
207 | echo "false" | |
208 | fi | |
209 | -$rm -f varargs.o | |
210 | +$rm -f varargs$obj_ext | |
211 | EOP | |
212 | chmod +x varargs | |
213 | ||
d8c68341 | 214 | @@ -9852,7 +9874,7 @@ |
8566f259 | 215 | echo " " |
216 | echo "Stripping down executable paths..." >&4 | |
217 | for file in $loclist $trylist; do | |
218 | - eval $file="\$file" | |
219 | + if test X$file != Xln -o X$osname != Xos2; then eval $file="\$file"; fi | |
220 | done | |
221 | ;; | |
222 | esac |