[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Jeremy Whitlock <jcscoobyrs_at_gmail.com>
Date: Wed, 27 Oct 2010 16:17:01 -0600

On Oct 27, 2010, at 4:12 PM, jwhitlock_at_apache.org wrote:

> Author: jwhitlock
> Date: Wed Oct 27 22:12:15 2010
> New Revision: 1028125
>
> URL: http://svn.apache.org/viewvc?rev=1028125&view=rev
> Log:
> Follow-up to r1028084 that will also search Xcode for a suitable JDK.
>
> * build/ac-macros/java.m4: Enhanced to search for a suitable JDK in Xcode.
>
> 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=1028125&r1=1028124&r2=1028125&view=diff
> ==============================================================================
> --- subversion/trunk/build/ac-macros/java.m4 (original)
> +++ subversion/trunk/build/ac-macros/java.m4 Wed Oct 27 22:12:15 2010
> @@ -81,32 +81,48 @@ 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"; then
> + OSX_VER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
> +
> + if test "$OSX_VER" = "10.4"; then
> + dnl For OS X 10.4, the SDK version is 10.4u instead of 10.4.
> + OSX_VER = "$OSX_VERu"
> + fi
> +
> + OSX_SYS_JAVA_FRAMEWORK="/System/Library/Frameworks/JavaVM.framework"
> + OSX_SDK_JAVA_FRAMEWORK="/Developer/SDKs/MacOSX$OSX_VER.sdk/System/Library"
> + OSX_SDK_JAVA_FRAMEWORK="$OSX_SDK_JAVA_FRAMEWORK/Frameworks/JavaVM.framework"
> + fi

This approach will basically use the Xcode SDK that matches your OS X version by default. To me, this seems like a suitable default. If the default doesn't work for you, there is still the --with-jdk option you can supply to specify the JDK path you want to use, like potentially cross-compiling against an older Xcode SDK.

Take care,

Jeremy Whitlock <jcscoobyrs_at_gmail.com>
Twitter: jcscoobyrs
Website: http://www.thoughtspark.org
Received on 2010-10-28 00:17:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.