--- configure.in.orig	Fri Aug 10 12:23:03 2001
+++ configure.in	Sat Sep 22 02:15:20 2001
@@ -1308,10 +1308,7 @@
 	AC_CHECK_FILE("$JAVAPATH/bin/javac",JAVAC="$JAVAPATH/bin/javac")
 	AC_CHECK_FILE("$JAVAPATH/include/jni.h",JAVAINCLUDES="-I$JAVAPATH/include")
 	if ( test -n "$JAVAINCLUDES"); then
-		for i in `ls -l $JAVAPATH/include | grep drw | awk '{print $9}'`
-		do
-			JAVAINCLUDES="$JAVAINCLUDES -I$JAVAPATH/include/$i"
-		done
+		JAVAINCLUDES="$JAVAINCLUDES -I`dirname $JAVAPATH/include/*/jni_md.h`"
 	fi
 fi
 
