Makefile.in, configure: Rebuilt.

* Makefile.in, configure: Rebuilt.
	* Makefile.am (jv_convert_LDFLAGS): Removed -nodefaultlibs.
	(jv_convert_LDADD): Added ZLIBS.  Removed -lm, -lc, -lgcc.
	(jv_convert_DEPENDENCIES): Added ZDEPS.
	* configure.in (GCSPEC): Added `-L' to point to boehm-gc build
	directory.
	(THREADSPEC): Added `-L' to point to qthreads build directory.
	(ZLIBS): New subst.
	(ZDEPS): New subst.
	* configure, Makefile.in: Rebuilt.
	* Makefile.am (toolexeclib_DATA): New macro.
	* configure.in: Create libgcj.spec.  Look for -lsocket and -lnsl.
	Recognize --with-system-zlib.
	(GCSPEC): New subst.
	(THREADSPEC): New subst.
	(SYSTEMSPEC): New subst.
	(ZLIBSPEC): New subst.
	* libgcj.spec.in: New file.

From-SVN: r26885
This commit is contained in:
Tom Tromey 1999-05-11 12:11:09 +00:00 committed by Tom Tromey
parent 138657ecb0
commit f994389bf8
7 changed files with 700 additions and 176 deletions

View File

@ -1,3 +1,25 @@
1999-05-11 Tom Tromey <tromey@cygnus.com>
* Makefile.in, configure: Rebuilt.
* Makefile.am (jv_convert_LDFLAGS): Removed -nodefaultlibs.
(jv_convert_LDADD): Added ZLIBS. Removed -lm, -lc, -lgcc.
(jv_convert_DEPENDENCIES): Added ZDEPS.
* configure.in (GCSPEC): Added `-L' to point to boehm-gc build
directory.
(THREADSPEC): Added `-L' to point to qthreads build directory.
(ZLIBS): New subst.
(ZDEPS): New subst.
* configure, Makefile.in: Rebuilt.
* Makefile.am (toolexeclib_DATA): New macro.
* configure.in: Create libgcj.spec. Look for -lsocket and -lnsl.
Recognize --with-system-zlib.
(GCSPEC): New subst.
(THREADSPEC): New subst.
(SYSTEMSPEC): New subst.
(ZLIBSPEC): New subst.
* libgcj.spec.in: New file.
1999-05-10 Tom Tromey <tromey@cygnus.com>
* java/io/InputStreamReader.java (read): If length is 0, return

View File

@ -16,6 +16,7 @@ toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
toolexeclib_LTLIBRARIES = libgcj.la
toolexeclib_DATA = libgcj.spec
data_DATA = libgcj.zip
## For now, only on native systems.
@ -260,14 +261,18 @@ EXTRA_jv_convert_SOURCES = $(convert_source_files)
## We need -nodefaultlibs because we want to avoid gcj's `-lgcj'. We
## need this because we are explicitly using libtool to link using the
## `.la' file.
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert -nodefaultlibs \
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
-rpath $(toolexeclibdir)
jv_convert_LINK = $(LIBTOOL) --mode=link $(GCJ) $(JC1FLAGS) $(LDFLAGS) \
-o jv-convert
## We explicitly link in the libraries we need. This way we don't
## need -nodefaultlibs, so we can still rely on gcj picking up the
## system libraries we need (via the specs file). The -L. finds the
## specs file for us.
jv_convert_LDADD = $(convert_source_files:.java=.lo) libgcj.la \
$(GCLIBS) $(THREADLIBS) -lm -lgcc -lc -lgcc
$(GCLIBS) $(THREADLIBS) $(ZLIBS) -L.
jv_convert_DEPENDENCIES = $(convert_source_files:.java=.lo) \
$(GCDEPS) $(THREADDEPS) libgcj.la
$(GCDEPS) $(THREADDEPS) $(ZDEPS) libgcj.la
# The Unicode consortium does not permit re-distributing the file JIS0201.TXT.
# You can get it from ftp://ftp.unicode.org/Public/MAPPINGS/EASTASIA/JIS/.

View File

