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