You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by jw...@apache.org on 2010/10/27 22:16:36 UTC

svn commit: r1028084 - /subversion/trunk/build/ac-macros/java.m4

Author: jwhitlock
Date: Wed Oct 27 20:16:36 2010
New Revision: 1028084

URL: http://svn.apache.org/viewvc?rev=1028084&view=rev
Log:
Fixed the problem where comiling JavaHL on OS X fails after Apple's latest
Java update.

* build/ac-macros/java.m4: Added two new paths to check for the jni.h when
   on the Darwin platform.

Modified:
    subversion/trunk/build/ac-macros/java.m4

Modified: subversion/trunk/build/ac-macros/java.m4
URL: http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/java.m4?rev=1028084&r1=1028083&r2=1028084&view=diff
==============================================================================
--- subversion/trunk/build/ac-macros/java.m4 (original)
+++ subversion/trunk/build/ac-macros/java.m4 Wed Oct 27 20:16:36 2010
@@ -81,13 +81,14 @@ AC_DEFUN(SVN_FIND_JDK,
   dnl but Darwin doesn't have that utility.  /usr/bin/java is a symlink into
   dnl /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands
   dnl See http://developer.apple.com/qa/qa2001/qa1170.html
+  OSX_JAVA_FRAMEWORK_HOME="/System/Library/Frameworks/JavaVM.framework"
   os_arch="`uname`"
   if test "$os_arch" = "Darwin" && test "$JDK" = "/usr" &&
      test -d "/Library/Java/Home"; then
       JDK="/Library/Java/Home"
   fi
   if test "$os_arch" = "Darwin" && test "$JDK" = "/Library/Java/Home"; then
-      JRE_LIB_DIR="/System/Library/Frameworks/JavaVM.framework/Classes"
+      JRE_LIB_DIR="$OSX_JAVA_FRAMEWORK_HOME/Classes"
   else
       JRE_LIB_DIR="$JDK/jre/lib"
   fi
@@ -96,6 +97,17 @@ AC_DEFUN(SVN_FIND_JDK,
     dnl This *must* be fully expanded, or we'll have problems later in find.
     JNI_INCLUDEDIR="$JDK/include"
     JDK_SUITABLE=yes
+  elif test "$os_arch" = "Darwin" && test -f "$JDK/Headers/jni.h" -o \
+                                          -h "$JDK/Headers/jni.h"; then
+    dnl This works around the JDK issue on Snow Leopard
+    JNI_INCLUDEDIR="$JDK/Headers"
+    JDK_SUITABLE=yes
+  elif test "$os_arch" = "Darwin" && \
+       test -f "$OSX_JAVA_FRAMEWORK_HOME/Versions/Current/Headers/jni.h" -o \
+            -h "$OSX_JAVA_FRAMEWORK_HOME/Versions/Current/Headers/jni.h"; then
+    dnl This works around the JDK issue on Snow Leopard
+    JNI_INCLUDEDIR="$OSX_JAVA_FRAMEWORK_HOME/Versions/Current/Headers"
+    JDK_SUITABLE=yes
   else
     AC_MSG_WARN([no JNI header files found.])
     if test "$os_arch" = "Darwin"; then



Re: svn commit: r1028084 - /subversion/trunk/build/ac-macros/java.m4

Posted by Jeremy Whitlock <jw...@apache.org>.
On Mon, Nov 29, 2010 at 6:50 PM, Blair Zajac <bl...@orcaware.com> wrote:
> On 10/27/2010 01:16 PM, jwhitlock@apache.org wrote:
>>
>> Author: jwhitlock
>> Date: Wed Oct 27 20:16:36 2010
>> New Revision: 1028084
>>
>> URL: http://svn.apache.org/viewvc?rev=1028084&view=rev
>> Log:
>> Fixed the problem where comiling JavaHL on OS X fails after Apple's latest
>> Java update.
>>
>> * build/ac-macros/java.m4: Added two new paths to check for the jni.h when
>>    on the Darwin platform.
>
> Should we also add URLs to the download location for the Java developer kits
> for 10.5 and 10.6, as people may not know that they need to install it?  Or
> add it to the INSTALL notes?

It would be interesting to see a proof of this idea.  I mean, I could
see this getting very verbose and then I'd suggest an INSTALL mention.
 If it weren't very verbose, outputting it as part of a configure
failure could be ideal.

Re: svn commit: r1028084 - /subversion/trunk/build/ac-macros/java.m4

Posted by Blair Zajac <bl...@orcaware.com>.
On 10/27/2010 01:16 PM, jwhitlock@apache.org wrote:
> Author: jwhitlock
> Date: Wed Oct 27 20:16:36 2010
> New Revision: 1028084
>
> URL: http://svn.apache.org/viewvc?rev=1028084&view=rev
> Log:
> Fixed the problem where comiling JavaHL on OS X fails after Apple's latest
> Java update.
>
> * build/ac-macros/java.m4: Added two new paths to check for the jni.h when
>     on the Darwin platform.

Should we also add URLs to the download location for the Java developer 
kits for 10.5 and 10.6, as people may not know that they need to install 
it?  Or add it to the INSTALL notes?

10.6:

https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719

10.5:

https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20720

Blair