@ -77,6 +77,7 @@ GCDEPS = @GCDEPS@
GCINCS = @GCINCS@
GCLIBS = @GCLIBS@
GCOBJS = @GCOBJS@
GCSPEC = @GCSPEC@
LD = @LD@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
@ -88,12 +89,17 @@ MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
PERL = @PERL@
RANLIB = @RANLIB@
SYSTEMSPEC = @SYSTEMSPEC@
THREADDEPS = @THREADDEPS@
THREADINCS = @THREADINCS@
THREADLIBS = @THREADLIBS@
THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@
VERSION = @VERSION@
ZDEPS = @ZDEPS@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
here = @here@
libgcj_basedir = @libgcj_basedir@
@ -106,6 +112,7 @@ toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
toolexeclib_LTLIBRARIES = libgcj.la
toolexeclib_DATA = libgcj.spec
data_DATA = libgcj.zip
@NATIVE_TRUE@bin_PROGRAMS = \
@ -185,17 +192,17 @@ CONVERT_DIR = gnu/gcj/convert
jv_convert_SOURCES =
EXTRA_jv_convert_SOURCES = $(convert_source_files)
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert -nodefaultlibs \
jv_convert_LDFLAGS = --main=gnu.gcj.convert.Convert \
-rpath $(toolexeclibdir)
jv_convert_LINK = $(LIBTOOL) --mode=link $(GCJ) $(JC1FLAGS) $(LDFLAGS) \
-o jv-convert
jv_convert_LDADD = $(convert_source_files:.java=.lo) libgcj.la \
$(GCLIBS) $(THREADLIBS) -lm -lgcc -lc -lgcc
$(GCLIBS) $(THREADLIBS) $(ZLIBS) -L.
jv_convert_DEPENDENCIES = $(convert_source_files:.java=.lo) \
$(GCDEPS) $(THREADDEPS) libgcj.la
$(GCDEPS) $(THREADDEPS) $(ZDEPS) libgcj.la
gen_from_JIS_SOURCES =
@ -610,7 +617,7 @@ cygnus_hack =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = ./include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_FILES = libgcj.spec
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
@ -637,11 +644,11 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CF
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DATA = $(data_DATA)
DATA = $(data_DATA) $(toolexeclib_DATA)
DIST_COMMON = COPYING.LIB ChangeLog Makefile.am Makefile.in acconfig.h \
acinclude.m4 aclocal.m4 configure configure.in include/config.h.in \
include/stamp-h.in
include/stamp-h.in libgcj.spec.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@ -874,6 +881,8 @@ distclean-hdr:
-rm -f include/config.h
maintainer-clean-hdr:
libgcj.spec: $(top_builddir)/config.status libgcj.spec.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-toolexeclibLTLIBRARIES:
@ -1000,6 +1009,25 @@ uninstall-dataDATA:
rm -f $(DESTDIR)$(datadir)/$$p; \
done
install-toolexeclibDATA: $(toolexeclib_DATA)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
@list='$(toolexeclib_DATA)'; for p in $$list; do \
if test -f $(srcdir)/$$p; then \
echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
$(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(toolexeclibdir)/$$p; \
else if test -f $$p; then \
echo " $(INSTALL_DATA) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
$(INSTALL_DATA) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
fi; fi; \
done
uninstall-toolexeclibDATA:
@$(NORMAL_UNINSTALL)
list='$(toolexeclib_DATA)'; for p in $$list; do \
rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
@ -1213,7 +1241,8 @@ installcheck-am:
installcheck: installcheck-recursive
install-info-am:
install-info: install-info-recursive
install-exec-am: install-toolexeclibLTLIBRARIES install-binPROGRAMS
install-exec-am: install-toolexeclibLTLIBRARIES install-binPROGRAMS \
install-toolexeclibDATA
install-exec: install-exec-recursive
install-data-am: install-dataDATA
@ -1223,7 +1252,7 @@ install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am: uninstall-toolexeclibLTLIBRARIES uninstall-binPROGRAMS \
uninstall-dataDATA
uninstall-dataDATA uninstall-toolexeclibDATA
uninstall: uninstall-recursive
all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
all-redirect: all-recursive
@ -1232,7 +1261,7 @@ install-strip:
installdirs: installdirs-recursive
installdirs-am:
$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir) $(DESTDIR)$(bindir) \
$(DESTDIR)$(datadir)
$(DESTDIR)$(datadir) $(DESTDIR)$(toolexeclibdir)
mostlyclean-generic:
@ -1294,6 +1323,7 @@ distclean-binPROGRAMS clean-binPROGRAMS maintainer-clean-binPROGRAMS \
uninstall-binPROGRAMS install-binPROGRAMS mostlyclean-noinstPROGRAMS \
distclean-noinstPROGRAMS clean-noinstPROGRAMS \
maintainer-clean-noinstPROGRAMS uninstall-dataDATA install-dataDATA \
uninstall-toolexeclibDATA install-toolexeclibDATA \
install-data-recursive uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \

