Blob Blame Raw
diff -Naur pl-6.2.1.old/packages/jpl/configure pl-6.2.1/packages/jpl/configure
--- pl-6.2.1.old/packages/jpl/configure	2012-09-09 17:01:25.000000000 +0200
+++ pl-6.2.1/packages/jpl/configure	2012-09-10 13:02:26.450549569 +0200
@@ -4555,24 +4555,6 @@
 
 CMDEXT=sh
 
-if test "x$JAVALIBS" = "x"; then
-  case "$PLARCH" in
-     *darwin*)
-	  JAVALIBS="-Wl,-framework,JavaVM"
-	  ;;
-     *powerpc-linux*)
-	  JAVALIBS="-ljava -ljvm"
-	  ;;
-     *win32*|*win64*)
-	  JAVALIBS="-ljvm"
-	  CMDEXT=bat
-	  ;;
-     *)
-	  JAVALIBS="-ljava -lverify -ljvm"
-	  ;;
-  esac
-fi
-
 case "$PLARCH" in
   *win32*)
 	JPLLDFLAGS="$JPLLDFLAGS -Wl,--kill-at"
@@ -5534,15 +5516,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
@@ -5551,6 +5543,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"