$NetBSD: patch-Configure,v 1.3 2016/06/08 17:39:30 he Exp $ * Use "uname -r" to get OS version for *BSD. * Move $loclibpth to the end of $dlist, instead of the beginning. * Detect systems which have but where using it fails. * Several other changes. --- Configure.orig 2016-04-26 22:11:09.000000000 +0000 +++ Configure @@ -3468,13 +3468,14 @@ EOM osvers="$3" ;; dragonfly) osname=dragonfly - osvers="$3" + osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;; dynixptx*) osname=dynixptx osvers=`echo "$4"|sed 's/^v//'` ;; freebsd) osname=freebsd - osvers="$3" ;; + osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` + ;; genix) osname=genix ;; gnu) osname=gnu osvers="$3" ;; @@ -3497,7 +3498,7 @@ EOM MiNT) osname=mint ;; netbsd*) osname=netbsd - osvers="$3" + osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;; news-os) osvers="$3" case "$3" in @@ -3507,7 +3508,7 @@ EOM ;; nonstop-ux) osname=nonstopux ;; openbsd) osname=openbsd - osvers="$3" + osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;; os2) osname=os2 osvers="$4" @@ -3522,6 +3523,9 @@ EOM qnx) osname=qnx osvers="$4" ;; + sco_sv) osname=sco_sv + osvers=`$uname -r`v`$uname -v` + ;; solaris) osname=solaris case "$3" in 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; @@ -4960,7 +4964,7 @@ esac # If using gcc or clang, we can get better values for libpth, incpth # and usrinc directly from the compiler. # Note that ccname for clang is also gcc. -case "$ccname" in +case "xx$ccname" in gcc) $echo 'extern int foo;' > try.c set X `$cppstdin -v try.c 2>&1 | $awk '/^#include getverlist <cpp_stuff.out 2>&1 -if $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then +# yuck, what a hack. +# MIPSPro compiler/preprocessor behaves differently if invoked on +# stdin vs file. Here we test for stdin, but lateron we use files. +# So force it to work the way we know it does: +if [ x"${OPSYS}" = x"IRIX" ]; then + echo "Hacking MIPSPro on file vs. stdin..." >&4 + echo "We know we can catify or stringify, separately or together!" + cpp_stuff=42 +elif $contains 'Circus' cpp_stuff.out >/dev/null 2>&1; then echo "Oh! Smells like ANSI's been here." >&4 echo "We can catify or stringify, separately or together!" cpp_stuff=42 @@ -23049,6 +23089,21 @@ eval $inhdr set fenv.h i_fenv eval $inhdr +: And really validate that it is OK to include it +: On NetBSD 6.x non-amd64 non-i386 and non-sparc this fails +cat > try.c < +int main() { + printf("runs ok too\n"); + exit(0); +} +EOCP +set try +if ! eval $compile_ok; then + echo " found to be unusable, disabling" >&4 + i_fenv=$undef +fi + : see if this is a fp.h system set fp.h i_fp eval $inhdr @@ -25402,4 +25457,3 @@ $rm -f kit*isdone ark*isdone $rm -rf UU : End of Configure -