diff -ura xorg-server-1.4.orig/configure xorg-server-1.4/configure
--- xorg-server-1.4.orig/configure	2007-09-06 05:59:48.000000000 +0000
+++ xorg-server-1.4/configure	2008-09-05 20:42:42.488164222 +0000
@@ -32603,7 +32603,7 @@
 			;;
 		esac
 		;;
-	  solaris*)
+	  solaris* | kopensolaris*-gnu*)
 	  	XORG_OS="solaris"
 		XORG_OS_SUBDIR="solaris"
 		# This really should be tests for specific features, but the #ifdef's
@@ -32611,7 +32611,7 @@
 		# fixed yet
 		{ echo "$as_me:$LINENO: checking Solaris version" >&5
 echo $ECHO_N "checking Solaris version... $ECHO_C" >&6; }
-	        OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
+	        OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e 's/-gnu//' -e s'/\..*$//'`
 		if test "${OS_MINOR}" -ge 7 ; then
 	        	{ echo "$as_me:$LINENO: result: Solaris ${OS_MINOR}" >&5
 echo "${ECHO_T}Solaris ${OS_MINOR}" >&6; }
diff -ura xorg-server-1.4.orig/configure.ac xorg-server-1.4/configure.ac
--- xorg-server-1.4.orig/configure.ac	2007-09-06 05:59:00.000000000 +0000
+++ xorg-server-1.4/configure.ac	2008-09-05 20:43:35.409054778 +0000
@@ -1395,14 +1395,14 @@
 			;;
 		esac
 		;;
-	  solaris*)
+	  solaris* | kopensolaris*-gnu*)
 	  	XORG_OS="solaris"
 		XORG_OS_SUBDIR="solaris"
 		# This really should be tests for specific features, but the #ifdef's
 		# were done as a simple version check in XFree86 4.x and haven't been 
 		# fixed yet
 		AC_MSG_CHECKING([Solaris version])
-	        OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e s'/\..*$//'`
+	        OS_MINOR=`echo ${host_os}|sed -e 's/^.*solaris2\.//' -e 's/-gnu//' -e s'/\..*$//'`
 		if test "${OS_MINOR}" -ge 7 ; then
 	        	AC_MSG_RESULT(Solaris ${OS_MINOR})
 		else
diff -ura xorg-server-1.4.orig/hw/xfree86/os-support/xf86_OSlib.h xorg-server-1.4/hw/xfree86/os-support/xf86_OSlib.h
--- xorg-server-1.4.orig/hw/xfree86/os-support/xf86_OSlib.h	2007-08-23 19:04:53.000000000 +0000
+++ xorg-server-1.4/hw/xfree86/os-support/xf86_OSlib.h	2008-09-05 21:00:23.157721942 +0000
@@ -98,6 +98,10 @@
 /**************************************************************************/
 /* SYSV386 (SVR3, SVR4), including Solaris                                */
 /**************************************************************************/
+#if defined(__OpenSolaris_kernel__)
+# define SVR4 1
+# define sun
+#endif
 #if (defined(SYSV) || defined(SVR4)) && \
     !defined(DGUX) && !defined(sgi) && \
     (defined(sun) || defined(i386))

