Use ~-expanded version of privlib
[p5sagit/p5-mst-13.2.git] / os2 / diff.configure
CommitLineData
eacfb5f1 1*** Configure.orig Thu Dec 07 14:38:08 1995
2--- Configure Mon Dec 18 19:16:22 1995
4633a7c4 3***************
eacfb5f1 4*** 1377,1383 ****
5 *)
6 echo "I don't know where '$file' is, and my life depends on it." >&4
7 echo "Go find a public domain implementation or fix your PATH setting!" >&4
8! exit 1
9 ;;
10 esac
11 done
12--- 1377,1383 ----
13 *)
14 echo "I don't know where '$file' is, and my life depends on it." >&4
15 echo "Go find a public domain implementation or fix your PATH setting!" >&4
16! #exit 1
17 ;;
18 esac
19 done
4633a7c4 20***************
eacfb5f1 21*** 1386,1392 ****
4633a7c4 22 say=offhand
23 for file in $trylist; do
24 xxx=`./loc $file $file $pth`
25! eval $file=$xxx
26 eval _$file=$xxx
27 case "$xxx" in
28 /*)
eacfb5f1 29--- 1386,1394 ----
4633a7c4 30 say=offhand
31 for file in $trylist; do
32 xxx=`./loc $file $file $pth`
33! if test "X$file" != "X$xxx" ; then
34! eval $file=$xxx
35! fi
36 eval _$file=$xxx
37 case "$xxx" in
38 /*)
39***************
eacfb5f1 40*** 3173,3179 ****
4633a7c4 41 exit(0);
42 }
43 EOM
44! if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
45 gccversion=`./gccvers`
46 case "$gccversion" in
47 '') echo "You are not using GNU cc." ;;
eacfb5f1 48--- 3175,3181 ----
4633a7c4 49 exit(0);
50 }
51 EOM
52! if $cc -o gccvers gccvers.c $ldflags >/dev/null 2>&1; then
53 gccversion=`./gccvers`
54 case "$gccversion" in
55 '') echo "You are not using GNU cc." ;;
56***************
eacfb5f1 57*** 3765,3770 ****
58--- 3767,3778 ----
4633a7c4 59 *"-l$thislib "*);;
60 *) dflt="$dflt -l$thislib";;
61 esac
62+ elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then
63+ echo "Found -l$thislib."
64+ case " $dflt " in
65+ *"-l$thislib "*);;
66+ *) dflt="$dflt -l$thislib";;
67+ esac
68 else
69 echo "No -l$thislib."
70 fi
71***************
eacfb5f1 72*** 3864,3870 ****
73 esac
74 ;;
75 esac
76! libnames='';
77 case "$libs" in
78 '') ;;
79 *) for thislib in $libs; do
80--- 3872,3878 ----
81 esac
82 ;;
83 esac
84! #libnames='';
85 case "$libs" in
86 '') ;;
87 *) for thislib in $libs; do
88***************
89*** 3878,3889 ****
4633a7c4 90 :
91 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
92 :
93! elif try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
94 :
95 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
96 :
97 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
98 :
99 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
100 :
101 else
eacfb5f1 102--- 3886,3899 ----
4633a7c4 103 :
104 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
105 :
106! elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
107 :
108 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
109 :
110 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
111 :
112+ elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
113+ :
114 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
115 :
116 else
117***************
eacfb5f1 118*** 3932,3942 ****
4633a7c4 119 fi
120 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
121 echo "Your C library seems to be in $libc, as you said before."
122! elif $test -r $incpath/usr/lib/libc.a; then
123! libc=$incpath/usr/lib/libc.a;
124 echo "Your C library seems to be in $libc. That's fine."
125! elif $test -r /lib/libc.a; then
126! libc=/lib/libc.a;
127 echo "Your C library seems to be in $libc. You're normal."
128 else
129 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
eacfb5f1 130--- 3942,3952 ----
4633a7c4 131 fi
132 elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
133 echo "Your C library seems to be in $libc, as you said before."
134! elif $test -r $incpath/usr/lib/libc$lib_ext; then
135! libc=$incpath/usr/lib/libc$lib_ext;
136 echo "Your C library seems to be in $libc. That's fine."
137! elif $test -r /lib/libc$lib_ext; then
138! libc=/lib/libc$lib_ext;
139 echo "Your C library seems to be in $libc. You're normal."
140 else
141 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
142***************
eacfb5f1 143*** 4049,4054 ****
144--- 4059,4068 ----
4633a7c4 145 eval $xscan;\
146 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
147 eval $xrun
148+ elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
149+ eval $xscan;\
150+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
151+ eval $xrun
152 else
153 nm -p $* 2>/dev/null >libc.tmp
154 $grep fprintf libc.tmp > libc.ptf
155***************
eacfb5f1 156*** 4059,4081 ****
4633a7c4 157 eval $xrun
158 else
159 echo " "
160! echo "nm didn't seem to work right. Trying ar instead..." >&4
161 com=''
162! if ar t $libc > libc.tmp; then
163 for thisname in $libnames; do
164! ar t $thisname >>libc.tmp
165 done
166! $sed -e 's/\.o$//' < libc.tmp > libc.list
167 echo "Ok." >&4
168 else
169! echo "ar didn't seem to work right." >&4
170 echo "Maybe this is a Cray...trying bld instead..." >&4
171 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
172 then
173 for thisname in $libnames; do
174 bld t $libnames | \
175 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
176! ar t $thisname >>libc.tmp
177 done
178 echo "Ok." >&4
179 else
eacfb5f1 180--- 4073,4096 ----
4633a7c4 181 eval $xrun
182 else
183 echo " "
184! echo "nm didn't seem to work right. Trying $ar instead..." >&4
185 com=''
186! if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi
187! if $ar $ar_opt $libc > libc.tmp; then
188 for thisname in $libnames; do
189! $ar $ar_opt $thisname >>libc.tmp
190 done
191! $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
192 echo "Ok." >&4
193 else
194! echo "$ar didn't seem to work right." >&4
195 echo "Maybe this is a Cray...trying bld instead..." >&4
196 if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list
197 then
198 for thisname in $libnames; do
199 bld t $libnames | \
200 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
201! $ar t $thisname >>libc.tmp
202 done
203 echo "Ok." >&4
204 else
205***************
eacfb5f1 206*** 4421,4427 ****
4633a7c4 207 exit(0);
208 }
209 EOCP
210! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
211 intsize=`./try`
212 echo "Your integers are $intsize bytes long."
213 else
eacfb5f1 214--- 4436,4442 ----
4633a7c4 215 exit(0);
216 }
217 EOCP
218! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
219 intsize=`./try`
220 echo "Your integers are $intsize bytes long."
221 else
222***************
eacfb5f1 223*** 4501,4507 ****
4633a7c4 224 exit(result);
225 }
226 EOCP
227! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
228 ./try
229 yyy=$?
230 else
eacfb5f1 231--- 4516,4522 ----
4633a7c4 232 exit(result);
233 }
234 EOCP
235! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
236 ./try
237 yyy=$?
238 else
239***************
eacfb5f1 240*** 4582,4588 ****
4633a7c4 241
242 }
243 EOCP
244! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
245 ./try
246 castflags=$?
247 else
eacfb5f1 248--- 4597,4603 ----
4633a7c4 249
250 }
251 EOCP
252! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
253 ./try
254 castflags=$?
255 else
256***************
eacfb5f1 257*** 4621,4627 ****
4633a7c4 258 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
259 }
260 EOF
261! if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
262 echo "Your vsprintf() returns (int)." >&4
263 val2="$undef"
264 else
eacfb5f1 265--- 4636,4642 ----
4633a7c4 266 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
267 }
268 EOF
269! if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then
270 echo "Your vsprintf() returns (int)." >&4
271 val2="$undef"
272 else
273***************
eacfb5f1 274*** 4691,4697 ****
4633a7c4 275 cryptlib=-lcrypt
276 fi
277 if $test -z "$cryptlib"; then
278! cryptlib=`./loc libcrypt.a "" $libpth`
279 else
280 cryptlib=-lcrypt
281 fi
eacfb5f1 282--- 4706,4712 ----
4633a7c4 283 cryptlib=-lcrypt
284 fi
285 if $test -z "$cryptlib"; then
286! cryptlib=`./loc libcrypt$lib_ext "" $libpth`
287 else
288 cryptlib=-lcrypt
289 fi
290***************
eacfb5f1 291*** 5198,5204 ****
4633a7c4 292 }
293 EOM
294 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
295! $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 &&
296 $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
297 xxx=`./fred`
298 case $xxx in
eacfb5f1 299--- 5213,5219 ----
4633a7c4 300 }
301 EOM
302 if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 &&
303! $ld $lddlflags -o dyna.$dlext dyna$obj_ext > /dev/null 2>&1 &&
304 $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then
305 xxx=`./fred`
306 case $xxx in
307***************
eacfb5f1 308*** 5355,5361 ****
4633a7c4 309 EOCP
310 : check sys/file.h first to get FREAD on Sun
311 if $test `./findhdr sys/file.h` && \
312! $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
313 h_sysfile=true;
314 echo "<sys/file.h> defines the O_* constants..." >&4
315 if ./open3; then
eacfb5f1 316--- 5370,5376 ----
4633a7c4 317 EOCP
318 : check sys/file.h first to get FREAD on Sun
319 if $test `./findhdr sys/file.h` && \
320! $cc $cppflags $ldflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
321 h_sysfile=true;
322 echo "<sys/file.h> defines the O_* constants..." >&4
323 if ./open3; then
324***************
eacfb5f1 325*** 5366,5372 ****
4633a7c4 326 val="$undef"
327 fi
328 elif $test `./findhdr fcntl.h` && \
329! $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
330 h_fcntl=true;
331 echo "<fcntl.h> defines the O_* constants..." >&4
332 if ./open3; then
eacfb5f1 333--- 5381,5387 ----
4633a7c4 334 val="$undef"
335 fi
336 elif $test `./findhdr fcntl.h` && \
337! $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then
338 h_fcntl=true;
339 echo "<fcntl.h> defines the O_* constants..." >&4
340 if ./open3; then
341***************
eacfb5f1 342*** 5848,5854 ****
4633a7c4 343 y*|true)
344 usemymalloc='y'
345 mallocsrc='malloc.c'
346! mallocobj='malloc.o'
347 d_mymalloc="$define"
348 case "$libs" in
349 *-lmalloc*)
eacfb5f1 350--- 5863,5869 ----
4633a7c4 351 y*|true)
352 usemymalloc='y'
353 mallocsrc='malloc.c'
354! mallocobj="malloc$obj_ext"
355 d_mymalloc="$define"
356 case "$libs" in
357 *-lmalloc*)
358***************
eacfb5f1 359*** 6283,6292 ****
4633a7c4 360 : we will have to assume that it supports the 4.2 BSD interface
361 d_oldsock="$undef"
362 else
363! echo "You don't have Berkeley networking in libc.a..." >&4
364! if test -f /usr/lib/libnet.a; then
365! ( (nm $nm_opt /usr/lib/libnet.a | eval $nm_extract) || \
366! ar t /usr/lib/libnet.a) 2>/dev/null >> libc.list
367 if $contains socket libc.list >/dev/null 2>&1; then
368 echo "...but the Wollongong group seems to have hacked it in." >&4
369 socketlib="-lnet"
eacfb5f1 370--- 6298,6307 ----
4633a7c4 371 : we will have to assume that it supports the 4.2 BSD interface
372 d_oldsock="$undef"
373 else
374! echo "You don't have Berkeley networking in libc$lib_ext..." >&4
375! if test -f /usr/lib/libnet$lib_ext; then
376! ( (nm $nm_opt /usr/lib/libnet$lib_ext | eval $nm_extract) || \
377! $ar t /usr/lib/libnet$lib_ext) 2>/dev/null >> libc.list
378 if $contains socket libc.list >/dev/null 2>&1; then
379 echo "...but the Wollongong group seems to have hacked it in." >&4
380 socketlib="-lnet"
381***************
eacfb5f1 382*** 6299,6305 ****
4633a7c4 383 d_oldsock="$define"
384 fi
385 else
386! echo "or even in libnet.a, which is peculiar." >&4
387 d_socket="$undef"
388 d_oldsock="$undef"
389 fi
eacfb5f1 390--- 6314,6320 ----
4633a7c4 391 d_oldsock="$define"
392 fi
393 else
394! echo "or even in libnet$lib_ext, which is peculiar." >&4
395 d_socket="$undef"
396 d_oldsock="$undef"
397 fi
398***************
eacfb5f1 399*** 7055,7061 ****
4633a7c4 400 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
401 }
402 EOCP
403! if $cc $ccflags try.c -o try >/dev/null 2>&1; then
404 dflt=`./try`
405 else
406 dflt='8'
eacfb5f1 407--- 7070,7076 ----
4633a7c4 408 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
409 }
410 EOCP
411! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
412 dflt=`./try`
413 else
414 dflt='8'
415***************
eacfb5f1 416*** 7080,7086 ****
417 '') obj_ext='.o';;
418 esac
419 case "$path_sep" in
420! '') path_sep=':';;
421 esac
422 : Which makefile gets called first. This is used by make depend.
423 case "$firstmakefile" in
424--- 7095,7101 ----
425 '') obj_ext='.o';;
426 esac
427 case "$path_sep" in
428! '') path_sep="$p_";;
429 esac
430 : Which makefile gets called first. This is used by make depend.
431 case "$firstmakefile" in
432***************
433*** 7120,7126 ****
4633a7c4 434 }
435 EOCP
436 xxx_prompt=y
437! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
438 dflt=`./try`
439 case "$dflt" in
440 [1-4][1-4][1-4][1-4]|12345678|87654321)
eacfb5f1 441--- 7135,7141 ----
4633a7c4 442 }
443 EOCP
444 xxx_prompt=y
445! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
446 dflt=`./try`
447 case "$dflt" in
448 [1-4][1-4][1-4][1-4]|12345678|87654321)
449***************
eacfb5f1 450*** 7470,7476 ****
4633a7c4 451 printf("%d\n",i);
452 }
453 EOCP
454! if $cc try.c -o try >/dev/null 2>&1 ; then
455 dflt=`try`
456 else
457 dflt='?'
eacfb5f1 458--- 7485,7491 ----
4633a7c4 459 printf("%d\n",i);
460 }
461 EOCP
462! if $cc $ldflags try.c -o try >/dev/null 2>&1 ; then
463 dflt=`try`
464 else
465 dflt='?'
466***************
eacfb5f1 467*** 7497,7514 ****
4633a7c4 468 $cc $ccflags -c bar1.c >/dev/null 2>&1
469 $cc $ccflags -c bar2.c >/dev/null 2>&1
470 $cc $ccflags -c foo.c >/dev/null 2>&1
471! ar rc bar.a bar2.o bar1.o >/dev/null 2>&1
472! if $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
473 ./foobar >/dev/null 2>&1; then
474! echo "ar appears to generate random libraries itself."
475 orderlib=false
476 ranlib=":"
477! elif ar ts bar.a >/dev/null 2>&1 &&
478! $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
479 ./foobar >/dev/null 2>&1; then
480 echo "a table of contents needs to be added with 'ar ts'."
481 orderlib=false
482! ranlib="ar ts"
483 else
484 case "$ranlib" in
485 :) ranlib='';;
eacfb5f1 486--- 7512,7529 ----
4633a7c4 487 $cc $ccflags -c bar1.c >/dev/null 2>&1
488 $cc $ccflags -c bar2.c >/dev/null 2>&1
489 $cc $ccflags -c foo.c >/dev/null 2>&1
490! $ar rc bar$lib_ext bar2$obj_ext bar1$obj_ext >/dev/null 2>&1
491! if $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
492 ./foobar >/dev/null 2>&1; then
493! echo "$ar appears to generate random libraries itself."
494 orderlib=false
495 ranlib=":"
496! elif $ar ts bar$lib_ext >/dev/null 2>&1 &&
497! $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
498 ./foobar >/dev/null 2>&1; then
499 echo "a table of contents needs to be added with 'ar ts'."
500 orderlib=false
501! ranlib="$ar ts"
502 else
503 case "$ranlib" in
504 :) ranlib='';;
505***************
eacfb5f1 506*** 7580,7586 ****
4633a7c4 507 '') $echo $n ".$c"
508 if $cc $ccflags \
509 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
510! try.c -o try >/dev/null 2>&1 ; then
511 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
512 shift
513 flags="$*"
eacfb5f1 514--- 7595,7601 ----
4633a7c4 515 '') $echo $n ".$c"
516 if $cc $ccflags \
517 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
518! try.c -o try $ldflags >/dev/null 2>&1 ; then
519 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
520 shift
521 flags="$*"
522***************
eacfb5f1 523*** 7649,7655 ****
4633a7c4 524 #endif
525 }
526 EOCP
527! if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
528 d_fds_bits="$define"
529 d_fd_set="$define"
530 echo "Well, your system knows about the normal fd_set typedef..." >&4
eacfb5f1 531--- 7664,7670 ----
4633a7c4 532 #endif
533 }
534 EOCP
535! if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
536 d_fds_bits="$define"
537 d_fd_set="$define"
538 echo "Well, your system knows about the normal fd_set typedef..." >&4
539***************
eacfb5f1 540*** 7666,7672 ****
4633a7c4 541 $cat <<'EOM'
542 Hmm, your compiler has some difficulty with fd_set. Checking further...
543 EOM
544! if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
545 d_fds_bits="$undef"
546 d_fd_set="$define"
547 echo "Well, your system has some sort of fd_set available..." >&4
eacfb5f1 548--- 7681,7687 ----
4633a7c4 549 $cat <<'EOM'
550 Hmm, your compiler has some difficulty with fd_set. Checking further...
551 EOM
552! if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
553 d_fds_bits="$undef"
554 d_fd_set="$define"
555 echo "Well, your system has some sort of fd_set available..." >&4
556***************
eacfb5f1 557*** 8380,8386 ****
4633a7c4 558 else
559 echo "false"
560 fi
561! $rm -f varargs.o
562 EOP
563 chmod +x varargs
564
eacfb5f1 565--- 8395,8401 ----
4633a7c4 566 else
567 echo "false"
568 fi
569! $rm -f varargs$obj_ext
570 EOP
571 chmod +x varargs
572
573***************
eacfb5f1 574*** 8744,8750 ****
4633a7c4 575 echo " "
576 echo "Stripping down executable paths..." >&4
577 for file in $loclist $trylist; do
578! eval $file="\$file"
579 done
580 ;;
581 esac
eacfb5f1 582--- 8759,8765 ----
4633a7c4 583 echo " "
584 echo "Stripping down executable paths..." >&4
585 for file in $loclist $trylist; do
586! if test X$file != Xln -o X$osname != Xos2; then eval $file="\$file"; fi
587 done
588 ;;
589 esac