This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
libjava configury tweaking for single-tree build
- To: java-patches at sources dot redhat dot com
- Subject: libjava configury tweaking for single-tree build
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 10 Sep 2000 06:41:14 -0300
- Organization: GCC Team, Red Hat
Here's some additional tweaking for libjava that hadn't been
approved/reviewed yet, needed to enable one-shot builds of GCJ and
libgcj. Ok to install?
Index: libjava/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* configure.in (LIBDATASTARTSPEC): Use `%s' to search for
libgcjdata.a.
(GCJ): Support single-tree builds. Add -B`pwd`/ and -I$srcdir.
* acinclude.m4: Arrange for automake to not bring in a new
libtool.m4 for LT_AC_PROG_GCJ. AC_SUBST GCJ.
* Makefile.am: Leave it up to automake to subst GCJ.
* aclocal.m4, configure, Makefile.in: Rebuilt.
Index: libjava/configure.in
===================================================================
RCS file: /cvs/java/libgcj/libjava/configure.in,v
retrieving revision 1.59
diff -u -p -r1.59 configure.in
--- libjava/configure.in 2000/05/20 20:26:51 1.59
+++ libjava/configure.in 2000/09/10 09:37:47
@@ -109,7 +109,7 @@ LIBDATASTARTSPEC=
NEEDS_DATA_START=
AC_TRY_LINK([extern int data_start;], [return ((int) &data_start);],
[AC_MSG_RESULT(found it)],
- [LIBDATASTARTSPEC="-u data_start -lgcjdata"
+ [LIBDATASTARTSPEC="-u data_start libgcjdata.a%s"
NEEDS_DATA_START=yes
AC_MSG_RESULT(missing)])
AC_SUBST(LIBDATASTARTSPEC)
@@ -579,15 +579,29 @@ else
AC_CHECK_LIB(dl, main, SYSTEMSPEC="$SYSTEMSPEC -ldl")
fi
- if test -d "$libgcj_basedir/../gcc/java"; then
- GCJ=
+ if test -z "${with_multisubdir}"; then
+ builddotdot=.
+ else
+changequote(<<,>>)
+ builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
+changequote([,])
+ fi
+ dir="`cd ${builddotdot}/../../gcc && pwd`"
+ if test -x "${dir}/gcj"; then
+ GCJ="$dir/gcj -B`pwd`/ -B$dir/"
else
CANADIAN=yes
NULL_TARGET=yes
- GCJ=gcj
+ GCJ="gcj -B`pwd`/"
fi
fi
+# Create it, so that compile/link tests don't fail
+test -f libgcj.spec || touch libgcj.spec
+GCJ="$GCJ -I$srcdir"
+
+LT_AC_PROG_GCJ
+
dnl FIXME: cross compilation
AC_CHECK_SIZEOF(void *)
@@ -618,17 +632,6 @@ AM_CONDITIONAL(NEEDS_DATA_START, test "$
AC_SUBST(EH_COMMON_INCLUDE)
# Determine gcj version number.
-if test "$GCJ" = ""; then
- if test -z "${with_multisubdir}"; then
- builddotdot=.
- else
-changequote(<<,>>)
- builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
-changequote([,])
- fi
- dir="`cd ${builddotdot}/../../gcc && pwd`"
- GCJ="$dir/gcj -B$dir/"
-fi
changequote(<<,>>)
gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
changequote([,])
Index: libjava/acinclude.m4
===================================================================
RCS file: /cvs/java/libgcj/libjava/acinclude.m4,v
retrieving revision 1.6
diff -u -p -r1.6 acinclude.m4
--- libjava/acinclude.m4 2000/09/10 09:26:50 1.6
+++ libjava/acinclude.m4 2000/09/10 09:37:47
@@ -96,5 +96,7 @@ ifelse(yes,no,[
AC_DEFUN([AM_PROG_LIBTOOL],)
AC_DEFUN([AC_LIBTOOL_DLOPEN],)
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],)
+AC_DEFUN([LT_AC_PROG_GCJ],)
+AC_SUBST(GCJ)
AC_SUBST(LIBTOOL)
])
Index: libjava/Makefile.am
===================================================================
RCS file: /cvs/java/libgcj/libjava/Makefile.am,v
retrieving revision 1.88
diff -u -p -r1.88 Makefile.am
--- libjava/Makefile.am 2000/09/07 12:09:40 1.88
+++ libjava/Makefile.am 2000/09/10 09:37:48
@@ -51,10 +51,8 @@ if CANADIAN
if NULL_TARGET
## In this case, gcj is found outside the build tree. However, zip is
## found in the build tree.
-GCJ = gcj
ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/zip/zip$(EXEEXT)
else
-GCJ = $(target_alias)-gcj
ZIP = zip
endif
GCJH = gcjh
@@ -63,8 +61,6 @@ else # CANADIAN
## (due to problems running it in builddir). In this case the obvious
## definition of GCJ won't work; instead we resort to this ugly
## definition that gives us absolute paths.
-expanded = `cd $(MULTIBUILDTOP)../$(COMPPATH)/gcc && pwd`
-GCJ = $(expanded)/gcj$(EXEEXT) -B$(expanded)/
GCJH = $(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
ZIP = $(MULTIBUILDTOP)../$(COMPPATH)/zip/zip$(EXEEXT)
endif # CANADIAN
--
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