This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] add --with-java-home configure option
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Thomas Fitzsimmons <fitzsim at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 04 Apr 2005 19:11:28 -0400
- Subject: Re: [patch] add --with-java-home configure option
- References: <1112653186.2981.27.camel@rh-ibm-t41>
Thomas Fitzsimmons wrote:
Hi,
This patch adds a --with-java-home configure option and sets the
java.home and sun.boot.class.path system properties accordingly. In the
future, we plan to make libgcj's installation layout more SDK-like for
compatibility reasons -- at that point, we can expand the meaning of
this option. For now a separate project, java-gcj-compat, can be
installed to provide compatibility symlinks. The --with-java-home
option will allow us to symlink java directly to gij, where before we
were wrapping gij with a hacky option-massaging shell script.
--with-java-home needs to be documented in install.texi
Index: java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.53
diff -u -r1.53 natRuntime.cc
--- java/lang/natRuntime.cc 2 Apr 2005 02:26:51 -0000 1.53
+++ java/lang/natRuntime.cc 4 Apr 2005 22:03:55 -0000
@@ -398,7 +398,10 @@
// part we do this because most people specify only --prefix and
// nothing else when installing gcj. Plus, people are free to
// redefine `java.home' with `-D' if necessary.
- SET ("java.home", PREFIX);
+ if (! strcmp (JAVA_HOME, ""))
+ SET ("java.home", PREFIX);
+ else
+ SET ("java.home", JAVA_HOME);
It would be better to use something like "#ifdef JAVA_HOME" here rather
than a runtime comparison.
Regards
Bryce