1 --- perl5.003_06/Configure Fri Oct 4 11:08:50 1996
2 +++ Configure Wed Oct 9 17:53:14 1996
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
14 for file in $trylist; do
15 xxx=`./loc $file $file $pth`
17 + if test "X$file" != "X$xxx" ; then
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`
31 '') echo "You are not using GNU cc." ;;
32 @@ -3275,6 +3277,12 @@
34 *) dflt="$dflt -l$thislib";;
36 + elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then
37 + echo "Found -l$thislib."
40 + *) dflt="$dflt -l$thislib";;
53 *) for thislib in $libs; do
54 @@ -3401,12 +3409,14 @@
56 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
58 - elif try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
59 + elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
61 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
63 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
65 + elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
67 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
70 @@ -3457,11 +3467,11 @@
72 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
73 echo "Your C library seems to be in $libc, as you said before."
74 -elif $test -r $incpath/usr/lib/libc.a; then
75 - libc=$incpath/usr/lib/libc.a;
76 +elif $test -r $incpath/usr/lib/libc$lib_ext; then
77 + libc=$incpath/usr/lib/libc$lib_ext;
78 echo "Your C library seems to be in $libc. That's fine."
79 -elif $test -r /lib/libc.a; then
81 +elif $test -r /lib/libc$lib_ext; then
82 + libc=/lib/libc$lib_ext;
83 echo "Your C library seems to be in $libc. You're normal."
85 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
86 @@ -3583,6 +3593,10 @@
88 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
90 +elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
92 + $contains '^fprintf$' libc.list >/dev/null 2>&1; then
95 nm -p $* 2>/dev/null >libc.tmp
96 $grep fprintf libc.tmp > libc.ptf
97 @@ -3593,23 +3607,33 @@
101 - echo "nm didn't seem to work right. Trying ar instead..." >&4
102 + echo "nm didn't seem to work right. Trying $ar instead..." >&4
104 - if ar t $libc > libc.tmp; then
105 - for thisname in $libnames; do
106 - ar t $thisname >>libc.tmp
107 + if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi
108 + if $ar $ar_opt $libc > libc.tmp; then
110 + for thisname in $libnames $libc; do
111 + $ar $ar_opt $thisname >>libc.tmp
112 + if test "X$osname" = "Xos2"; then
113 + # Revision 50 of EMX has bug in $ar:
114 + emximp -o tmp.imp $thisname \
116 + $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
117 + < tmp.imp >>libc.tmp
121 - $sed -e 's/\.o$//' < libc.tmp > libc.list
122 + $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
125 - echo "ar didn't seem to work right." >&4
126 + echo "$ar didn't seem to work right." >&4
127 echo "Maybe this is a Cray...trying bld instead..." >&4
128 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
130 for thisname in $libnames; do
132 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
133 - ar t $thisname >>libc.tmp
134 + $ar t $thisname >>libc.tmp
138 @@ -5606,7 +5630,7 @@
142 - if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
143 + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
145 echo "Your integers are $intsize bytes long."
147 @@ -5686,7 +5710,7 @@
151 -if $cc -o try $ccflags try.c >/dev/null 2>&1; then
152 +if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
156 @@ -5767,7 +5791,7 @@
160 -if $cc -o try $ccflags try.c >/dev/null 2>&1; then
161 +if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
165 @@ -5806,7 +5830,7 @@
166 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
169 - if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
170 + if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then
171 echo "Your vsprintf() returns (int)." >&4
174 @@ -5876,7 +5900,7 @@
177 if $test -z "$cryptlib"; then
178 - cryptlib=`./loc libcrypt.a "" $libpth`
179 + cryptlib=`./loc libcrypt$lib_ext "" $libpth`
183 @@ -6148,7 +6172,7 @@
185 : check sys/file.h first to get FREAD on Sun
186 if $test `./findhdr sys/file.h` && \
187 - $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
188 + $cc $cppflags $ldflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
190 echo "<sys/file.h> defines the O_* constants..." >&4
192 @@ -6159,7 +6183,7 @@
195 elif $test `./findhdr fcntl.h` && \
196 - $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
197 + $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then
199 echo "<fcntl.h> defines the O_* constants..." >&4
201 @@ -6642,7 +6666,7 @@
205 - mallocobj='malloc.o'
206 + mallocobj="malloc$obj_ext"
210 @@ -7286,10 +7310,10 @@
211 : we will have to assume that it supports the 4.2 BSD interface
214 - echo "You don't have Berkeley networking in libc.a..." >&4
215 - if test -f /usr/lib/libnet.a; then
216 - ( (nm $nm_opt /usr/lib/libnet.a | eval $nm_extract) || \
217 - ar t /usr/lib/libnet.a) 2>/dev/null >> libc.list
218 + echo "You don't have Berkeley networking in libc$lib_ext..." >&4
219 + if test -f /usr/lib/libnet$lib_ext; then
220 + ( (nm $nm_opt /usr/lib/libnet$lib_ext | eval $nm_extract) || \
221 + $ar t /usr/lib/libnet$lib_ext) 2>/dev/null >> libc.list
222 if $contains socket libc.list >/dev/null 2>&1; then
223 echo "...but the Wollongong group seems to have hacked it in." >&4
225 @@ -7302,7 +7326,7 @@
229 - echo "or even in libnet.a, which is peculiar." >&4
230 + echo "or even in libnet$lib_ext, which is peculiar." >&4
234 @@ -7867,7 +7891,7 @@
235 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
238 - if $cc $ccflags try.c -o try >/dev/null 2>&1; then
239 + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
243 @@ -7915,7 +7939,7 @@
247 - if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
248 + if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
251 [1-4][1-4][1-4][1-4]|12345678|87654321)
252 @@ -8337,7 +8361,7 @@
256 - if $cc try.c -o try >/dev/null 2>&1 ; then
257 + if $cc $ldflags try.c -o try >/dev/null 2>&1 ; then
261 @@ -8364,18 +8388,18 @@
262 $cc $ccflags -c bar1.c >/dev/null 2>&1
263 $cc $ccflags -c bar2.c >/dev/null 2>&1
264 $cc $ccflags -c foo.c >/dev/null 2>&1
265 -ar rc bar.a bar2.o bar1.o >/dev/null 2>&1
266 -if $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
267 +$ar rc bar$lib_ext bar2$obj_ext bar1$obj_ext >/dev/null 2>&1
268 +if $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
269 ./foobar >/dev/null 2>&1; then
270 - echo "ar appears to generate random libraries itself."
271 + echo "$ar appears to generate random libraries itself."
274 -elif ar ts bar.a >/dev/null 2>&1 &&
275 - $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
276 +elif $ar ts bar$lib_ext >/dev/null 2>&1 &&
277 + $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
278 ./foobar >/dev/null 2>&1; then
279 echo "a table of contents needs to be added with 'ar ts'."
286 @@ -8447,7 +8471,7 @@
289 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
290 - try.c -o try >/dev/null 2>&1 ; then
291 + try.c -o try $ldflags >/dev/null 2>&1 ; then
292 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
295 @@ -8517,7 +8541,7 @@
299 -if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
300 +if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
303 echo "Well, your system knows about the normal fd_set typedef..." >&4
304 @@ -8534,7 +8558,7 @@
306 Hmm, your compiler has some difficulty with fd_set. Checking further...
308 - if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
309 + if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
312 echo "Well, your system has some sort of fd_set available..." >&4
313 @@ -9272,7 +9296,7 @@
318 +$rm -f varargs$obj_ext
322 @@ -9596,7 +9620,7 @@
324 echo "Stripping down executable paths..." >&4
325 for file in $loclist $trylist; do
326 - eval $file="\$file"
327 + if test X$file != Xln -o X$osname != Xos2; then eval $file="\$file"; fi