commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1196262 - /commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
Date Tue, 01 Nov 2011 20:35:39 GMT
Author: mturk
Date: Tue Nov  1 20:35:39 2011
New Revision: 1196262

URL: http://svn.apache.org/viewvc?rev=1196262&view=rev
Log:
DAEMON-220: Drop JDK guess

Modified:
    commons/proper/daemon/trunk/src/native/unix/support/apjava.m4

Modified: commons/proper/daemon/trunk/src/native/unix/support/apjava.m4
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/native/unix/support/apjava.m4?rev=1196262&r1=1196261&r2=1196262&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 (original)
+++ commons/proper/daemon/trunk/src/native/unix/support/apjava.m4 Tue Nov  1 20:35:39 2011
@@ -44,53 +44,13 @@ AC_DEFUN([AP_FIND_JAVA],[
     then
       java_bin="`dirname $java_prog`"
       java_top="`dirname $java_bin`"
-      if test -d "$java_top/include"
+      if test -f "$java_top/include/jni.h"
       then
         JAVA_HOME="$java_top"
         AC_MSG_RESULT([${java_top}])
       fi
     fi
   fi
-  if test "x$JAVA_HOME" = x
-  then
-    # Oh well, nobody set JAVA_HOME, have to guess
-    for java_prefix in /usr/local /usr/local/lib /usr /usr/lib /usr/lib/jvm /opt /usr/java
/System/Library/Frameworks/JavaVM.framework/Versions/
-    do
-      for subversion in 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2
-      do
-        for variant in IBMJava2- java java- jdk jdk- CurrentJDK ""
-        do
-          for guess in $java_prefix/$variant$subversion*
-          do
-            if test -d "${guess}/bin" & test -d "${guess}/include"
-            then
-              JAVA_HOME="${guess}"
-              AC_MSG_RESULT([${guess}])
-              break
-            fi
-            if test -d "${guess}/Commands" & test -d "${guess}/Headers"
-            then
-              JAVA_HOME="$guess"
-              AC_MSG_RESULT([${guess}])
-              break
-            fi
-          done
-          if test -n "$JAVA_HOME"
-          then
-            break;
-          fi
-        done
-        if test -n "$JAVA_HOME"
-        then
-          break;
-        fi
-      done
-      if test -n "$JAVA_HOME"
-      then
-        break;
-      fi
-    done
-  fi  
   if test x"$JAVA_HOME" = x
   then
     AC_MSG_ERROR([Java Home not defined. Rerun with --with-java=[...] parameter])
@@ -122,6 +82,7 @@ AC_DEFUN([AP_FIND_JAVA_OS],[
             JAVA_OS=`dirname $f`
             JAVA_OS=`basename $JAVA_OS`
             echo " $JAVA_OS"
+            break
         fi
       done
       if test "x$JAVA_OS" = "xNONE"; then



Mime
View raw message