Blob Blame Raw
diff -Naur pl-6.2.0/packages/jpl/configure pl-6.2.0.new/packages/jpl/configure
--- pl-6.2.0/packages/jpl/configure	2012-08-21 09:57:39.000000000 +0200
+++ pl-6.2.0.new/packages/jpl/configure	2012-08-23 16:22:58.725433338 +0200
@@ -4552,23 +4552,6 @@
 
 
 
-if test "x$JAVALIBS" = "x"; then
-  case "$PLARCH" in
-     *darwin*)
-	  JAVALIBS="-Wl,-framework,JavaVM"
-	  ;;
-     *powerpc-linux*)
-	  JAVALIBS="-ljava -ljvm"
-	  ;;
-     *win32*|*win64*)
-	  JAVALIBS="-ljvm"
-	  ;;
-     *)
-	  JAVALIBS="-ljava -lverify -ljvm"
-	  ;;
-  esac
-fi
-
 case "$PLARCH" in
   *win32*|*win64*)
 	LIBJPL=jpl
@@ -5530,15 +5513,25 @@
 		_JNI_LIBDIRS="lib/amd64"
 		_JNI_LIBSUBDIRS="server"
 		;;
+        alpha*)
+                _JNI_LIBDIRS="lib/alpha"
+                _JNI_LIBSUBDIRS="server"
+                ;;
 	powerpc)
-		case "$host_os" in
-		linux*)
-			_JNI_LIBDIRS="lib/ppc bin"
-			_JNI_LIBSUBDIRS="server classic"
-			;;
-		*)
-			_JNI_LIBDIRS=""
-		esac
+                _JNI_LIBDIRS="lib/ppc"
+                _JNI_LIBSUBDIRS="server"
+		;;
+	powerpc64)
+                _JNI_LIBDIRS="lib/ppc64"
+                _JNI_LIBSUBDIRS="server"
+		;;
+	s390)
+                _JNI_LIBDIRS="lib/s390"
+                _JNI_LIBSUBDIRS="server"
+		;;
+	s390x)
+                _JNI_LIBDIRS="lib/s390x"
+                _JNI_LIBSUBDIRS="server"
 		;;
 	*)
 		# Fallback option should work on all architectures except
@@ -5547,6 +5540,29 @@
 		_JNI_LIBSUBDIRS="server"
 esac
 
+# Set JAVALIBS differently if we're using GCJ
+if test "x$JAVALIBS" = "x"; then
+    if (echo $_JTOPDIR | grep gcj > /dev/null); then
+        JAVALIBS="-ljvm"
+    else
+        case "$PLARCH" in
+            *darwin*)
+            JAVALIBS="-Wl,-framework,JavaVM"
+            ;;
+            *powerpc-linux*)
+            JAVALIBS="-ljava -ljvm"
+            ;;
+            *win32*|*win64*)
+            JAVALIBS="-ljvm"
+            ;;
+            *)
+            JAVALIBS="-ljava -lverify -ljvm"
+            ;;
+        esac
+    fi
+fi
+
+
 for d in $_JNI_LIBDIRS; do
 	for subd in $_JNI_LIBSUBDIRS; do
 		echo "Trying $_JTOPDIR/jre/$d/$subd"