1 *** Configure.orig Thu Oct 19 07:48:18 1995
2 --- Configure Wed Nov 01 20:14:32 1995
10 + firstmakefile='makefile'
12 + obj_ext_regexp='\.o'
24 for file in $trylist; do
25 xxx=`./loc $file $file $pth`
32 for file in $trylist; do
33 xxx=`./loc $file $file $pth`
34 ! if test "X$file" != "X$xxx" ; then
45 ! if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
46 gccversion=`./gccvers`
48 '') echo "You are not using GNU cc." ;;
53 ! if $cc -o gccvers gccvers.c $ldflags >/dev/null 2>&1; then
54 gccversion=`./gccvers`
56 '') echo "You are not using GNU cc." ;;
61 *) dflt="$dflt -l$thislib";;
63 + elif xxx=`./loc $thislib.lib X $libpth`; $test -f "$xxx"; then
64 + echo "Found -l$thislib."
67 + *) dflt="$dflt -l$thislib";;
75 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
77 ! elif try=`./loc lib$thislib.a X $libpth`; $test -f "$try"; then
79 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
81 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
83 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
88 elif try=`./loc lib$thislib.$so X $libpth`; $test -f "$try"; then
90 ! elif try=`./loc lib$thislib$lib_ext X $libpth`; $test -f "$try"; then
92 elif try=`./loc lib$thislib X $libpth`; $test -f "$try"; then
94 elif try=`./loc $thislib X $libpth`; $test -f "$try"; then
96 + elif try=`./loc $thislib$lib_ext X $libpth`; $test -f "$try"; then
98 elif try=`./loc Slib$thislib.a X $xlibpth`; $test -f "$try"; then
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
111 echo "Your C library seems to be in $libc. You're normal."
113 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
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."
125 if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
130 $contains '^fprintf$' libc.list >/dev/null 2>&1; then
132 + elif com="$sed -n -e 's/^[-0-9a-f ]*_\(.*\)=.*/\1/p'";\
134 + $contains '^fprintf$' libc.list >/dev/null 2>&1; then
137 nm -p $* 2>/dev/null >libc.tmp
138 $grep fprintf libc.tmp > libc.ptf
144 ! echo "nm didn't seem to work right. Trying ar instead..." >&4
146 ! if ar t $libc > libc.tmp; then
147 for thisname in $libnames; do
148 ! ar t $thisname >>libc.tmp
150 ! $sed -e 's/\.o$//' < libc.tmp > libc.list
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
157 for thisname in $libnames; do
159 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
160 ! ar t $thisname >>libc.tmp
168 ! echo "nm didn't seem to work right. Trying $ar instead..." >&4
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
175 ! $sed -e 's/\.o$//' -e 's/^ \+//' < libc.tmp | grep -v "^IMPORT#" > libc.list
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
182 for thisname in $libnames; do
184 $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
185 ! $ar t $thisname >>libc.tmp
194 ! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
196 echo "Your integers are $intsize bytes long."
202 ! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
204 echo "Your integers are $intsize bytes long."
211 ! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
219 ! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
228 ! if $cc -o try $ccflags try.c >/dev/null 2>&1; then
236 ! if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then
242 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
245 ! if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then
246 echo "Your vsprintf() returns (int)." >&4
250 exit((unsigned long)vsprintf(buf,"%s",args) > 10L);
253 ! if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then
254 echo "Your vsprintf() returns (int)." >&4
261 if $test -z "$cryptlib"; then
262 ! cryptlib=`./loc libcrypt.a "" $libpth`
269 if $test -z "$cryptlib"; then
270 ! cryptlib=`./loc libcrypt$lib_ext "" $libpth`
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
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
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
298 echo "<sys/file.h> defines the O_* constants..." >&4
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
306 echo "<sys/file.h> defines the O_* constants..." >&4
312 elif $test `./findhdr fcntl.h` && \
313 ! $cc "-DI_FCNTL" open3.c -o open3 >/dev/null 2>&1 ; then
315 echo "<fcntl.h> defines the O_* constants..." >&4
320 elif $test `./findhdr fcntl.h` && \
321 ! $cc "-DI_FCNTL" $ldflags open3.c -o open3 >/dev/null 2>&1 ; then
323 echo "<fcntl.h> defines the O_* constants..." >&4
330 ! mallocobj='malloc.o'
338 ! mallocobj="malloc$obj_ext"
344 : we will have to assume that it supports the 4.2 BSD interface
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
355 : we will have to assume that it supports the 4.2 BSD interface
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
370 ! echo "or even in libnet.a, which is peculiar." >&4
378 ! echo "or even in libnet$lib_ext, which is peculiar." >&4
384 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
387 ! if $cc $ccflags try.c -o try >/dev/null 2>&1; then
392 printf("%d\n", (char *)&try.bar - (char *)&try.foo);
395 ! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then
404 ! if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
407 [1-4][1-4][1-4][1-4]|12345678|87654321)
412 ! if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then
415 [1-4][1-4][1-4][1-4]|12345678|87654321)
421 ! if $cc try.c -o try >/dev/null 2>&1 ; then
429 ! if $cc $ldflags try.c -o try >/dev/null 2>&1 ; then
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."
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'."
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."
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'."
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
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
494 ! if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
497 echo "Well, your system knows about the normal fd_set typedef..." >&4
502 ! if $cc $ccflags $ldflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then
505 echo "Well, your system knows about the normal fd_set typedef..." >&4
509 Hmm, your compiler has some difficulty with fd_set. Checking further...
511 ! if $cc $ccflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
514 echo "Well, your system has some sort of fd_set available..." >&4
517 Hmm, your compiler has some difficulty with fd_set. Checking further...
519 ! if $cc $ccflags $ldflags fd_set.c -o fd_set >fd_set.out 2>&1 ; then
522 echo "Well, your system has some sort of fd_set available..." >&4
536 ! $rm -f varargs$obj_ext
543 echo "Stripping down executable paths..." >&4
544 for file in $loclist $trylist; do
545 ! eval $file="\$file"
550 : create config.sh file
552 echo "Creating config.sh..." >&4
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
562 + # Setup libraries for linking miniperl (if not set already)
563 + : ${cldlibs="$libs $cryptlib"}
565 : create config.sh file
567 echo "Creating config.sh..." >&4
573 clocktype='$clocktype'
582 extensions='$extensions'
584 + firstmakefile='$firstmakefile'
591 voidflags='$voidflags'
594 + archobjs='$archobjs'
596 + obj_ext_regexp='$obj_ext_regexp'
601 + path_sep='$path_sep'
604 : add special variables