perl 5.003_07: pod/perlvar.pod
[p5sagit/p5-mst-13.2.git] / os2 / diff.configure
CommitLineData
8566f259 1--- perl5.003_06/Configure Fri Oct 4 11:08:50 1996
2+++ Configure Wed Oct 9 17:53:14 1996
3@@ -1451,7 +1451,7 @@
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
12@@ -1460,7 +1460,9 @@
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 /*)
23@@ -3091,7 +3093,7 @@
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." ;;
32@@ -3275,6 +3277,12 @@
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
45@@ -3387,7 +3395,7 @@
46 esac
47 ;;
48 esac
49-libnames='';
50+#libnames='';
51 case "$libs" in
52 '') ;;
53 *) for thislib in $libs; do
54@@ -3401,12 +3409,14 @@
55 :
56 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
57 :
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
60 :
61 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
62 :
63 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
64 :
65+ elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
66+ :
67 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
68 :
69 else
70@@ -3457,11 +3467,11 @@
71 fi
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
80- libc=/lib/libc.a;
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."
84 else
85 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
86@@ -3583,6 +3593,10 @@
87 eval $xscan;\
88 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
89 eval $xrun
90+elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
91+ eval $xscan;\
92+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
93+ eval $xrun
94 else
95 nm -p $* 2>/dev/null >libc.tmp
96 $grep fprintf libc.tmp > libc.ptf
97@@ -3593,23 +3607,33 @@
98 eval $xrun
99 else
100 echo " "
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
103 com=''
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
109+ echo \; > libc.tmp
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 \
115+ 2>/dev/null && \
116+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
117+ < tmp.imp >>libc.tmp
118+ $rm tmp.imp
119+ fi
120 done
121- $sed -e 's/\.o$//' < libc.tmp > libc.list
122+ $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
123 echo "Ok." >&4
124 else
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
129 then
130 for thisname in $libnames; do
131 bld t $libnames | \
132 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
133- ar t $thisname >>libc.tmp
134+ $ar t $thisname >>libc.tmp
135 done
136 echo "Ok." >&4
137 else
138@@ -5606,7 +5630,7 @@
139 exit(0);
140 }
141 EOCP
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
144 intsize=`./try`
145 echo "Your integers are $intsize bytes long."
146 else
147@@ -5686,7 +5710,7 @@
148 exit(result);
149 }
150 EOCP
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
153 ./try
154 yyy=$?
155 else
156@@ -5767,7 +5791,7 @@
157
158 }
159 EOCP
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
162 ./try
163 castflags=$?
164 else
165@@ -5806,7 +5830,7 @@
166 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
167 }
168 EOF
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
172 val2="$undef"
173 else
174@@ -5876,7 +5900,7 @@
175 cryptlib=-lcrypt
176 fi
177 if $test -z "$cryptlib"; then
178- cryptlib=`./loc libcrypt.a "" $libpth`
179+ cryptlib=`./loc libcrypt$lib_ext "" $libpth`
180 else
181 cryptlib=-lcrypt
182 fi
183@@ -6148,7 +6172,7 @@
184 EOCP
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
189 h_sysfile=true;
190 echo "<sys/file.h> defines the O_* constants..." >&4
191 if ./open3; then
192@@ -6159,7 +6183,7 @@
193 val="$undef"
194 fi
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
198 h_fcntl=true;
199 echo "<fcntl.h> defines the O_* constants..." >&4
200 if ./open3; then
201@@ -6642,7 +6666,7 @@
202 y*|true)
203 usemymalloc='y'
204 mallocsrc='malloc.c'
205- mallocobj='malloc.o'
206+ mallocobj="malloc$obj_ext"
207 d_mymalloc="$define"
208 case "$libs" in
209 *-lmalloc*)
210@@ -7286,10 +7310,10 @@
211 : we will have to assume that it supports the 4.2 BSD interface
212 d_oldsock="$undef"
213 else
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
224 socketlib="-lnet"
225@@ -7302,7 +7326,7 @@
226 d_oldsock="$define"
227 fi
228 else
229- echo "or even in libnet.a, which is peculiar." >&4
230+ echo "or even in libnet$lib_ext, which is peculiar." >&4
231 d_socket="$undef"
232 d_oldsock="$undef"
233 fi
234@@ -7867,7 +7891,7 @@
235 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
236 }
237 EOCP
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
240 dflt=`./try`
241 else
242 dflt='8'
243@@ -7915,7 +7939,7 @@
244 }
245 EOCP
246 xxx_prompt=y
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
249 dflt=`./try`
250 case "$dflt" in
251 [1-4][1-4][1-4][1-4]|12345678|87654321)
252@@ -8337,7 +8361,7 @@
253 printf("%d\n",i);
254 }
255 EOCP
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
258 dflt=`try`
259 else
260 dflt='?'
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."
272 orderlib=false
273 ranlib=":"
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'."
280 orderlib=false
281- ranlib="ar ts"
282+ ranlib="$ar ts"
283 else
284 case "$ranlib" in
285 :) ranlib='';;
286@@ -8447,7 +8471,7 @@
287 '') $echo $n ".$c"
288 if $cc $ccflags \
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
293 shift
294 flags="$*"
295@@ -8517,7 +8541,7 @@
296 #endif
297 }
298 EOCP
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
301 d_fds_bits="$define"
302 d_fd_set="$define"
303 echo "Well, your system knows about the normal fd_set typedef..." >&4
304@@ -8534,7 +8558,7 @@
305 $cat <<'EOM'
306 Hmm, your compiler has some difficulty with fd_set. Checking further...
307 EOM
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
310 d_fds_bits="$undef"
311 d_fd_set="$define"
312 echo "Well, your system has some sort of fd_set available..." >&4
313@@ -9272,7 +9296,7 @@
314 else
315 echo "false"
316 fi
317-$rm -f varargs.o
318+$rm -f varargs$obj_ext
319 EOP
320 chmod +x varargs
321
322@@ -9596,7 +9620,7 @@
323 echo " "
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
328 done
329 ;;
330 esac