LC_COLLATE.
[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*** 5355,5361 ****
4633a7c4 292 EOCP
293 : check sys/file.h first to get FREAD on Sun
294 if $test `./findhdr sys/file.h` && \
295! $cc $cppflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
296 h_sysfile=true;
297 echo "<sys/file.h> defines the O_* constants..." >&4
298 if ./open3; then
eacfb5f1 299--- 5370,5376 ----
4633a7c4 300 EOCP
301 : check sys/file.h first to get FREAD on Sun
302 if $test `./findhdr sys/file.h` && \
303! $cc $cppflags $ldflags "-DI_SYS_FILE" open3.c -o open3 >/dev/null 2>&1 ; then
304 h_sysfile=true;
305 echo "<sys/file.h> defines the O_* constants..." >&4
306 if ./open3; then
307***************
eacfb5f1 308*** 5366,5372 ****
4633a7c4 309 val="$undef"
310 fi
311 elif $test `./findhdr fcntl.h` && \
312! $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
313 h_fcntl=true;
314 echo "<fcntl.h> defines the O_* constants..." >&4
315 if ./open3; then
eacfb5f1 316--- 5381,5387 ----
4633a7c4 317 val="$undef"
318 fi
319 elif $test `./findhdr fcntl.h` && \
320! $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then
321 h_fcntl=true;
322 echo "<fcntl.h> defines the O_* constants..." >&4
323 if ./open3; then
324***************
eacfb5f1 325*** 5848,5854 ****
4633a7c4 326 y*|true)
327 usemymalloc='y'
328 mallocsrc='malloc.c'
329! mallocobj='malloc.o'
330 d_mymalloc="$define"
331 case "$libs" in
332 *-lmalloc*)
eacfb5f1 333--- 5863,5869 ----
4633a7c4 334 y*|true)
335 usemymalloc='y'
336 mallocsrc='malloc.c'
337! mallocobj="malloc$obj_ext"
338 d_mymalloc="$define"
339 case "$libs" in
340 *-lmalloc*)
341***************
eacfb5f1 342*** 6283,6292 ****
4633a7c4 343 : we will have to assume that it supports the 4.2 BSD interface
344 d_oldsock="$undef"
345 else
346! echo "You don't have Berkeley networking in libc.a..." >&4
347! if test -f /usr/lib/libnet.a; then
348! ( (nm $nm_opt /usr/lib/libnet.a | eval $nm_extract) || \
349! ar t /usr/lib/libnet.a) 2>/dev/null >> libc.list
350 if $contains socket libc.list >/dev/null 2>&1; then
351 echo "...but the Wollongong group seems to have hacked it in." >&4
352 socketlib="-lnet"
eacfb5f1 353--- 6298,6307 ----
4633a7c4 354 : we will have to assume that it supports the 4.2 BSD interface
355 d_oldsock="$undef"
356 else
357! echo "You don't have Berkeley networking in libc$lib_ext..." >&4
358! if test -f /usr/lib/libnet$lib_ext; then
359! ( (nm $nm_opt /usr/lib/libnet$lib_ext | eval $nm_extract) || \
360! $ar t /usr/lib/libnet$lib_ext) 2>/dev/null >> libc.list
361 if $contains socket libc.list >/dev/null 2>&1; then
362 echo "...but the Wollongong group seems to have hacked it in." >&4
363 socketlib="-lnet"
364***************
eacfb5f1 365*** 6299,6305 ****
4633a7c4 366 d_oldsock="$define"
367 fi
368 else
369! echo "or even in libnet.a, which is peculiar." >&4
370 d_socket="$undef"
371 d_oldsock="$undef"
372 fi
eacfb5f1 373--- 6314,6320 ----
4633a7c4 374 d_oldsock="$define"
375 fi
376 else
377! echo "or even in libnet$lib_ext, which is peculiar." >&4
378 d_socket="$undef"
379 d_oldsock="$undef"
380 fi
381***************
eacfb5f1 382*** 7055,7061 ****
4633a7c4 383 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
384 }
385 EOCP
386! if $cc $ccflags try.c -o try >/dev/null 2>&1; then
387 dflt=`./try`
388 else
389 dflt='8'
eacfb5f1 390--- 7070,7076 ----
4633a7c4 391 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
392 }
393 EOCP
394! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
395 dflt=`./try`
396 else
397 dflt='8'
398***************
eacfb5f1 399*** 7120,7126 ****
4633a7c4 400 }
401 EOCP
402 xxx_prompt=y
403! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
404 dflt=`./try`
405 case "$dflt" in
406 [1-4][1-4][1-4][1-4]|12345678|87654321)
eacfb5f1 407--- 7135,7141 ----
4633a7c4 408 }
409 EOCP
410 xxx_prompt=y
411! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
412 dflt=`./try`
413 case "$dflt" in
414 [1-4][1-4][1-4][1-4]|12345678|87654321)
415***************
eacfb5f1 416*** 7470,7476 ****
4633a7c4 417 printf("%d\n",i);
418 }
419 EOCP
420! if $cc try.c -o try >/dev/null 2>&1 ; then
421 dflt=`try`
422 else
423 dflt='?'
eacfb5f1 424--- 7485,7491 ----
4633a7c4 425 printf("%d\n",i);
426 }
427 EOCP
428! if $cc $ldflags try.c -o try >/dev/null 2>&1 ; then
429 dflt=`try`
430 else
431 dflt='?'
432***************
eacfb5f1 433*** 7497,7514 ****
4633a7c4 434 $cc $ccflags -c bar1.c >/dev/null 2>&1
435 $cc $ccflags -c bar2.c >/dev/null 2>&1
436 $cc $ccflags -c foo.c >/dev/null 2>&1
437! ar rc bar.a bar2.o bar1.o >/dev/null 2>&1
438! if $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
439 ./foobar >/dev/null 2>&1; then
440! echo "ar appears to generate random libraries itself."
441 orderlib=false
442 ranlib=":"
443! elif ar ts bar.a >/dev/null 2>&1 &&
444! $cc $ccflags $ldflags -o foobar foo.o bar.a $libs > /dev/null 2>&1 &&
445 ./foobar >/dev/null 2>&1; then
446 echo "a table of contents needs to be added with 'ar ts'."
447 orderlib=false
448! ranlib="ar ts"
449 else
450 case "$ranlib" in
451 :) ranlib='';;
eacfb5f1 452--- 7512,7529 ----
4633a7c4 453 $cc $ccflags -c bar1.c >/dev/null 2>&1
454 $cc $ccflags -c bar2.c >/dev/null 2>&1
455 $cc $ccflags -c foo.c >/dev/null 2>&1
456! $ar rc bar$lib_ext bar2$obj_ext bar1$obj_ext >/dev/null 2>&1
457! if $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
458 ./foobar >/dev/null 2>&1; then
459! echo "$ar appears to generate random libraries itself."
460 orderlib=false
461 ranlib=":"
462! elif $ar ts bar$lib_ext >/dev/null 2>&1 &&
463! $cc $ccflags $ldflags -o foobar foo$obj_ext bar$lib_ext $libs > /dev/null 2>&1 &&
464 ./foobar >/dev/null 2>&1; then
465 echo "a table of contents needs to be added with 'ar ts'."
466 orderlib=false
467! ranlib="$ar ts"
468 else
469 case "$ranlib" in
470 :) ranlib='';;
471***************
eacfb5f1 472*** 7580,7586 ****
4633a7c4 473 '') $echo $n ".$c"
474 if $cc $ccflags \
475 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
476! try.c -o try >/dev/null 2>&1 ; then
477 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
478 shift
479 flags="$*"
eacfb5f1 480--- 7595,7601 ----
4633a7c4 481 '') $echo $n ".$c"
482 if $cc $ccflags \
483 $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone \
484! try.c -o try $ldflags >/dev/null 2>&1 ; then
485 set X $i_time $i_systime $i_systimek $sysselect $s_timeval
486 shift
487 flags="$*"
488***************
eacfb5f1 489*** 7649,7655 ****
4633a7c4 490 #endif
491 }
492 EOCP
493! if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
494 d_fds_bits="$define"
495 d_fd_set="$define"
496 echo "Well, your system knows about the normal fd_set typedef..." >&4
eacfb5f1 497--- 7664,7670 ----
4633a7c4 498 #endif
499 }
500 EOCP
501! if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
502 d_fds_bits="$define"
503 d_fd_set="$define"
504 echo "Well, your system knows about the normal fd_set typedef..." >&4
505***************
eacfb5f1 506*** 7666,7672 ****
4633a7c4 507 $cat <<'EOM'
508 Hmm, your compiler has some difficulty with fd_set. Checking further...
509 EOM
510! if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
511 d_fds_bits="$undef"
512 d_fd_set="$define"
513 echo "Well, your system has some sort of fd_set available..." >&4
eacfb5f1 514--- 7681,7687 ----
4633a7c4 515 $cat <<'EOM'
516 Hmm, your compiler has some difficulty with fd_set. Checking further...
517 EOM
518! if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
519 d_fds_bits="$undef"
520 d_fd_set="$define"
521 echo "Well, your system has some sort of fd_set available..." >&4
522***************
eacfb5f1 523*** 8380,8386 ****
4633a7c4 524 else
525 echo "false"
526 fi
527! $rm -f varargs.o
528 EOP
529 chmod +x varargs
530
eacfb5f1 531--- 8395,8401 ----
4633a7c4 532 else
533 echo "false"
534 fi
535! $rm -f varargs$obj_ext
536 EOP
537 chmod +x varargs
538
539***************
eacfb5f1 540*** 8744,8750 ****
4633a7c4 541 echo " "
542 echo "Stripping down executable paths..." >&4
543 for file in $loclist $trylist; do
544! eval $file="\$file"
545 done
546 ;;
547 esac
eacfb5f1 548--- 8759,8765 ----
4633a7c4 549 echo " "
550 echo "Stripping down executable paths..." >&4
551 for file in $loclist $trylist; do
552! if test X$file != Xln -o X$osname != Xos2; then eval $file="\$file"; fi
553 done
554 ;;
555 esac