This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: PR 3059


I'm checking this in on the trunk.  It fixes PR 3059.  With this the
`java.home' property is defined.

2001-06-07  Tom Tromey  <tromey@redhat.com>

	Fix for PR libgcj/3059:
	* java/lang/natSystem.cc (init_properties): Define `java.home'.
	* Makefile.in: Rebuilt.
	* Makefile.am (AM_CXXFLAGS): Define PREFIX.

Tom

Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.152
diff -u -r1.152 Makefile.am
--- Makefile.am	2001/06/08 18:02:02	1.152
+++ Makefile.am	2001/06/08 19:06:51
@@ -90,7 +90,8 @@
 AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions \
 ## Some systems don't allow `$' in identifiers by default, so we force it.
 	-fdollars-in-identifiers \
-	@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE
+	@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \
+	-DPREFIX="\"$(prefix)\""
 if USING_GCC
 AM_CFLAGS = @LIBGCJ_CFLAGS@ $(WARNINGS)
 else
Index: java/lang/natSystem.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/lang/natSystem.cc,v
retrieving revision 1.39
diff -u -r1.39 natSystem.cc
--- natSystem.cc	2001/04/20 09:43:51	1.39
+++ natSystem.cc	2001/06/08 19:06:51
@@ -320,8 +320,11 @@
   SET ("java.specification.name", "Java(tm) Language Specification");
   SET ("java.specification.vendor", "Sun Microsystems Inc.");
 
-  // FIXME: how to set this given location-independence?
-  // SET ("java.home", "FIXME");
+  // This definition is rather arbitrary: we choose $(prefix).  In
+  // 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);
   
   SET ("file.encoding", default_file_encoding);
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]