$NetBSD: patch-ab,v 1.6 2007/11/01 14:43:47 joerg Exp $

--- configure.orig	2007-04-20 01:25:26.000000000 +0000
+++ configure
@@ -24767,6 +24767,10 @@ _ACEOF
 #define USE_DEV_IO 1
 _ACEOF
  ;;
+		*dragonfly*)	cat >>confdefs.h <<\_ACEOF
+#define USE_DEV_IO 1
+_ACEOF
+ ;;
 		*netbsd*)	cat >>confdefs.h <<\_ACEOF
 #define USE_I386_IOPL 1
 _ACEOF
@@ -24873,7 +24877,7 @@ fi
 DRI=no
 KDRIVE_HW=no
 case $host_os in
-  *freebsd*)
+  *freebsd* | *dragonfly*)
 	case $host_os in
 		kfreebsd*-gnu) ;;
 		*)
@@ -24912,6 +24916,11 @@ _ACEOF
 
 
 cat >>confdefs.h <<\_ACEOF
+#define PCVT_SUPPORT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
 #define WSCONS_SUPPORT 1
 _ACEOF
 
@@ -26417,15 +26426,7 @@ echo $ECHO_N "checking for $prefix/share
 if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "$prefix/share/X11/sgml/defs.ent"; then
   eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
 fi
 ac_res=`eval echo '${'$as_ac_File'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
@@ -28182,7 +28183,7 @@ _ACEOF
 
 fi
 
-VENDOR_RELEASE="((($VERSION_MAJOR) * 10000000) + (($VERSION_MINOR) * 100000) + (($VERSION_PATCH) * 1000) + $VERSION_SNAP)"
+VENDOR_RELEASE=`expr \( $VERSION_MAJOR \* 10000000 \) + \( $VERSION_MINOR \* 100000 \) + \( $VERSION_PATCH \* 1000 \) + $VERSION_SNAP`
 
 if test $VERSION_SNAP = "0"; then
 	if test $VERSION_PATCH = "0"; then
@@ -30903,7 +30904,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 		;;
-	  freebsd* | kfreebsd*-gnu)
+	  freebsd* | kfreebsd*-gnu | dragonfly*)
 	  	XORG_OS="freebsd"
 		XORG_OS_SUBDIR="bsd"
 		XORG_OS_KBD="BSD"
@@ -31146,7 +31147,14 @@ echo "$as_me: error: Your OS is unknown.
 		;;
 	  sparc*)
 		xorg_bus_sparcpci="yes"
-		xorg_bus_sparc="yes"
+		case $host_os in
+		netbsd*)
+			xorg_bus_sparc="no"
+			;;
+		*)
+			xorg_bus_sparc="yes"
+			;;
+		esac
 		;;
 	  x86_64*|amd64*)
 		case $host_os in
