From: Andy Dougherty Date: Wed, 25 Feb 1998 17:14:39 +0000 (-0500) Subject: Config_60-03-04.diff patch for 5.004_60 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4e2a5f63925503b57176e32249cf6e160bcf9be9;p=p5sagit%2Fp5-mst-13.2.git Config_60-03-04.diff patch for 5.004_60 p4raw-id: //depot/perl@592 --- diff --git a/Configure b/Configure index e0dff4f..a34a5db 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Tue Feb 24 12:36:41 EST 1998 [metaconfig 3.0 PL70] +# Generated on Wed Feb 25 16:44:06 EST 1998 [metaconfig 3.0 PL70] cat >/tmp/c1$$ </dev/null 2>&1; then fi if $needman; then cat <&4 @@ -2056,23 +2057,44 @@ EOM esac ;; esac + if $test -f Policy.sh ; then + case "$dflt" in + *Policy*) ;; + none) dflt="Policy" ;; + *) dflt="Policy $dflt" ;; + esac + fi ;; *) dflt=`echo $hintfile | $sed 's/\.sh$//'` ;; esac + if $test -f Policy.sh ; then + $cat <> UU/config.sh + elif $test -f $src/hints/$file.sh; then . $src/hints/$file.sh $cat $src/hints/$file.sh >> UU/config.sh elif $test X$tans = X -o X$tans = Xnone ; then @@ -3027,210 +3049,597 @@ else echo "Could not find manual pages in source form." >&4 fi -: see what memory models we can support -case "$models" in -'') - $cat >pdp11.c <<'EOP' -main() { -#ifdef pdp11 - exit(0); -#else - exit(1); -#endif -} -EOP - ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1 - if $test -f pdp11 && ./pdp11 2>/dev/null; then - dflt='unsplit split' - else - tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` - case "$tans" in - X) dflt='none';; - *) if $test -d /lib/small || $test -d /usr/lib/small; then - dflt='small' - else - dflt='' - fi - if $test -d /lib/medium || $test -d /usr/lib/medium; then - dflt="$dflt medium" - fi - if $test -d /lib/large || $test -d /usr/lib/large; then - dflt="$dflt large" - fi - if $test -d /lib/huge || $test -d /usr/lib/huge; then - dflt="$dflt huge" - fi - esac - fi;; -*) dflt="$models";; -esac +: determine where manual pages go +set man1dir man1dir none +eval $prefixit $cat </dev/null 2>&1 || \ - $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then - dflt='-i' - else - dflt='none' - fi;; - *) dflt="$split";; - esac - rp="What flag indicates separate I and D space?" - . ./myread - tans="$ans" - case "$tans" in - none) tans='';; - esac - split="$tans" - unsplit='';; -*large*|*small*|*medium*|*huge*) - case "$models" in - *large*) - case "$large" in - '') dflt='-Ml';; - *) dflt="$large";; - esac - rp="What flag indicates large model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - large="$tans";; - *) large='';; - esac - case "$models" in - *huge*) case "$huge" in - '') dflt='-Mh';; - *) dflt="$huge";; - esac - rp="What flag indicates huge model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - huge="$tans";; - *) huge="$large";; - esac - case "$models" in - *medium*) case "$medium" in - '') dflt='-Mm';; - *) dflt="$medium";; - esac - rp="What flag indicates medium model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - medium="$tans";; - *) medium="$large";; - esac - case "$models" in - *small*) case "$small" in - '') dflt='none';; - *) dflt="$small";; - esac - rp="What flag indicates small model?" - . ./myread - tans="$ans" - case "$tans" in - none) tans=''; - esac - small="$tans";; - *) small='';; +'') + lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1" + lookpath="$lookpath $prefixexp/man/p_man/man1" + lookpath="$lookpath $prefixexp/man/u_man/man1" + lookpath="$lookpath $prefixexp/man/man.1" + case "$sysman" in + */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;; + *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;; esac + set dflt + eval $prefixup ;; -*) - echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4 +*) dflt="$man1dir" ;; esac -$rm -f pdp11.* pdp11 - -: see if we need a special compiler echo " " -if ./usg; then - case "$cc" in - '') case "$Mcc" in - /*) dflt='Mcc';; - *) case "$large" in - -M*) dflt='cc';; - *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then - if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then - dflt='cc' - else - dflt='cc -M' - fi - else - dflt='cc' - fi;; - esac;; - esac;; - *) dflt="$cc";; - esac - $cat <<'EOM' -On some systems the default C compiler will not resolve multiple global -references that happen to have the same name. On some such systems the "Mcc" -command may be used to force these to be resolved. On other systems a "cc -M" -command is required. (Note that the -M flag on other systems indicates a -memory model to use!) If you have the Gnu C compiler, you might wish to use -that instead. +fn=dn+~ +rp="Where do the main $spackage manual pages (source) go?" +. ./getfile +if $test "X$man1direxp" != "X$ansexp"; then + installman1dir='' +fi +man1dir="$ans" +man1direxp="$ansexp" +case "$man1dir" in +'') man1dir=' ' + installman1dir='';; +esac +if $afs; then + $cat <&4 -$cat >gccvers.c < -int main() { -#ifdef __GNUC__ -#ifdef __VERSION__ - printf("%s\n", __VERSION__); -#else - printf("%s\n", "1"); -#endif -#endif - exit(0); -} -EOM -if $cc -o gccvers gccvers.c >/dev/null 2>&1; then - gccversion=`./gccvers` - case "$gccversion" in + +: What suffix to use on installed man pages + +case "$man1dir" in +' ') + man1ext='0' + ;; +*) + rp="What suffix should be used for the main $spackage man pages?" + case "$man1ext" in + '') case "$man1dir" in + *1) dflt=1 ;; + *1p) dflt=1p ;; + *1pm) dflt=1pm ;; + *l) dflt=l;; + *n) dflt=n;; + *o) dflt=o;; + *p) dflt=p;; + *C) dflt=C;; + *L) dflt=L;; + *L1) dflt=L1;; + *) dflt=1;; + esac + ;; + *) dflt="$man1ext";; + esac + . ./myread + man1ext="$ans" + ;; +esac + +: see if we can have long filenames +echo " " +rmlist="$rmlist /tmp/cf$$" +$test -d /tmp/cf$$ || mkdir /tmp/cf$$ +first=123456789abcdef +second=/tmp/cf$$/$first +$rm -f $first $second +if (echo hi >$first) 2>/dev/null; then + if $test -f 123456789abcde; then + echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 + val="$undef" + else + if (echo hi >$second) 2>/dev/null; then + if $test -f /tmp/cf$$/123456789abcde; then + $cat <<'EOM' +That's peculiar... You can have filenames longer than 14 characters, but only +on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems +I shall consider your system cannot support long filenames at all. +EOM + val="$undef" + else + echo 'You can have filenames longer than 14 characters.' >&4 + val="$define" + fi + else + $cat <<'EOM' +How confusing! Some of your filesystems are sane enough to allow filenames +longer than 14 characters but some others like /tmp can't even think about them. +So, for now on, I shall assume your kernel does not allow them at all. +EOM + val="$undef" + fi + fi +else + $cat <<'EOM' +You can't have filenames longer than 14 chars. You can't even think about them! +EOM + val="$undef" +fi +set d_flexfnam +eval $setvar +$rm -rf /tmp/cf$$ 123456789abcde* + +: determine where library module manual pages go +set man3dir man3dir none +eval $prefixit +$cat <pdp11.c <<'EOP' +main() { +#ifdef pdp11 + exit(0); +#else + exit(1); +#endif +} +EOP + ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1 + if $test -f pdp11 && ./pdp11 2>/dev/null; then + dflt='unsplit split' + else + tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge` + case "$tans" in + X) dflt='none';; + *) if $test -d /lib/small || $test -d /usr/lib/small; then + dflt='small' + else + dflt='' + fi + if $test -d /lib/medium || $test -d /usr/lib/medium; then + dflt="$dflt medium" + fi + if $test -d /lib/large || $test -d /usr/lib/large; then + dflt="$dflt large" + fi + if $test -d /lib/huge || $test -d /usr/lib/huge; then + dflt="$dflt huge" + fi + esac + fi;; +*) dflt="$models";; +esac +$cat </dev/null 2>&1 || \ + $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then + dflt='-i' + else + dflt='none' + fi;; + *) dflt="$split";; + esac + rp="What flag indicates separate I and D space?" + . ./myread + tans="$ans" + case "$tans" in + none) tans='';; + esac + split="$tans" + unsplit='';; +*large*|*small*|*medium*|*huge*) + case "$models" in + *large*) + case "$large" in + '') dflt='-Ml';; + *) dflt="$large";; + esac + rp="What flag indicates large model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + large="$tans";; + *) large='';; + esac + case "$models" in + *huge*) case "$huge" in + '') dflt='-Mh';; + *) dflt="$huge";; + esac + rp="What flag indicates huge model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + huge="$tans";; + *) huge="$large";; + esac + case "$models" in + *medium*) case "$medium" in + '') dflt='-Mm';; + *) dflt="$medium";; + esac + rp="What flag indicates medium model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + medium="$tans";; + *) medium="$large";; + esac + case "$models" in + *small*) case "$small" in + '') dflt='none';; + *) dflt="$small";; + esac + rp="What flag indicates small model?" + . ./myread + tans="$ans" + case "$tans" in + none) tans=''; + esac + small="$tans";; + *) small='';; + esac + ;; +*) + echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4 + ;; +esac +$rm -f pdp11.* pdp11 + +: see if we need a special compiler +echo " " +if ./usg; then + case "$cc" in + '') case "$Mcc" in + /*) dflt='Mcc';; + *) case "$large" in + -M*) dflt='cc';; + *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then + if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then + dflt='cc' + else + dflt='cc -M' + fi + else + dflt='cc' + fi;; + esac;; + esac;; + *) dflt="$cc";; + esac + $cat <<'EOM' +On some systems the default C compiler will not resolve multiple global +references that happen to have the same name. On some such systems the "Mcc" +command may be used to force these to be resolved. On other systems a "cc -M" +command is required. (Note that the -M flag on other systems indicates a +memory model to use!) If you have the Gnu C compiler, you might wish to use +that instead. + +EOM + rp="What command will force resolution on this system?" + . ./myread + cc="$ans" +else + case "$cc" in + '') dflt=cc;; + *) dflt="$cc";; + esac + rp="Use which C compiler?" + . ./myread + cc="$ans" +fi +echo " " +echo "Checking for GNU cc in disguise and/or its version number..." >&4 +$cat >gccvers.c < +int main() { +#ifdef __GNUC__ +#ifdef __VERSION__ + printf("%s\n", __VERSION__); +#else + printf("%s\n", "1"); +#endif +#endif + 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." ;; *) echo "You are using GNU cc $gccversion." ;; esac @@ -4805,310 +5214,66 @@ the default anyway, so it's harmless. EOM ;; *) - $cat >&4 <&4 - -Adding $xxx to the flags -passed to $ld so that the perl executable will find the -installed shared $libperl. - -EOM - ;; - esac - ;; - esac -fi -# Respect a hint or command-line value. -case "$shrpenv" in -'') shrpenv="$tmp_shrpenv" ;; -esac - -: determine where manual pages go -set man1dir man1dir none -eval $prefixit -$cat <$first) 2>/dev/null; then - if $test -f 123456789abcde; then - echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 - val="$undef" - else - if (echo hi >$second) 2>/dev/null; then - if $test -f /tmp/cf$$/123456789abcde; then - $cat <<'EOM' -That's peculiar... You can have filenames longer than 14 characters, but only -on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems -I shall consider your system cannot support long filenames at all. -EOM - val="$undef" - else - echo 'You can have filenames longer than 14 characters.' >&4 - val="$define" - fi - else - $cat <<'EOM' -How confusing! Some of your filesystems are sane enough to allow filenames -longer than 14 characters but some others like /tmp can't even think about them. -So, for now on, I shall assume your kernel does not allow them at all. -EOM - val="$undef" - fi - fi -else - $cat <<'EOM' -You can't have filenames longer than 14 chars. You can't even think about them! -EOM - val="$undef" -fi -set d_flexfnam -eval $setvar -$rm -rf /tmp/cf$$ 123456789abcde* - -: determine where library module manual pages go -set man3dir man3dir none -eval $prefixit -$cat <&4 <&4 -: What suffix to use on installed man pages +Adding $xxx to the flags +passed to $ld so that the perl executable will find the +installed shared $libperl. -case "$man3dir" in -' ') - man3ext='0' - ;; -*) - rp="What suffix should be used for the $package library man pages?" - case "$man3ext" in - '') case "$man3dir" in - *3) dflt=3 ;; - *3p) dflt=3p ;; - *3pm) dflt=3pm ;; - *l) dflt=l;; - *n) dflt=n;; - *o) dflt=o;; - *p) dflt=p;; - *C) dflt=C;; - *L) dflt=L;; - *L3) dflt=L3;; - *) dflt=3;; +EOM + ;; esac ;; - *) dflt="$man3ext";; esac - . ./myread - man3ext="$ans" - ;; +fi +# Respect a hint or command-line value. +case "$shrpenv" in +'') shrpenv="$tmp_shrpenv" ;; esac : see if we have to deal with yellow pages, now NIS. @@ -5473,149 +5638,6 @@ case "$startperl" in *) echo "I'll use $perlpath in \"eval 'exec'\"" ;; esac -: determine where public executable scripts go -set scriptdir scriptdir -eval $prefixit -case "$scriptdir" in -'') - dflt="$bin" - : guess some guesses - $test -d /usr/share/scripts && dflt=/usr/share/scripts - $test -d /usr/share/bin && dflt=/usr/share/bin - $test -d /usr/local/script && dflt=/usr/local/script - $test -d $prefixexp/script && dflt=$prefixexp/script - set dflt - eval $prefixup - ;; -*) dflt="$scriptdir" - ;; -esac -$cat </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." + 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'." + echo "a table of contents needs to be added with '$ar ts'." orderlib=false ranlib="$ar ts" else @@ -11000,6 +11022,17 @@ else echo "Done." fi +if $test -f Policy.sh; then + $cat <&4 echo "Go find a public domain implementation or fix your PATH setting!" >&4 @@ -9,18 +9,7 @@ ;; esac done -@@ -1498,7 +1498,9 @@ - say=offhand - for file in $trylist; do - xxx=`./loc $file $file $pth` -- eval $file=$xxx -+ if test "X$file" != "X$xxx" ; then -+ eval $file=$xxx -+ fi - eval _$file=$xxx - case "$xxx" in - /*) -@@ -3198,7 +3200,7 @@ +@@ -3637,7 +3637,7 @@ exit(0); } EOM @@ -29,20 +18,7 @@ gccversion=`./gccvers` case "$gccversion" in '') echo "You are not using GNU cc." ;; -@@ -3401,6 +3403,12 @@ - *"-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 -@@ -3950,7 +3958,7 @@ +@@ -4434,7 +4434,7 @@ esac ;; esac @@ -51,219 +27,7 @@ case "$libs" in '') ;; *) for thislib in $libs; do -@@ -3972,6 +3980,8 @@ - : - 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$lib_ext X $xlibpth`; $test -f "$try"; then - : - else -@@ -4156,6 +4166,10 @@ - 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 -@@ -4166,23 +4180,33 @@ - eval $xrun - else - echo " " -- echo "nm didn't seem to work right. Trying ar instead..." >&4 -+ 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 -+ if test "X$osname" = "Xos2"; then ar_opt=tv ; else ar_opt=t ;fi -+ if $ar $ar_opt $libc > libc.tmp; then -+ echo \; > libc.tmp -+ for thisname in $libnames $libc; do -+ $ar $ar_opt $thisname >>libc.tmp -+ if test "X$osname" = "Xos2"; then -+ # Revision 50 of EMX has bug in $ar: -+ emximp -o tmp.imp $thisname \ -+ 2>/dev/null && \ -+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \ -+ < tmp.imp >>libc.tmp -+ $rm tmp.imp -+ fi - done -- $sed -e 's/\.o$//' < libc.tmp > libc.list -+ $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 "$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 -+ $ar t $thisname >>libc.tmp - done - echo "Ok." >&4 - else -@@ -5611,15 +5635,15 @@ - EOCP - : check sys/file.h first, no particular reason here - if $test `./findhdr sys/file.h` && \ -- $cc $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then -+ $cc $ldflags $cppflags -DI_SYS_FILE access.c -o access >/dev/null 2>&1 ; then - h_sysfile=true; - echo " defines the *_OK access constants." >&4 - elif $test `./findhdr fcntl.h` && \ -- $cc $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then -+ $cc $ldflags $cppflags -DI_FCNTL access.c -o access >/dev/null 2>&1 ; then - h_fcntl=true; - echo " defines the *_OK access constants." >&4 - elif $test `./findhdr unistd.h` && \ -- $cc $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then -+ $cc $ldflags $cppflags -DI_UNISTD access.c -o access >/dev/null 2>&1 ; then - echo " defines the *_OK access constants." >&4 - else - echo "I can't find the four *_OK access constants--I'll use mine." >&4 -@@ -5913,7 +5937,7 @@ - exit(result); - } - EOCP --if $cc -o try $ccflags try.c >/dev/null 2>&1; then -+if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then - ./try - yyy=$? - else -@@ -5994,7 +6018,7 @@ - - } - EOCP --if $cc -o try $ccflags try.c >/dev/null 2>&1; then -+if $cc -o try $ccflags try.c $ldflags >/dev/null 2>&1; then - ./try - castflags=$? - else -@@ -6033,7 +6057,7 @@ - exit((unsigned long)vsprintf(buf,"%s",args) > 10L); - } - EOF -- if $cc $ccflags vprintf.c -o vprintf >/dev/null 2>&1 && ./vprintf; then -+ if $cc $ccflags vprintf.c $ldflags -o vprintf >/dev/null 2>&1 && ./vprintf; then - echo "Your vsprintf() returns (int)." >&4 - val2="$undef" - else -@@ -6381,7 +6405,7 @@ - EOCP - : check sys/file.h first to get FREAD on Sun - if $test `./findhdr sys/file.h` && \ -- $cc $ccflags "-DI_SYS_FILE" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then -+ $cc $ldflags $ccflags "-DI_SYS_FILE" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then - h_sysfile=true; - echo " defines the O_* constants..." >&4 - if ./open3; then -@@ -6392,7 +6416,7 @@ - val="$undef" - fi - elif $test `./findhdr fcntl.h` && \ -- $cc $ccflags "-DI_FCNTL" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then -+ $cc $ldflags $ccflags "-DI_FCNTL" -o open3 $ldflags open3.c $libs >/dev/null 2>&1 ; then - h_fcntl=true; - echo " defines the O_* constants..." >&4 - if ./open3; then -@@ -6898,7 +6922,7 @@ - y*|true) - usemymalloc='y' - mallocsrc='malloc.c' -- mallocobj='malloc.o' -+ mallocobj="malloc$obj_ext" - d_mymalloc="$define" - case "$libs" in - *-lmalloc*) -@@ -8156,7 +8180,7 @@ - printf("%d\n", (char *)&try.bar - (char *)&try.foo); - } - EOCP -- if $cc $ccflags try.c -o try >/dev/null 2>&1; then -+ if $cc $ccflags $ldflags try.c -o try >/dev/null 2>&1; then - dflt=`./try` - else - dflt='8' -@@ -8204,7 +8228,7 @@ - } - EOCP - xxx_prompt=y -- if $cc $ccflags try.c -o try >/dev/null 2>&1 && ./try > /dev/null; then -+ 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) -@@ -8711,18 +8735,18 @@ - $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.o bar1.o >/dev/null 2>&1 -+$ar rc bar$lib_ext bar2.o bar1.o >/dev/null 2>&1 - if $cc $ccflags $ldflags -o foobar foo.o bar$lib_ext $libs > /dev/null 2>&1 && - ./foobar >/dev/null 2>&1; then -- echo "ar appears to generate random libraries itself." -+ echo "$ar appears to generate random libraries itself." - orderlib=false - ranlib=":" --elif ar ts bar$lib_ext >/dev/null 2>&1 && -+elif $ar ts bar$lib_ext >/dev/null 2>&1 && - $cc $ccflags $ldflags -o foobar foo.o 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'." -+ echo "a table of contents needs to be added with '$ar ts'." - orderlib=false -- ranlib="ar ts" -+ ranlib="$ar ts" - else - case "$ranlib" in - :) ranlib='';; -@@ -8794,7 +8818,7 @@ - '') $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 -+ try.c -o try $ldflags >/dev/null 2>&1 ; then - set X $i_time $i_systime $i_systimek $sysselect $s_timeval - shift - flags="$*" -@@ -8863,7 +8887,7 @@ - #endif - } - EOCP --if $cc $ccflags -DTRYBITS fd_set.c -o fd_set >fd_set.out 2>&1 ; then -+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 -@@ -8880,7 +8904,7 @@ - $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 -+ 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 -@@ -9627,7 +9651,7 @@ - else - echo "false" - fi --$rm -f varargs.o -+$rm -f varargs$obj_ext - EOP - chmod +x varargs - -@@ -9954,7 +9978,7 @@ +@@ -10392,7 +10392,7 @@ echo " " echo "Stripping down executable paths..." >&4 for file in $loclist $trylist; do