This is the mail archive of the java-patches@sources.redhat.com 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]

Re: Minor changes to improve libtool support of GCJ


On Jan 24, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:

> This prepares for the fix for the GCJ `-c -o'-detection problem that
> follows soon.

Here it is.  I find the explicit pre-creation of
gnu/classpath/Configuration.java very gross, and considered the
possibility of having a gnu/classpath/Configuration.java in the source
tree, but feared it might be used when we wouldn't want it to be.  I
also fear changes in this gnu/classpath/Configuration.java.in might
require changes in the pre-creating script, whose need might go
undetected for a while.  Thoughts?  Ok to install?

Index: libjava/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* configure.in (CPPFLAGS): Added builddir and srcdir to CPPFLAGS
	for libtool tests.  Pre-create gnu/classpath/Configuration.java.
	* configure: Rebuilt.

Index: libjava/configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libjava/configure.in,v
retrieving revision 1.72
diff -u -p -r1.72 configure.in
--- libjava/configure.in 2001/01/12 19:16:04 1.72
+++ libjava/configure.in 2001/01/24 05:49:33
@@ -608,7 +608,24 @@ fi
 # Create it, so that compile/link tests don't fail
 test -f libgcj.spec || touch libgcj.spec
 
+# We must search the source tree for java.lang, since we still don't
+# have libgcj.jar nor java/lang/*.class
+GCJ_SAVE_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
+
+# Since some classes depend on this one, we need its source available
+# before we can do any GCJ compilation test :-(
+if test ! -f gnu/classpath/Configuration.java; then
+  test -d gnu || mkdir gnu
+  test -d gnu/classpath || mkdir gnu/classpath
+  sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
+	< $srcdir/gnu/classpath/Configuration.java.in \
+	> gnu/classpath/Configuration.java
+fi
+
 LT_AC_PROG_GCJ
+
+CPPFLAGS=$GCJ_SAVE_CPPFLAGS
 
 dnl FIXME: cross compilation
 AC_CHECK_SIZEOF(void *)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

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