$NetBSD: patch-ag,v 1.8 2007/01/06 21:21:35 xtraeme Exp $

--- configure.orig	2006-12-07 16:59:57.000000000 +0100
+++ configure	2006-12-07 17:02:12.000000000 +0100
@@ -27,7 +27,7 @@
 make="make"
 install="install"
 strip="strip"
-cpu=`uname -m`
+cpu=`uname -p`
 target_list=""
 case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
@@ -42,7 +42,7 @@
   alpha)
     cpu="alpha"
   ;;
-  "Power Macintosh"|ppc|ppc64)
+  "Power Macintosh"|ppc|ppc64|powerpc)
     cpu="powerpc"
   ;;
   mips)
@@ -115,6 +115,12 @@
     kqemu="yes"
 fi
 ;;
+DragonFly)
+bsd="yes"
+oss="yes"
+dragonfly="yes"
+;;
+
 NetBSD)
 bsd="yes"
 oss="yes"
@@ -509,7 +515,7 @@
 if test -z "$prefix" ; then
     prefix="/usr/local"
 fi
-mandir="$prefix/share/man"
+mandir="$prefix/$PKGMANDIR"
 datadir="$prefix/share/qemu"
 docdir="$prefix/share/doc/qemu"
 bindir="$prefix/bin"
@@ -646,6 +652,11 @@
   echo "#define CONFIG_WIN32 1" >> $config_h
 elif test -f "/usr/include/byteswap.h" ; then
   echo "#define HAVE_BYTESWAP_H 1" >> $config_h
+elif test -f "/usr/include/machine/bswap.h" ; then
+  echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
+fi
+if test "$dragonfly" = "yes" ; then
+  echo "CONFIG_DRAGONFLY=yes" >> $config_mak
 fi
 if test "$darwin" = "yes" ; then
   echo "CONFIG_DARWIN=yes" >> $config_mak
