Now builds .PL utilities in the utils/ subdirectory.
[p5sagit/p5-mst-13.2.git] / os2 / diff.configure
CommitLineData
4633a7c4 1*** Configure.orig Thu Oct 19 07:48:18 1995
2--- Configure Wed Nov 01 20:14:32 1995
3***************
4*** 561,566 ****
5--- 561,575 ----
6 defvoidused=''
7 voidflags=''
8 CONFIG=''
9+ archobjs=''
10+ firstmakefile='makefile'
11+ obj_ext='.o'
12+ obj_ext_regexp='\.o'
13+ lib_ext='.a'
14+ exe_ext=
15+ ar='ar'
16+ plibext=
17+ path_sep=$p_
18
19 define='define'
20 undef='undef'
21***************
22*** 1363,1369 ****
23 say=offhand
24 for file in $trylist; do
25 xxx=`./loc $file $file $pth`
26! eval $file=$xxx
27 eval _$file=$xxx
28 case "$xxx" in
29 /*)
30--- 1370,1378 ----
31 say=offhand
32 for file in $trylist; do
33 xxx=`./loc $file $file $pth`
34! if test "X$file" != "X$xxx" ; then
35! eval $file=$xxx
36! fi
37 eval _$file=$xxx
38 case "$xxx" in
39 /*)
40***************
41*** 2156,2162 ****
42 exit(0);
43 }
44 EOM
45! if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
46 gccversion=`./gccvers`
47 case "$gccversion" in
48 '') echo "You are not using GNU cc." ;;
49--- 2165,2171 ----
50 exit(0);
51 }
52 EOM
53! if $cc -o gccvers gccvers.c $ldflags >/dev/null 2>&1; then
54 gccversion=`./gccvers`
55 case "$gccversion" in
56 '') echo "You are not using GNU cc." ;;
57***************
58*** 3851,3856 ****
59--- 3860,3871 ----
60 *"-l$thislib "*);;
61 *) dflt="$dflt -l$thislib";;
62 esac
63+ elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then
64+ echo "Found -l$thislib."
65+ case " $dflt " in
66+ *"-l$thislib "*);;
67+ *) dflt="$dflt -l$thislib";;
68+ esac
69 else
70 echo "No -l$thislib."
71 fi
72***************
73*** 3964,3975 ****
74 :
75 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
76 :
77! elif try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
78 :
79 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
80 :
81 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
82 :
83 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
84 :
85 else
86--- 3979,3992 ----
87 :
88 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
89 :
90! elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
91 :
92 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
93 :
94 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
95 :
96+ elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
97+ :
98 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
99 :
100 else
101***************
102*** 4018,4028 ****
103 fi
104 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
105 echo "Your C library seems to be in $libc, as you said before."
106! elif $test -r $incpath/usr/lib/libc.a; then
107! libc=$incpath/usr/lib/libc.a;
108 echo "Your C library seems to be in $libc. That's fine."
109! elif $test -r /lib/libc.a; then
110! libc=/lib/libc.a;
111 echo "Your C library seems to be in $libc. You're normal."
112 else
113 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
114--- 4035,4045 ----
115 fi
116 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
117 echo "Your C library seems to be in $libc, as you said before."
118! elif $test -r $incpath/usr/lib/libc$lib_ext; then
119! libc=$incpath/usr/lib/libc$lib_ext;
120 echo "Your C library seems to be in $libc. That's fine."
121! elif $test -r /lib/libc$lib_ext; then
122! libc=/lib/libc$lib_ext;
123 echo "Your C library seems to be in $libc. You're normal."
124 else
125 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
126***************
127*** 4135,4140 ****
128--- 4152,4161 ----
129 eval $xscan;\
130 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
131 eval $xrun
132+ elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
133+ eval $xscan;\
134+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
135+ eval $xrun
136 else
137 nm -p $* 2>/dev/null >libc.tmp
138 $grep fprintf libc.tmp > libc.ptf
139***************
140*** 4145,4167 ****
141 eval $xrun
142 else
143 echo " "
144! echo "nm didn't seem to work right. Trying ar instead..." >&4
145 com=''
146! if ar t $libc > libc.tmp; then
147 for thisname in $libnames; do
148! ar t $thisname >>libc.tmp
149 done
150! $sed -e 's/\.o$//' < libc.tmp > libc.list
151 echo "Ok." >&4
152 else
153! echo "ar didn't seem to work right." >&4
154 echo "Maybe this is a Cray...trying bld instead..." >&4
155 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
156 then
157 for thisname in $libnames; do
158 bld t $libnames | \
159 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
160! ar t $thisname >>libc.tmp
161 done
162 echo "Ok." >&4
163 else
164--- 4166,4189 ----
165 eval $xrun
166 else
167 echo " "
168! echo "nm didn't seem to work right. Trying $ar instead..." >&4
169 com=''
170! if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi
171! if $ar $ar_opt $libc > libc.tmp; then
172 for thisname in $libnames; do
173! $ar $ar_opt $thisname >>libc.tmp
174 done
175! $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
176 echo "Ok." >&4
177 else
178! echo "$ar didn't seem to work right." >&4
179 echo "Maybe this is a Cray...trying bld instead..." >&4
180 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
181 then
182 for thisname in $libnames; do
183 bld t $libnames | \
184 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
185! $ar t $thisname >>libc.tmp
186 done
187 echo "Ok." >&4
188 else
189***************
190*** 4507,4513 ****
191 exit(0);
192 }
193 EOCP
194! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
195 intsize=`./try`
196 echo "Your integers are $intsize bytes long."
197 else
198--- 4529,4535 ----
199 exit(0);
200 }
201 EOCP
202! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
203 intsize=`./try`
204 echo "Your integers are $intsize bytes long."
205 else
206***************
207*** 4587,4593 ****
208 exit(result);
209 }
210 EOCP
211! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
212 ./try
213 yyy=$?
214 else
215--- 4609,4615 ----
216 exit(result);
217 }
218 EOCP
219! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
220 ./try
221 yyy=$?
222 else
223***************
224*** 4668,4674 ****
225
226 }
227 EOCP
228! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
229 ./try
230 castflags=$?
231 else
232--- 4690,4696 ----
233
234 }
235 EOCP
236! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
237 ./try
238 castflags=$?
239 else
240***************
241*** 4707,4713 ****
242 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
243 }
244 EOF
245! if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
246 echo "Your vsprintf() returns (int)." >&4
247 val2="$undef"
248 else
249--- 4729,4735 ----
250 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
251 }
252 EOF
253! if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then
254 echo "Your vsprintf() returns (int)." >&4
255 val2="$undef"
256 else
257***************
258*** 4777,4783 ****
259 cryptlib=-lcrypt
260 fi
261 if $test -z "$cryptlib"; then
262! cryptlib=`./loc libcrypt.a "" $libpth`
263 else
264 cryptlib=-lcrypt
265 fi
266--- 4799,4805 ----
267 cryptlib=-lcrypt
268 fi
269 if $test -z "$cryptlib"; then
270! cryptlib=`./loc libcrypt$lib_ext "" $libpth`
271 else
272 cryptlib=-lcrypt
273 fi
274***************
275*** 5284,5290 ****
276 }
277 EOM
278 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
279! $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
280 $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
281 xxx=`./fred`
282 case $xxx in
283--- 5306,5312 ----
284 }
285 EOM
286 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
287! $ld $lddlflags -o dyna.$dlext dyna$obj_ext > /dev/null 2>&1 &&
288 $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
289 xxx=`./fred`
290 case $xxx in
291***************
292*** 5441,5447 ****
293 EOCP
294 : check sys/file.h first to get FREAD on Sun
295 if $test `./findhdr sys/file.h` && \
296! $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
297 h_sysfile=true;
298 echo "<sys/file.h> defines the O_* constants..." >&4
299 if ./open3; then
300--- 5463,5469 ----
301 EOCP
302 : check sys/file.h first to get FREAD on Sun
303 if $test `./findhdr sys/file.h` && \
304! $cc $cppflags $ldflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
305 h_sysfile=true;
306 echo "<sys/file.h> defines the O_* constants..." >&4
307 if ./open3; then
308***************
309*** 5452,5458 ****
310 val="$undef"
311 fi
312 elif $test `./findhdr fcntl.h` && \
313! $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
314 h_fcntl=true;
315 echo "<fcntl.h> defines the O_* constants..." >&4
316 if ./open3; then
317--- 5474,5480 ----
318 val="$undef"
319 fi
320 elif $test `./findhdr fcntl.h` && \
321! $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then
322 h_fcntl=true;
323 echo "<fcntl.h> defines the O_* constants..." >&4
324 if ./open3; then
325***************
326*** 5931,5937 ****
327 y*|true)
328 usemymalloc='y'
329 mallocsrc='malloc.c'
330! mallocobj='malloc.o'
331 d_mymalloc="$define"
332 case "$libs" in
333 *-lmalloc*)
334--- 5953,5959 ----
335 y*|true)
336 usemymalloc='y'
337 mallocsrc='malloc.c'
338! mallocobj="malloc$obj_ext"
339 d_mymalloc="$define"
340 case "$libs" in
341 *-lmalloc*)
342***************
343*** 6366,6375 ****
344 : we will have to assume that it supports the 4.2 BSD interface
345 d_oldsock="$undef"
346 else
347! echo "You don't have Berkeley networking in libc.a..." >&4
348! if test -f /usr/lib/libnet.a; then
349! ( (nm $nm_opt /usr/lib/libnet.a | eval $nm_extract) || \
350! ar t /usr/lib/libnet.a) 2>/dev/null >> libc.list
351 if $contains socket libc.list >/dev/null 2>&1; then
352 echo "...but the Wollongong group seems to have hacked it in." >&4
353 socketlib="-lnet"
354--- 6388,6397 ----
355 : we will have to assume that it supports the 4.2 BSD interface
356 d_oldsock="$undef"
357 else
358! echo "You don't have Berkeley networking in libc$lib_ext..." >&4
359! if test -f /usr/lib/libnet$lib_ext; then
360! ( (nm $nm_opt /usr/lib/libnet$lib_ext | eval $nm_extract) || \
361! $ar t /usr/lib/libnet$lib_ext) 2>/dev/null >> libc.list
362 if $contains socket libc.list >/dev/null 2>&1; then
363 echo "...but the Wollongong group seems to have hacked it in." >&4
364 socketlib="-lnet"
365***************
366*** 6382,6388 ****
367 d_oldsock="$define"
368 fi
369 else
370! echo "or even in libnet.a, which is peculiar." >&4
371 d_socket="$undef"
372 d_oldsock="$undef"
373 fi
374--- 6404,6410 ----
375 d_oldsock="$define"
376 fi
377 else
378! echo "or even in libnet$lib_ext, which is peculiar." >&4
379 d_socket="$undef"
380 d_oldsock="$undef"
381 fi
382***************
383*** 6905,6911 ****
384 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
385 }
386 EOCP
387! if $cc $ccflags try.c -o try >/dev/null 2>&1; then
388 dflt=`./try`
389 else
390 dflt='8'
391--- 6927,6933 ----
392 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
393 }
394 EOCP
395! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
396 dflt=`./try`
397 else
398 dflt='8'
399***************
400*** 6953,6959 ****
401 }
402 EOCP
403 xxx_prompt=y
404! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
405 dflt=`./try`
406 case "$dflt" in
407 [1-4][1-4][1-4][1-4]|12345678|87654321)
408--- 6975,6981 ----
409 }
410 EOCP
411 xxx_prompt=y
412! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
413 dflt=`./try`
414 case "$dflt" in
415 [1-4][1-4][1-4][1-4]|12345678|87654321)
416***************
417*** 7531,7537 ****
418 printf("%d\n",i);
419 }
420 EOCP
421! if $cc try.c -o try >/dev/null 2>&1 ; then
422 dflt=`try`
423 else
424 dflt='?'
425--- 7553,7559 ----
426 printf("%d\n",i);
427 }
428 EOCP
429! if $cc $ldflags try.c -o try >/dev/null 2>&1 ; then
430 dflt=`try`
431 else
432 dflt='?'
433***************
434*** 7558,7575 ****
435 $cc $ccflags -c bar1.c >/dev/null 2>&1
436 $cc $ccflags -c bar2.c >/dev/null 2>&1
437 $cc $ccflags -c foo.c >/dev/null 2>&1
438! ar rc bar.a bar2.o bar1.o >/dev/null 2>&1
439! if $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
440 ./foobar >/dev/null 2>&1; then
441! echo "ar appears to generate random libraries itself."
442 orderlib=false
443 ranlib=":"
444! elif ar ts bar.a >/dev/null 2>&1 &&
445! $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
446 ./foobar >/dev/null 2>&1; then
447 echo "a table of contents needs to be added with 'ar ts'."
448 orderlib=false
449! ranlib="ar ts"
450 else
451 case "$ranlib" in
452 :) ranlib='';;
453--- 7580,7597 ----
454 $cc $ccflags -c bar1.c >/dev/null 2>&1
455 $cc $ccflags -c bar2.c >/dev/null 2>&1
456 $cc $ccflags -c foo.c >/dev/null 2>&1
457! $ar rc bar$lib_ext bar2$obj_ext bar1$obj_ext >/dev/null 2>&1
458! if $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
459 ./foobar >/dev/null 2>&1; then
460! echo "$ar appears to generate random libraries itself."
461 orderlib=false
462 ranlib=":"
463! elif $ar ts bar$lib_ext >/dev/null 2>&1 &&
464! $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
465 ./foobar >/dev/null 2>&1; then
466 echo "a table of contents needs to be added with 'ar ts'."
467 orderlib=false
468! ranlib="$ar ts"
469 else
470 case "$ranlib" in
471 :) ranlib='';;
472***************
473*** 7641,7647 ****
474 '') $echo $n ".$c"
475 if $cc $ccflags \
476 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
477! try.c -o try >/dev/null 2>&1 ; then
478 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
479 shift
480 flags="$*"
481--- 7663,7669 ----
482 '') $echo $n ".$c"
483 if $cc $ccflags \
484 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
485! try.c -o try $ldflags >/dev/null 2>&1 ; then
486 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
487 shift
488 flags="$*"
489***************
490*** 7710,7716 ****
491 #endif
492 }
493 EOCP
494! if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
495 d_fds_bits="$define"
496 d_fd_set="$define"
497 echo "Well, your system knows about the normal fd_set typedef..." >&4
498--- 7732,7738 ----
499 #endif
500 }
501 EOCP
502! if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
503 d_fds_bits="$define"
504 d_fd_set="$define"
505 echo "Well, your system knows about the normal fd_set typedef..." >&4
506***************
507*** 7727,7733 ****
508 $cat <<'EOM'
509 Hmm, your compiler has some difficulty with fd_set. Checking further...
510 EOM
511! if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
512 d_fds_bits="$undef"
513 d_fd_set="$define"
514 echo "Well, your system has some sort of fd_set available..." >&4
515--- 7749,7755 ----
516 $cat <<'EOM'
517 Hmm, your compiler has some difficulty with fd_set. Checking further...
518 EOM
519! if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
520 d_fds_bits="$undef"
521 d_fd_set="$define"
522 echo "Well, your system has some sort of fd_set available..." >&4
523***************
524*** 8353,8359 ****
525 else
526 echo "false"
527 fi
528! $rm -f varargs.o
529 EOP
530 chmod +x varargs
531
532--- 8375,8381 ----
533 else
534 echo "false"
535 fi
536! $rm -f varargs$obj_ext
537 EOP
538 chmod +x varargs
539
540***************
541*** 8496,8506 ****
542 echo " "
543 echo "Stripping down executable paths..." >&4
544 for file in $loclist $trylist; do
545! eval $file="\$file"
546 done
547 ;;
548 esac
549
550 : create config.sh file
551 echo " "
552 echo "Creating config.sh..." >&4
553--- 8518,8531 ----
554 echo " "
555 echo "Stripping down executable paths..." >&4
556 for file in $loclist $trylist; do
557! if test X$file != Xln -o X$osname != Xos2; then eval $file="\$file"; fi
558 done
559 ;;
560 esac
561
562+ # Setup libraries for linking miniperl (if not set already)
563+ : ${cldlibs="$libs $cryptlib"}
564+
565 : create config.sh file
566 echo " "
567 echo "Creating config.sh..." >&4
568***************
569*** 8556,8561 ****
570--- 8581,8587 ----
571 chmod='$chmod'
572 chown='$chown'
573 clocktype='$clocktype'
574+ cldlibs='$cldlibs'
575 comm='$comm'
576 compress='$compress'
577 contains='$contains'
578***************
579*** 8752,8757 ****
580--- 8778,8784 ----
581 expr='$expr'
582 extensions='$extensions'
583 find='$find'
584+ firstmakefile='$firstmakefile'
585 flex='$flex'
586 fpostype='$fpostype'
587 freetype='$freetype'
588***************
589*** 8962,8967 ****
590--- 8989,9002 ----
591 voidflags='$voidflags'
592 xlibpth='$xlibpth'
593 zcat='$zcat'
594+ archobjs='$archobjs'
595+ obj_ext='$obj_ext'
596+ obj_ext_regexp='$obj_ext_regexp'
597+ lib_ext='$lib_ext'
598+ exe_ext='$exe_ext'
599+ ar='$ar'
600+ plibext='$plibext'
601+ path_sep='$path_sep'
602 EOT
603
604 : add special variables