--- openjdk/jdk/make/common/shared/Sanity.gmk~	2008-07-10 21:54:40.000000000 +0200
+++ openjdk/jdk/make/common/shared/Sanity.gmk	2008-07-17 11:15:52.000000000 +0200
@@ -780,37 +780,7 @@
 ######################################################
 # Check for existence of Motif in the bootstrap area
 ######################################################
-MOTIF_CHECK_FILE=$(MOTIF_INCLUDE)/Xm/AtomMgr.h
 sane-motif:
-ifneq ($(PLATFORM), windows)
-  ifeq ($(MOTIF_REQUIRED), true)
-    ifeq ($(PLATFORM), solaris)
-	@if [ ! -r $(MOTIF_LIB)/libXm.so ]; then \
-	  $(ECHO) "ERROR: You do not have access to a valid Motif 2.1 library. \n" \
-	    "      Please check your access to \n" \
-	    "          $(MOTIF_LIB)/libXm.so \n" \
-	    "      and/or check your value of ALT_MOTIF_DIR. \n" \
-	    "" >> $(ERROR_FILE) ; \
-	fi
-    endif  
-    ifeq ($(PLATFORM), linux)
-	@if [ ! -r $(MOTIF_LIB)/libXm.a ]; then \
-	  $(ECHO) "ERROR: You do not have access to a valid Motif 2.1 library. \n" \
-	    "      Please check your access to \n" \
-	    "          $(MOTIF_LIB)/libXm.a \n" \
-	    "      and/or check your value of ALT_MOTIF_DIR. \n" \
-	    "" >> $(ERROR_FILE) ; \
-	fi
-    endif  
-  endif  
-	@if [ ! -r $(MOTIF_CHECK_FILE) ]; then \
-	  $(ECHO) "ERROR: You do not have access to valid Motif 2.1 header files. \n" \
-	    "      Please check your access to (for example) \n" \
-	    "          $(MOTIF_CHECK_FILE) \n" \
-	    "      and/or check your value of ALT_MOTIF_DIR. \n" \
-	    "" >> $(ERROR_FILE) ; \
-	fi
-endif
 
 ######################################################
 # Check for availability of FreeType (OpenJDK specific)
--- openjdk/jdk/src/solaris/native/sun/awt/awt_util.c~	2008-07-10 21:58:43.000000000 +0200
+++ openjdk/jdk/src/solaris/native/sun/awt/awt_util.c	2008-07-17 12:28:56.000000000 +0200
@@ -49,9 +49,11 @@
 #include "awt_xembed.h"
 
 
+#ifndef XAWT
 #if MOTIF_VERSION!=1
     #include <Xm/GrabShell.h>
 #endif
+#endif
 
 #include "java_awt_event_MouseWheelEvent.h"
 
