$NetBSD: patch-aa,v 1.15 2006/08/04 21:01:21 wiz Exp $

--- configure.orig	2006-06-11 18:35:47.000000000 +0000
+++ configure	2006-07-08 11:17:13.000000000 +0000
@@ -493,7 +493,7 @@
     _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
     ;;
   --with-extralibdir=*)
-    _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+    _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
     ;;
   --enable-runtime-cpudetection)
     _runtime_cpudetection=yes
@@ -694,11 +694,11 @@
   esac
   echores "$cc_version"
  else
- for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
+ for _cc in "$_cc" gcc cc ; do
   echocheck "$_cc version"
   cc_vendor=gnu
   cc_name=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
-  cc_version=`$_cc -dumpversion 2>&1`
+  cc_version=`( $_cc -dumpversion | sed -e 's/-nb[0-9]//' ) 2>&1`
   if test "$?" -gt 0; then
     cc_version="not found"
   fi
@@ -819,7 +819,7 @@
 elif aix; then
   # use 'lsattr' on AIX
   _cpuinfo="lsattr -E -l proc0 -a type"
-elif x86; then
+elif x86 || x86_64; then
   # all other OSes try to extract CPU information from a small helper
   # program TOOLS/cpuinfo instead
   $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c
@@ -830,7 +830,7 @@
   # gather more CPU information
   pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
   pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2 | _head 1`
-  pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
+  pfamily=`$_cpuinfo | grep -i 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
   pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
   pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
 
@@ -4136,7 +4136,7 @@
 if test "$_aa" = yes ; then
   _def_aa='#define HAVE_AA 1'
   if cygwin ; then
-    _ld_aa=`aalib-config --libs | cut -d " " -f 2,5,6`
+    _ld_aa=`${AALIB_CONFIG} --libs | cut -d " " -f 2,5,6`
   fi
   _vosrc="$_vosrc vo_aa.c"
   _vomodules="aa $_vomodules"
