On Oct 27, 2010, at 4:12 PM, jwhitl...@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 <jcscoob...@gmail.com> Twitter: jcscoobyrs Website: http://www.thoughtspark.org