683
libjava/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -76,6 +76,17 @@ test -d java || mkdir java
test -d java/io || mkdir java/io
AC_LINK_FILES(java/io/$FILE_DESCRIPTOR, java/io/natFileDescriptor.cc)
SYSTEMSPEC=
AC_SUBST(SYSTEMSPEC)
AC_ARG_WITH(system-zlib,
[ --with-system-zlib Use installed libz])
ZLIBSPEC=
AC_SUBST(ZLIBSPEC)
dnl FIXME: this should be _libs on some hosts.
libsubdir=.libs
dnl Allow the GC to be disabled. Can be useful when debugging.
AC_MSG_CHECKING([for garbage collector to use])
AC_ARG_ENABLE(java-gc,
@ -88,12 +99,16 @@ GCLIBS=
GCINCS=
GCDEPS=
GCOBJS=
GCSPEC=
case "$GC" in
boehm)
AC_MSG_RESULT(boehm)
GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
GCLIBS="$GCDEPS"
# We include the path to the boehm-gc build directory.
# See Makefile.am to understand why.
GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
GCSPEC='-lgcjgc'
dnl We also want to pick up some cpp flags required when including
dnl boehm-config.h. Yuck.
GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
@ -115,6 +130,7 @@ AC_SUBST(GCLIBS)
AC_SUBST(GCINCS)
AC_SUBST(GCDEPS)
AC_SUBST(GCOBJS)
AC_SUBST(GCSPEC)
AC_LINK_FILES(include/$GCHDR, include/java-gc.h)
@ -184,9 +200,11 @@ THREADINCS=
THREADDEPS=
THREADOBJS=
THREADH=
THREADSPEC=
case "$THREADS" in
posix)
THREADLIBS=-lpthread
THREADSPEC=-lpthread
THREADOBJS=posix-threads.lo
THREADH=posix-threads.h
# MIT pthreads doesn't seem to have the mutexattr functions.
@ -197,7 +215,10 @@ case "$THREADS" in
qt)
THREADDEPS='$(top_builddir)/../qthreads/libgcjcoop.la'
THREADLIBS="$THREADDEPS"
# We include the path to the qthreads build directory.
# See Makefile.am to understand why.
THREADLIBS="$THREADDEPS -L\$(here)/../qthreads/$libsubdir"
THREADSPEC='-lgcjcoop'
THREADOBJS=quick-threads.lo
THREADINCS='-I$(top_srcdir)/../qthreads'
THREADH=quick-threads.h
@ -213,6 +234,7 @@ AC_SUBST(THREADLIBS)
AC_SUBST(THREADINCS)
AC_SUBST(THREADDEPS)
AC_SUBST(THREADOBJS)
AC_SUBST(THREADSPEC)
AM_CONDITIONAL(USING_GCC, test "$GCC" = yes)
@ -250,6 +272,8 @@ if test -n "${with_cross_host}"; then
dnl We also assume we are using gcc, which provides alloca.
AC_DEFINE(HAVE_ALLOCA)
ZLIBSPEC=-lgcj
# If Canadian cross, then don't pick up tools from the build
# directory.
if test "$build" != "$with_cross_host"; then
@ -317,6 +341,62 @@ else
AC_MSG_ERROR([memcpy is required])
fi
# Some library-finding code we stole from Tcl.
#--------------------------------------------------------------------
# Check for the existence of the -lsocket and -lnsl libraries.
# The order here is important, so that they end up in the right
# order in the command line generated by make. Here are some
# special considerations:
# 1. Use "connect" and "accept" to check for -lsocket, and
# "gethostbyname" to check for -lnsl.
# 2. Use each function name only once: can't redo a check because
# autoconf caches the results of the last check and won't redo it.
# 3. Use -lnsl and -lsocket only if they supply procedures that
# aren't already present in the normal libraries. This is because
# IRIX 5.2 has libraries, but they aren't needed and they're
# bogus: they goof up name resolution if used.
# 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
# To get around this problem, check for both libraries together
# if -lsocket doesn't work by itself.
#--------------------------------------------------------------------
AC_CACHE_CHECK([for socket libraries], gcj_cv_lib_sockets,
[gcj_cv_lib_sockets=
gcj_checkBoth=0
unset ac_cv_func_connect
AC_CHECK_FUNC(connect, gcj_checkSocket=0, gcj_checkSocket=1)
if test "$gcj_checkSocket" = 1; then
unset ac_cv_func_connect
AC_CHECK_LIB(socket, main, gcj_cv_lib_sockets="-lsocket",
gcj_checkBoth=1)
fi
if test "$gcj_checkBoth" = 1; then
gcj_oldLibs=$LIBS
LIBS="$LIBS -lsocket -lnsl"
unset ac_cv_func_accept
AC_CHECK_FUNC(accept,
[gcj_checkNsl=0
gcj_cv_lib_sockets="-lsocket -lnsl"])
unset ac_cv_func_accept
LIBS=$gcj_oldLibs
fi
unset ac_cv_func_gethostbyname
gcj_oldLibs=$LIBS
LIBS="$LIBS $gcj_cv_lib_sockets"
AC_CHECK_FUNC(gethostbyname, ,
[AC_CHECK_LIB(nsl, main,
[gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"])])
unset ac_cv_func_gethostbyname
LIBS=$gcj_oldLIBS
])
SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
if test "$with_system_zlib" = yes; then
AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=-lzgcj)
else
ZLIBSPEC=-lzgcj
fi
if test -d "$libgcj_basedir/../gcc/java"; then
GCJ=
else
@ -326,6 +406,19 @@ else
fi
fi
ZLIBS=
ZDEPS=
if test "x$ZLIBSPEC" = "x-lzgcj"; then
# We include the path to the zlib build directory.
# See Makefile.am to understand why.
ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
else
ZLIBS="$ZLIBSPEC"
fi
AC_SUBST(ZLIBS)
AC_SUBST(ZDEPS)
AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
AM_CONDITIONAL(NATIVE, test "$CANADIAN" = no || test "$NULL_TARGET" = yes)
@ -409,7 +502,7 @@ fi
here=`pwd`
AC_SUBST(here)
AC_OUTPUT(Makefile testsuite/Makefile,
AC_OUTPUT(Makefile libgcj.spec testsuite/Makefile,
[if test -n "$CONFIG_FILES"; then
ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
fi],

7
libjava/libgcj.spec.in Normal file
View File

@ -0,0 +1,7 @@
#
# This spec file is read by gcj when linking.
# It is used to specify the standard libraries we need in order
# to link with libgcj.
#
# We need a space after the `+' to placate gcc.
*lib: + -lgcj -lm @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@

View File

@ -78,6 +78,7 @@ GCDEPS = @GCDEPS@
GCINCS = @GCINCS@
GCLIBS = @GCLIBS@
GCOBJS = @GCOBJS@
GCSPEC = @GCSPEC@
LD = @LD@
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
@ -90,12 +91,17 @@ NM = @NM@
PACKAGE = @PACKAGE@
PERL = @PERL@
RANLIB = @RANLIB@
SYSTEMSPEC = @SYSTEMSPEC@
THREADDEPS = @THREADDEPS@
THREADINCS = @THREADINCS@
THREADLIBS = @THREADLIBS@
THREADOBJS = @THREADOBJS@
THREADSPEC = @THREADSPEC@
USE_SYMBOL_UNDERSCORE = @USE_SYMBOL_UNDERSCORE@
VERSION = @VERSION@
ZDEPS = @ZDEPS@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
here = @here@
libgcj_basedir = @libgcj_basedir@