$NetBSD: patch-ca,v 1.21 2014/06/08 23:35:55 joerg Exp $ * Use "uname -r" to get OS version for *BSD. * Move $loclibpth to the end of $dlist, instead of the beginning. * Several other changes. --- Configure.orig 2014-05-26 13:34:18.000000000 +0000 +++ Configure @@ -3372,13 +3372,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" ;; @@ -3401,7 +3402,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 @@ -3412,7 +3413,7 @@ EOM next*) osname=next ;; nonstop-ux) osname=nonstopux ;; openbsd) osname=openbsd - osvers="$3" + osvers=`$uname -r | UU/tr '[A-Z]' '[a-z]'` ;; os2) osname=os2 osvers="$4" @@ -3427,6 +3428,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'` ;; @@ -4865,7 +4869,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