diff --git a/src/configure b/src/configure index ecfc8390db..ed33c6d77c 100755 --- a/src/configure +++ b/src/configure @@ -630,11 +630,7 @@ case "$host_os" in bsdi*) os=bsdi need_tas=no ;; freebsd1*|freebsd2*) os=freebsd need_tas=no ;; freebsd*) os=freebsd need_tas=no elf=yes ;; - netbsd*) - os=bsd need_tas=no - case "$host_cpu" in - powerpc) elf=yes ;; - esac ;; + netbsd*) os=netbsd need_tas=no ;; openbsd*) os=bsd need_tas=no ;; dgux*) os=dgux need_tas=no ;; aix*) os=aix need_tas=no ;; @@ -692,7 +688,7 @@ fi echo $ac_n "checking setting template to""... $ac_c" 1>&6 -echo "configure:696: checking setting template to" >&5 +echo "configure:692: checking setting template to" >&5 # Check whether --with-template or --without-template was given. if test "${with_template+set}" = set; then withval="$with_template" @@ -707,30 +703,28 @@ host="`echo $host | tr '[A-Z]' '[a-z]'`" if test -f "template/$host" then TEMPLATE="$host" else - # Next try for an exact match to a .similar entry. - # There shouldn't be multiple matches, but take the last if there are. - GUESS=`grep "^$host=" template/.similar | sed 's/^.*=//' | tail -1` + # Scan template/.similar for a rule that tells us which template to use. + # The format of each line of the file is + # hostnamepattern=templatefilename + # where the hostnamepattern is evaluated per the rules of expr(1) --- + # namely, it is a standard regular expression with an implicit ^ at the + # start. If multiple lines match, we will end up using the last match. + GUESS="" + exec 4