Re: svn commit: r8885 - in trunk: . build/ac-macros
Patrick Mayweg <[email protected]> Thu, 04 Mar 2004 08:04:18 +0100
| Newsgroups | gmane.mail.eyebrowse.devel,gmane.comp.version-control.subversion.svn |
|---|---|
| Message-ID | <[email protected]> |
Hi Justin, the usage of SWIG_JAVA_INCLUDES in the JAVAHL_INCLUDES requieres every javahl user to install swig. I do not that think that this requierement is really usefull. Patrick [email protected] wrote: >Author: jerenkrantz >Date: Thu Mar 4 00:33:14 2004 >New Revision: 8885 > >Modified: > trunk/Makefile.in > trunk/build/ac-macros/java.m4 >Log: >Fixes to integrated javahl build system. > >* Makefile.in: Also include the javah generated path in our compile of javahl > C++ library instead of blindly just including SWIG_JAVA_INCLUDES. >* build/ac-macros/java.m4 (SVN_FIND_JDK): Refactor tests to better account > for Darwin-based systems. Print better error messages if the JDK isn't > found (esp. on Darwin). Stop substituting in our values if the JDK isn't > suitable. > > >Modified: trunk/Makefile.in >============================================================================== >--- trunk/Makefile.in (original) >+++ trunk/Makefile.in Thu Mar 4 00:33:14 2004 >@@ -115,6 +115,8 @@ > SWIG_PL_COMPILE = @SWIG_PL_COMPILE@ > SWIG_PL_LINK = @SWIG_PL_LINK@ > >+JAVAHL_INCLUDES=$(SWIG_JAVA_INCLUDES) -I$(abs_builddir)/subversion/bindings/java/javahl/include >+ > SVN_APR_INCLUDES = @SVN_APR_INCLUDES@ > SVN_APR_PREFIX = @SVN_APR_PREFIX@ > SVN_APRUTIL_INCLUDES = @SVN_APRUTIL_INCLUDES@ >@@ -140,7 +142,7 @@ > COMPILE_SWIG_PL = $(LIBTOOL) $(LTFLAGS) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) $(SWIG_PL_INCLUDES) $(INCLUDES) -o $@ -c > > # special compilation for files destined for javahl (i.e. C++) >-COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE_CXX) $(SWIG_JAVA_INCLUDES) -o $@ -c >+COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE_CXX) $(JAVAHL_INCLUDES) -o $@ -c > COMPILE_JAVAHL_JAVAC = $(JAVAC) > COMPILE_JAVAHL_JAVAH = $(JAVAH) > > >Modified: trunk/build/ac-macros/java.m4 >============================================================================== >--- trunk/build/ac-macros/java.m4 (original) >+++ trunk/build/ac-macros/java.m4 Thu Mar 4 00:33:14 2004 >@@ -31,44 +31,60 @@ > [ > where=$1 > >+ JDK=none >+ JAVA_BIN=none >+ JAVAC=none >+ JAVAH=none >+ JAR=none >+ JNI_INCLUDES=none >+ >+ JDK_SUITABLE=no > AC_MSG_CHECKING([for JDK]) > if test $where = check; then >- if test -d "$JAVA_HOME/include"; then >+ dnl Prefer /Library/Java/Home first to try to be nice on Darwin. >+ dnl We'll correct later if we get caught in the tangled web of JAVA_HOME. >+ if test -x "$JAVA_HOME/bin/java"; then > JDK="$JAVA_HOME" >- JDK_SUITABLE=yes >- else >- JDK=none >- JDK_SUITABLE=no >+ elif test -x "/Library/Java/Home/bin/java"; then >+ JDK="/Library/Java/Home" >+ elif test -x "/usr/bin/java"; then >+ JDK="/usr" >+ elif test -x "/usr/local/bin/java"; then >+ JDK="/usr/local" > fi > else > JDK=$where >- if test -d "$JDK/include"; then >- JDK_SUITABLE=yes >- else >- AC_MSG_WARN([no JNI header files found.]) >- fi >- fi >- AC_MSG_RESULT([$JDK_SUITABLE]) >- >- JAVA_BIN='$(JDK)/bin' >- if test -f "$JDK/include/jni.h"; then >- JNI_INCLUDES="$JDK/include" > fi > > dnl Correct for Darwin's odd JVM layout. Ideally, we should use realpath, > dnl but Darwin doesn't have that utility. /usr/bin/java is a symlink into > dnl /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands >- os_arch=`uname` >- if test "$JDK_SUITABLE" = "yes" -a "$JDK" = "/usr" -a "$os_arch" = "Darwin" -a -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK"; then >- JDK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK" >- JAVA_BIN='$(JDK)/Commands' >- JNI_INCLUDES="$JDK/Headers" >+ dnl See http://developer.apple.com/qa/qa2001/qa1170.html >+ os_arch="`uname`" >+ if test "$os_arch" = "Darwin" -a "$JDK" = "/usr" -a -d "/Library/Java/Home"; then >+ JDK="/Library/Java/Home" > fi >+ if test -f "$JDK/include/jni.h"; then >+ dnl This *must* be fully expanded, or we'll have problems later in find. >+ JNI_INCLUDES="$JDK/include" >+ JDK_SUITABLE=yes >+ else >+ AC_MSG_WARN([no JNI header files found.]) >+ if test "$os_arch" = "Darwin"; then >+ AC_MSG_WARN([You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates.]) >+ fi >+ JDK_SUITABLE=no >+ fi >+ AC_MSG_RESULT([$JDK_SUITABLE]) >+ >+ if test "$JDK_SUITABLE" = "yes"; then >+ JAVA_BIN='$(JDK)/bin' > >- JAVAC="$JAVA_BIN/javac" >- # TODO: Test for Jikes, which should be preferred (for speed) if available >- JAVAH="$JAVA_BIN/javah" >- JAR="$JAVA_BIN/jar" >+ dnl TODO: Test for Jikes, which should be preferred (for speed) if available >+ JAVAC="$JAVA_BIN/javac" >+ JAVAH="$JAVA_BIN/javah" >+ JAR="$JAVA_BIN/jar" >+ fi > > dnl We use JDK in both the swig.m4 macros and the Makefile > AC_SUBST(JDK) > >--------------------------------------------------------------------- >To unsubscribe, e-mail: svn-unsubscribe-lmwclWVctOZK/[email protected] >For additional commands, e-mail: svn-help-lmwclWVctOZK/[email protected] > > >