$NetBSD: patch-aa,v 1.17 2006/10/31 22:33:28 wiz Exp $

--- configure.orig	2006-10-22 22:32:31.000000000 +0000
+++ configure
@@ -515,7 +515,7 @@ for ac_option do
     _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'`
     ;;
   --extra-libs=*)
     _extra_libs=`echo $ac_option | cut -d '=' -f 2`
@@ -719,11 +719,11 @@ if test "$_gcc_check" = yes ; then
   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
@@ -855,7 +855,7 @@ if x86 || x86_64 ; then
   # 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`
 
@@ -3034,7 +3034,6 @@ fi
 echores "$_pthreads"
 
 echocheck "rpath"
-netbsd &&_rpath=yes
 if test "$_rpath" = yes ; then
   for I in `echo $_ld_extra | sed 's/-L//g'` ; do
     tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
@@ -4192,7 +4191,7 @@ fi
 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"
