This is the mail archive of the java@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]

Re: Minor changes to improve libtool support of GCJ


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

> 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?

Tom Tromey has finally approved this patch, along with an additional
test to detect any new @@ substitutions in Configuration.java.  I'm
installing this in mainline and 3.0 branch.

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.78
diff -u -p -r1.78 configure.in
--- libjava/configure.in 2001/04/02 23:26:50 1.78
+++ libjava/configure.in 2001/04/24 11:26:10
@@ -624,7 +624,30 @@ 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
+  # We do not want to redirect the output of the grep below to /dev/null,
+  # but we add /dev/null to the input list so that grep will print the
+  # filename of Configuration.java in case it finds any matches.
+  if grep @ gnu/classpath/Configuration.java /dev/null; then
+    AC_MSG_ERROR([configure.in is missing the substitutions above])
+  fi
+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]