Blob Blame Raw
diff -Naur swipl-7.2.0-old/packages/jpl/configure swipl-7.2.0-new/packages/jpl/configure
--- swipl-7.2.0-old/packages/jpl/configure	2015-05-18 09:50:50.000000000 +0200
+++ swipl-7.2.0-new/packages/jpl/configure	2015-06-05 15:08:26.326780713 +0200
@@ -4596,24 +4596,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"
@@ -5618,19 +5600,29 @@
 		_JNI_LIBDIRS="lib/amd64"
 		_JNI_LIBSUBDIRS="server"
 		;;
+        alpha*)
+                _JNI_LIBDIRS="lib/alpha"
+                _JNI_LIBSUBDIRS="server"
+                ;;
 	arm*)
 		_JNI_LIBDIRS="lib/arm"
 		_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
@@ -5639,6 +5631,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"