diff options
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 157 |
1 files changed, 101 insertions, 56 deletions
@@ -18,9 +18,9 @@ # archive site. Check with Archie if you don't know where that can be.) # -# $Id: Head.U,v 3.0.1.6 1994/10/29 15:54:19 ram Exp $ +# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $ # -# Generated on Fri Mar 10 09:48:55 EST 1995 [metaconfig 3.0 PL51] +# Generated on Thu Apr 6 11:09:32 EDT 1995 [metaconfig 3.0 PL53] cat >/tmp/c1$$ <<EOF ARGGGHHHH!!!!! @@ -58,11 +58,11 @@ esac : Proper PATH setting paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' -paths=$paths:'/usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin' -paths=$paths:'/sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb' -paths=$paths:'/bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin' -paths=$paths:'/etc /usr/lib /usr/ucblib /lib /usr/ccs/lib' -paths=$paths:'/sbin /usr/sbin /usr/libexec' +paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" +paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" +paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /usr/ccs/bin" +paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" +paths="$paths /sbin /usr/sbin /usr/libexec" for p in $paths do @@ -229,7 +229,6 @@ d_alarm='' d_attribut='' d_bcmp='' d_bcopy='' -d_byacc='' d_bzero='' d_casti32='' castflags='' @@ -252,7 +251,6 @@ d_dlopen='' d_dlsymun='' d_dosuid='' d_suidsafe='' -d_drem='' d_dup2='' d_fchmod='' d_fchown='' @@ -263,7 +261,6 @@ d_fds_bits='' d_fgetpos='' d_flexfnam='' d_flock='' -d_fmod='' d_fork='' d_fsetpos='' d_Gconvert='' @@ -390,6 +387,7 @@ cccdlflags='' ccdlflags='' d_shrplib='' dlsrc='' +ld='' lddlflags='' shrpdir='' usedl='' @@ -607,7 +605,6 @@ al="$al tower32_800 tower32_850 tss u370 u3b u3b2 u3b20 u3b200" al="$al u3b20d u3b5 ultrix unix unixpc unos vax venix vms" al="$al xenix z8000" -gccversion='' groupstype='' i_whoami='' : change the next line if compiling for Xenix/286 on Xenix/386 @@ -803,7 +800,7 @@ while test $# -gt 0; do esac shift ;; - -V) echo "$me generated by metaconfig 3.0 PL51." >&2 + -V) echo "$me generated by metaconfig 3.0 PL53." >&2 exit 0;; --) break;; -*) echo "$me: unknown option $1" >&2; shift; error=true;; @@ -1425,9 +1422,7 @@ myuname=`echo $myuname | $sed -e 's/^[^=]*=//' -e 's/\///g' | \ ./tr '[A-Z]' '[a-z]' | tr '\012' ' '` newmyuname="$myuname" dflt=n -if test "$fastread" = yes; then - dflt=y -elif test -f ../config.sh; then +if test -f ../config.sh; then if $contains myuname= ../config.sh >/dev/null 2>&1; then eval "`grep myuname= ../config.sh`" fi @@ -1441,8 +1436,11 @@ fi hint=default cd .. if test -f config.sh; then - echo " " - rp="I see a config.sh file. Shall I use it to set the defaults?" + $cat <<EOM + +I see a config.sh file. Was it built on THIS system with THIS compiler? +EOM + rp="Shall I use config.sh to set the defaults?" . UU/myread case "$ans" in n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;; @@ -3087,7 +3085,7 @@ $echo $n ".$c" $grep fprintf libc.tmp > libc.ptf xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4' xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4' -if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\ +if com="$sed -n -e 's/__IO//' -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\ eval $xscan;\ $contains '^fprintf$' libc.list >/dev/null 2>&1; then eval $xrun @@ -3130,7 +3128,7 @@ elif com="$sed -n -e '/Def. Text/s/.* \([^ ]*\)\$/\1/p'";\ eval $xrun else nm -p $* 2>/dev/null >libc.tmp - com="$sed -n -e 's/^.* [ADTSI] *_[_.]*//p' -e 's/^.* [ADTSI] //p'";\ + com="$sed -n -e 's/^.* [ADTSIW] *_[_.]*//p' -e 's/^.* [ADTSIW] //p'";\ eval "<libc.tmp $com >libc.list" if $contains '^fprintf$' libc.list >/dev/null 2>&1; then nm_opt='-p' @@ -3701,14 +3699,6 @@ set d_bsdpgrp eval $setvar $rm -f set set.c -: Check if we really have byacc -case "$byacc" in -''|'byacc') val="$undef" ;; -*) val="$define" ;; -esac -set d_byacc -eval $setvar - : see if bzero exists set bzero d_bzero eval $inlibc @@ -3832,10 +3822,14 @@ echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4 $cat >try.c <<EOCP #include <sys/types.h> #include <signal.h> -$signal_t blech() { exit(3); } +$signal_t blech() { exit(7); } +$signal_t blech_in_list() { exit(4); } +unsigned long dummy_long(p) unsigned long p; { return p; } +unsigned int dummy_int(p) unsigned int p; { return p; } +unsigned short dummy_short(p) unsigned short p; { return p; } main() { - double f = -123; + double f = -123.; unsigned long along; unsigned int aint; unsigned short ashort; @@ -3867,6 +3861,19 @@ main() along = (unsigned long)f; if (along != 0x80000001) result |= 2; + if (result) + exit(result); + signal(SIGFPE, blech_in_list); + f = 123.; + along = dummy_long((unsigned long)f); + aint = dummy_int((unsigned int)f); + ashort = dummy_short((unsigned short)f); + if (along != (unsigned long)123) + result |= 4; + if (aint != (unsigned int)123) + result |= 4; + if (ashort != (unsigned short)123) + result |= 4; exit(result); } @@ -3876,7 +3883,7 @@ if $cc -o try $ccflags try.c >/dev/null 2>&1; then castflags=$? else echo "(I can't seem to compile the test program--assuming it can't)" - castflags=3 + castflags=7 fi case "$castflags" in 0) val="$define" @@ -4209,6 +4216,7 @@ y*) usedl="$define" usedl="$define" : emulate basename dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'` + $cat << EOM Some systems may require passing special flags to $cc -c to @@ -4217,9 +4225,8 @@ To use no flags, say "none". EOM case "$cccdlflags" in - ''|' ') case "$cc" in - *gcc*) dflt='-fpic' ;; - *) case "$osname" in + '') case "$gccversion" in + '') case "$osname" in hpux) dflt='+z' ;; next) dflt='none' ;; solaris) dflt='-K pic' ;; @@ -4227,8 +4234,9 @@ EOM svr4*|esix*) dflt='-Kpic' ;; *) dflt='none' ;; esac ;; + *) dflt='-fpic' ;; esac ;; - *) dflt="$cccdlflags" ;; + *) dflt="$cccdlflags" ;; esac rp="Any special flags to pass to $cc -c to compile shared library modules?" . ./myread @@ -4237,9 +4245,50 @@ EOM *) cccdlflags="$ans" ;; esac - cat << 'EOM' + cat << EOM + +Some systems use ld to create libraries that can be dynamically loaded, +while other systems (such as those using ELF) use $cc. + +EOM + case "$ld" in + '') $cat >try.c <<'EOM' +/* Test for whether ELF binaries are produced */ +#include <fcntl.h> +#include <stdlib.h> +main() { + char b[4]; + int i = open("a.out",O_RDONLY); + if(i == -1) + exit(1); /* fail */ + if(read(i,b,4)==4 && b[0]==127 && b[1]=='E' && b[2]=='L' && b[3]=='F') + exit(0); /* succeed (yes, it's ELF) */ + else + exit(1); /* fail */ +} +EOM + if $cc $ccflags try.c >/dev/null 2>&1 && ./a.out; then + cat <<EOM +You appear to have ELF support. I'll use $cc to build dynamic libraries. +EOM + dflt="$cc" + else + echo "I'll use ld to build dynamic libraries." + dflt='ld' + fi + rm -f try.c a.out + ;; + *) dflt=ld + ;; + esac + + rp="What comnmand should be used to create dynamic libraries?" + . ./myread + ld="$ans" + + cat << EOM -Some systems may require passing special flags to ld to create a +Some systems may require passing special flags to $ld to create a library that can be dynamically loaded. If your ld flags include -L/other/path options to locate libraries outside your loader's normal search path, you may need to specify those -L options here as well. To @@ -4249,6 +4298,7 @@ EOM case "$lddlflags" in ''|' ') case "$osname" in hpux) dflt='-b' ;; + linux) dflt='-shared' ;; next) dflt='none' ;; solaris) dflt='-G' ;; sunos) dflt='-assert nodefinitions' ;; @@ -4258,7 +4308,7 @@ EOM ;; *) dflt="$lddlflags" ;; esac - rp="Any special flags to pass to ld to create a dynamically loaded library?" + rp="Any special flags to pass to $ld to create a dynamically loaded library?" . ./myread case "$ans" in none) lddlflags='' ;; @@ -4274,7 +4324,8 @@ say "none". EOM case "$ccdlflags" in ''|' ') case "$osname" in - hpux) dflt='none' ;; + hpux) dflt='-Wl,-E' ;; + linux) dflt='-rdynamic' ;; next) dflt='none' ;; sunos) dflt='none' ;; *) dflt='none' ;; @@ -4289,6 +4340,7 @@ EOM esac ;; *) usedl="$undef" + ld='ld' dlsrc='dl_none.xs' lddlflags='' ccdlflags='' @@ -4420,7 +4472,7 @@ main() } EOM if $cc $ccflags $cccdlflags -c dyna.c > /dev/null 2>&1 && - ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 && + $ld $lddlflags -o dyna.$dlext dyna.o > /dev/null 2>&1 && $cc $ccflags $ldflags $cccdlflags $ccdlflags fred.c -o fred $libs > /dev/null 2>&1; then xxx=`./fred` case $xxx in @@ -4552,10 +4604,6 @@ esac set d_dosuid eval $setvar -: see if drem exists -set drem d_drem -eval $inlibc - : see if dup2 exists set dup2 d_dup2 eval $inlibc @@ -4623,10 +4671,6 @@ $rm -rf /tmp/cf$$ 123456789abcde* set flock d_flock eval $inlibc -: see if fmod exists -set fmod d_fmod -eval $inlibc - : see if fork exists set fork d_fork eval $inlibc @@ -5204,10 +5248,10 @@ memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36); for (align = 7; align >= 0; align--) { for (len = 36; len; len--) { b = buf+align; - memcpy(abc, b, len); + memcpy(b, abc, len); for (off = 1; off <= len; off++) { - memcpy(b, b+off, len); memcpy(b+off, b, len); + memcpy(b, b+off, len); if (memcmp(b, abc, len)) exit(1); } @@ -5626,7 +5670,10 @@ if $test -d /usr/etc/yp || $test -d /etc/yp; then . ./myread case "$ans" in y*) hostcat='nidump hosts .';; - *) ;; + *) case "$hostcat" in + nidump*) hostcat='';; + esac + ;; esac fi case "$hostcat" in @@ -6097,7 +6144,7 @@ case "$i_db" in define) : Check the return type needed for hash echo "Checking return type needed for hash for Berkeley DB ..." >&4 - cat >try.c <<'EOCP' + $cat >try.c <<'EOCP' #include <sys/types.h> #include <db.h> u_int32_t @@ -6122,7 +6169,7 @@ EOCP echo "I can't seem to compile the test program." >&4 db_hashtype=int fi - $rm -f try.[co] + $rm -f try.* echo "Your version of Berkeley DB uses $db_hashtype for hash." ;; *) db_hashtype=int @@ -6158,7 +6205,7 @@ EOCP echo "I can't seem to compile the test program." >&4 db_prefixtype='int' fi - $rm -f try.[co] + $rm -f try.* echo "Your version of Berkeley DB uses $db_prefixtype for prefix." ;; *) db_prefixtype='int' @@ -7702,7 +7749,6 @@ d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' d_bsd='$d_bsd' d_bsdpgrp='$d_bsdpgrp' -d_byacc='$d_byacc' d_bzero='$d_bzero' d_casti32='$d_casti32' d_castneg='$d_castneg' @@ -7722,7 +7768,6 @@ d_dlerror='$d_dlerror' d_dlopen='$d_dlopen' d_dlsymun='$d_dlsymun' d_dosuid='$d_dosuid' -d_drem='$d_drem' d_dup2='$d_dup2' d_eunice='$d_eunice' d_fchmod='$d_fchmod' @@ -7734,7 +7779,6 @@ d_fds_bits='$d_fds_bits' d_fgetpos='$d_fgetpos' d_flexfnam='$d_flexfnam' d_flock='$d_flock' -d_fmod='$d_fmod' d_fork='$d_fork' d_fpathconf='$d_fpathconf' d_fsetpos='$d_fsetpos' @@ -7945,6 +7989,7 @@ intsize='$intsize' known_extensions='$known_extensions' ksh='$ksh' large='$large' +ld='$ld' lddlflags='$lddlflags' ldflags='$ldflags' less='$less' |