install.texi: Document that InfoZIP can replace jar.

gcc:
2006-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* doc/install.texi: Document that InfoZIP can replace jar.

libjava:
2006-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac (ZIP, UNZIP): New programs.
	(JAR): Fall back to bash script.  Generate it.
	(BASH_JAR): New conditional.
	* Makefile.am (bin_SCRIPTS): New.
	* jar.in: New file.

From-SVN: r114304
This commit is contained in:
Paolo Bonzini 2006-06-01 12:25:19 +00:00 committed by Paolo Bonzini
parent d5b0558fda
commit 028098486c
11 changed files with 5298 additions and 3837 deletions

View File

@ -1,3 +1,7 @@
2006-06-01 Paolo Bonzini <bonzini@gnu.org>
* doc/install.texi: Document that InfoZIP can replace jar.
2006-05-31 Roger Sayle <roger@eyesopen.com>
* config/i386/i386.c (ix86_expand_fp_absneg_operator): When SSE

View File

@ -305,7 +305,7 @@ release (4.1.3) when configured with @option{--enable-mpfr}.
The @option{--with-mpfr} or @option{--with-mpfr-dir} configure option should
be used if your MPFR Library is not installed in your library search path.
@item jar
@item @command{jar}, or InfoZIP (@command{zip} and @command{unzip})
Necessary to build libgcj, the GCJ runtime.
@ -2911,6 +2911,10 @@ to build the Ada language as it can't be bootstrapped using C@. Ada is
only available for the 32-bit PA-RISC runtime. The libffi and libjava
haven't been ported to HP-UX and don't build.
Starting with GCC 3.4 an ISO C compiler is required to bootstrap. The
bundled compiler supports only traditional C; you will need either HP's
unbundled compiler, or a binary distribution of GCC@.
It is possible to build GCC 3.3 starting with the bundled HP compiler,
but the process requires several steps. GCC 3.3 can then be used to
build later versions. The fastjar program contains ISO C code and
@ -2919,10 +2923,6 @@ avoided by not building the Java language. For example, use the
@option{--enable-languages="c,c++,f77,objc"} option in your configure
command.
Starting with GCC 3.4 an ISO C compiler is required to bootstrap. The
bundled compiler supports only traditional C; you will need either HP's
unbundled compiler, or a binary distribution of GCC@.
There are several possible approaches to building the distribution.
Binutils can be built first using the HP tools. Then, the GCC
distribution can be built. The second approach is to build GCC

View File

@ -1,3 +1,11 @@
2006-06-01 Paolo Bonzini <bonzini@gnu.org>
* configure.ac (ZIP, UNZIP): New programs.
(JAR): Fall back to bash script. Generate it.
(BASH_JAR): New conditional.
* Makefile.am (bin_SCRIPTS): New.
* jar.in: New file.
2006-06-01 Bryce McKinlay <mckinlay@redhat.com>
* gnu/java/lang/MainThread (run): Revert exception chaining change.

View File

@ -85,7 +85,9 @@ bin_SCRIPTS = addr2name.awk
## Compilers and compilation flags.
##
GCJH = @GCJH@
if BASH_JAR
bin_SCRIPTS += scripts/jar
endif
## The compiler with whatever flags we want for both -c and -C
## compiles.

View File

@ -46,15 +46,16 @@ target_triplet = @target@
@NATIVE_TRUE@bin_PROGRAMS = jv-convert$(EXEEXT) gij$(EXEEXT) \
@NATIVE_TRUE@ grmic$(EXEEXT) grmiregistry$(EXEEXT) \
@NATIVE_TRUE@ gcj-dbtool$(EXEEXT)
@USING_GCC_TRUE@am__append_4 = $(WARNINGS)
@USING_BOEHMGC_TRUE@am__append_5 = boehm.cc
@USING_NOGC_TRUE@am__append_6 = nogc.cc
@USING_POSIX_PLATFORM_TRUE@am__append_7 = posix.cc
@USING_WIN32_PLATFORM_TRUE@am__append_8 = win32.cc
@USING_DARWIN_CRT_TRUE@am__append_9 = darwin.cc
@USING_POSIX_THREADS_TRUE@am__append_10 = posix-threads.cc
@USING_WIN32_THREADS_TRUE@am__append_11 = win32-threads.cc
@USING_NO_THREADS_TRUE@am__append_12 = no-threads.cc
@BASH_JAR_TRUE@am__append_4 = scripts/jar
@USING_GCC_TRUE@am__append_5 = $(WARNINGS)
@USING_BOEHMGC_TRUE@am__append_6 = boehm.cc
@USING_NOGC_TRUE@am__append_7 = nogc.cc
@USING_POSIX_PLATFORM_TRUE@am__append_8 = posix.cc
@USING_WIN32_PLATFORM_TRUE@am__append_9 = win32.cc
@USING_DARWIN_CRT_TRUE@am__append_10 = darwin.cc
@USING_POSIX_THREADS_TRUE@am__append_11 = posix-threads.cc
@USING_WIN32_THREADS_TRUE@am__append_12 = win32-threads.cc
@USING_NO_THREADS_TRUE@am__append_13 = no-threads.cc
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \
$(srcdir)/../config.guess $(srcdir)/../config.sub \
$(srcdir)/../depcomp $(srcdir)/../install-sh \
@ -62,11 +63,11 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \
$(srcdir)/../mkinstalldirs $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/libgcj-test.spec.in \
$(srcdir)/libgcj.pc.in $(srcdir)/libgcj.spec.in \
$(srcdir)/sources.am $(top_srcdir)/configure COPYING ChangeLog \
NEWS THANKS
$(srcdir)/sources.am $(top_srcdir)/configure \
$(top_srcdir)/scripts/jar.in COPYING ChangeLog NEWS THANKS
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@noinst_PROGRAMS = \
@MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gen-from-JIS$(EXEEXT)
@XLIB_AWT_TRUE@am__append_13 = $(xlib_nat_headers)
@XLIB_AWT_TRUE@am__append_14 = $(xlib_nat_headers)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
@ -90,7 +91,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
CONFIG_HEADER = $(top_builddir)/include/config.h \
$(top_builddir)/gcj/libgcj-config.h
CONFIG_CLEAN_FILES = libgcj.pc libgcj.spec libgcj-test.spec \
java/io/natFile.cc java/lang/ConcreteProcess.java \
scripts/jar java/io/natFile.cc java/lang/ConcreteProcess.java \
java/lang/natConcreteProcess.cc java/net/natInetAddress.cc \
java/net/natVMNetworkInterface.cc \
gnu/java/net/natPlainSocketImpl.cc \
@ -440,6 +441,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BACKTRACESPEC = @BACKTRACESPEC@
BASH_JAR_FALSE = @BASH_JAR_FALSE@
BASH_JAR_TRUE = @BASH_JAR_TRUE@
CAIRO_CFLAGS = @CAIRO_CFLAGS@
CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
@ -477,6 +480,7 @@ GCSPEC = @GCSPEC@
GCTESTSPEC = @GCTESTSPEC@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
GTK_CAIRO_FALSE = @GTK_CAIRO_FALSE@
GTK_CAIRO_TRUE = @GTK_CAIRO_TRUE@
GTK_CFLAGS = @GTK_CFLAGS@
@ -555,6 +559,7 @@ THREADLDFLAGS = @THREADLDFLAGS@
THREADLIBS = @THREADLIBS@
THREADSPEC = @THREADSPEC@
TOOLKIT = @TOOLKIT@
UNZIP = @UNZIP@
USING_BOEHMGC_FALSE = @USING_BOEHMGC_FALSE@
USING_BOEHMGC_TRUE = @USING_BOEHMGC_TRUE@
USING_DARWIN_CRT_FALSE = @USING_DARWIN_CRT_FALSE@
@ -576,22 +581,18 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@
VERSION = @VERSION@
XLIB_AWT_FALSE = @XLIB_AWT_FALSE@
XLIB_AWT_TRUE = @XLIB_AWT_TRUE@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_GCJ = @ac_ct_GCJ@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -611,7 +612,10 @@ build_os = @build_os@
build_subdir = @build_subdir@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
dbexecdir = @dbexecdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_ldflags_libjava = @extra_ldflags_libjava@
gxx_include_dir = @gxx_include_dir@
@ -622,6 +626,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_subdir = @host_subdir@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -629,13 +634,16 @@ libdir = @libdir@
libexecdir = @libexecdir@
libgcj_basedir = @libgcj_basedir@
libstdcxx_incdir = @libstdcxx_incdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
mkinstalldirs = @mkinstalldirs@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@
@ -686,7 +694,7 @@ propdir = $(libdir)
db_name = classmap.db
db_pathtail = gcj-$(gcc_version)/$(db_name)
@NATIVE_TRUE@dbexec_DATA = $(db_name)
bin_SCRIPTS = addr2name.awk
bin_SCRIPTS = addr2name.awk $(am__append_4)
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated
GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
$(LDFLAGS) -o $@
@ -724,7 +732,7 @@ AM_GCJFLAGS = \
--encoding=UTF-8 \
-Wno-deprecated -fbootstrap-classes
AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_4)
AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_5)
PEDANTIC_CFLAGS = -ansi -pedantic -Wall -Wno-long-long
JCFLAGS = -g
JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
@ -748,10 +756,10 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \
libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc link.cc \
defineclass.cc interpret.cc verify.cc java/lang/Class.java \
java/lang/Object.java $(nat_source_files) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8) \
$(am__append_9) $(am__append_10) $(am__append_11) \
$(am__append_12)
java/lang/Object.java $(nat_source_files) $(am__append_6) \
$(am__append_7) $(am__append_8) $(am__append_9) \
$(am__append_10) $(am__append_11) $(am__append_12) \
$(am__append_13)
nat_files = $(nat_source_files:.cc=.lo)
xlib_nat_files = $(xlib_nat_source_files:.cc=.lo)
@ -7097,7 +7105,7 @@ gnu/gcj/xlib/natXImage.cc \
gnu/gcj/xlib/natXUnmapEvent.cc
sourcesdir = $(jardir)
headers_to_make = $(nat_headers) $(am__append_13)
headers_to_make = $(nat_headers) $(am__append_14)
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
@ -7194,6 +7202,8 @@ libgcj.spec: $(top_builddir)/config.status $(srcdir)/libgcj.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
libgcj-test.spec: $(top_builddir)/config.status $(srcdir)/libgcj-test.spec.in
cd $(top_builddir) && $(SHELL) ./config.status $@
scripts/jar: $(top_builddir)/config.status $(top_srcdir)/scripts/jar.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(toolexeclibdir)" || $(mkdir_p) "$(DESTDIR)$(toolexeclibdir)"
@ -8374,7 +8384,7 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config
$(mkdir_p) $(distdir)/. $(distdir)/.. $(distdir)/../config $(distdir)/scripts
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \

8448
libjava/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -116,9 +116,18 @@ AC_CHECK_TOOL(AS, as)
AC_CHECK_TOOL(LD, ld)
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_PROGS(JAR, [jar fastjar], false)
if test "$JAR" = false; then
AC_MSG_ERROR(jar program not found)
AC_PROG_AWK
AC_CHECK_PROGS([JAR], [jar fastjar], no)
AC_PATH_PROG([ZIP], [zip], no)
AC_PATH_PROG([UNZIP], [unzip], unzip)
AM_CONDITIONAL(BASH_JAR, test "$JAR" = no)
if test "$ZIP" = no; then
if test "$JAR" = no; then
AC_MSG_ERROR([cannot find neither zip nor jar, cannot continue])
fi
else
# InfoZIP available, use the 'guaranteed' Bourne-shell JAR to build libjava
JAR=`pwd`/scripts/jar
fi
AC_PROG_INSTALL
@ -1458,6 +1467,8 @@ include/Makefile
testsuite/Makefile
])
AC_CONFIG_FILES([scripts/jar], [chmod +x scripts/jar])
AC_CONFIG_COMMANDS([default],
[# Only add multilib support code if we just rebuilt top-level Makefile.
case " $CONFIG_FILES " in

View File

@ -87,6 +87,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BACKTRACESPEC = @BACKTRACESPEC@
BASH_JAR_FALSE = @BASH_JAR_FALSE@
BASH_JAR_TRUE = @BASH_JAR_TRUE@
CAIRO_CFLAGS = @CAIRO_CFLAGS@
CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
@ -124,6 +126,7 @@ GCSPEC = @GCSPEC@
GCTESTSPEC = @GCTESTSPEC@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
GTK_CAIRO_FALSE = @GTK_CAIRO_FALSE@
GTK_CAIRO_TRUE = @GTK_CAIRO_TRUE@
GTK_CFLAGS = @GTK_CFLAGS@
@ -202,6 +205,7 @@ THREADLDFLAGS = @THREADLDFLAGS@
THREADLIBS = @THREADLIBS@
THREADSPEC = @THREADSPEC@
TOOLKIT = @TOOLKIT@
UNZIP = @UNZIP@
USING_BOEHMGC_FALSE = @USING_BOEHMGC_FALSE@
USING_BOEHMGC_TRUE = @USING_BOEHMGC_TRUE@
USING_DARWIN_CRT_FALSE = @USING_DARWIN_CRT_FALSE@
@ -223,22 +227,18 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@
VERSION = @VERSION@
XLIB_AWT_FALSE = @XLIB_AWT_FALSE@
XLIB_AWT_TRUE = @XLIB_AWT_TRUE@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_GCJ = @ac_ct_GCJ@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -258,7 +258,10 @@ build_os = @build_os@
build_subdir = @build_subdir@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
dbexecdir = @dbexecdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_ldflags_libjava = @extra_ldflags_libjava@
gxx_include_dir = @gxx_include_dir@
@ -269,6 +272,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_subdir = @host_subdir@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -276,13 +280,16 @@ libdir = @libdir@
libexecdir = @libexecdir@
libgcj_basedir = @libgcj_basedir@
libstdcxx_incdir = @libstdcxx_incdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
mkinstalldirs = @mkinstalldirs@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@

View File

@ -86,6 +86,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BACKTRACESPEC = @BACKTRACESPEC@
BASH_JAR_FALSE = @BASH_JAR_FALSE@
BASH_JAR_TRUE = @BASH_JAR_TRUE@
CAIRO_CFLAGS = @CAIRO_CFLAGS@
CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
@ -123,6 +125,7 @@ GCSPEC = @GCSPEC@
GCTESTSPEC = @GCTESTSPEC@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
GTK_CAIRO_FALSE = @GTK_CAIRO_FALSE@
GTK_CAIRO_TRUE = @GTK_CAIRO_TRUE@
GTK_CFLAGS = @GTK_CFLAGS@
@ -201,6 +204,7 @@ THREADLDFLAGS = @THREADLDFLAGS@
THREADLIBS = @THREADLIBS@
THREADSPEC = @THREADSPEC@
TOOLKIT = @TOOLKIT@
UNZIP = @UNZIP@
USING_BOEHMGC_FALSE = @USING_BOEHMGC_FALSE@
USING_BOEHMGC_TRUE = @USING_BOEHMGC_TRUE@
USING_DARWIN_CRT_FALSE = @USING_DARWIN_CRT_FALSE@
@ -222,22 +226,18 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@
VERSION = @VERSION@
XLIB_AWT_FALSE = @XLIB_AWT_FALSE@
XLIB_AWT_TRUE = @XLIB_AWT_TRUE@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_GCJ = @ac_ct_GCJ@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -257,7 +257,10 @@ build_os = @build_os@
build_subdir = @build_subdir@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
dbexecdir = @dbexecdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_ldflags_libjava = @extra_ldflags_libjava@
gxx_include_dir = @gxx_include_dir@
@ -268,6 +271,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_subdir = @host_subdir@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -275,13 +279,16 @@ libdir = @libdir@
libexecdir = @libexecdir@
libgcj_basedir = @libgcj_basedir@
libstdcxx_incdir = @libstdcxx_incdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
mkinstalldirs = @mkinstalldirs@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@

523
libjava/scripts/jar.in Normal file
View File

@ -0,0 +1,523 @@
#! /bin/sh
# Copyright (C) 2006 Free Software Foundation
# Written by Paolo Bonzini.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# POSIX and NLS nuisances, taken from autoconf.
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# Also make sure CDPATH is empty, and IFS is space, tab, \n in that order.
# Be careful to avoid that editors munge IFS
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
IFS=" "" ""
"
: ${TMPDIR=/tmp}
: ${ZIP="@ZIP@"}
: ${UNZIP="@UNZIP@"}
progname="$0"
# Emit a usage message and exit with error status 1
usage () {
cat >&2 <<EOF
Usage: $0 {ctxu}[vfm0Mi@] [jar-file] [manifest-file] {[-C dir] files} ...
Options:
-c create new archive
-t list table of contents for archive
-x extract named (or all) files from archive
-u update existing archive
-v generate verbose output on standard output
-f specify archive file name
-m include manifest information from specified manifest file
-0 store only; use no ZIP compression
-M do not create a manifest file for the entries
-i generate index information for the specified jar files
-@ instead of {[-C dir] files} ... accept one or more response files,
each containing one command-line argument
-C change to the specified directory and include the following file
If any file is a directory then it is processed recursively.
The manifest file name and the archive file name needs to be specified
in the same order the 'm' and 'f' flags are specified.
Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
files in the foo/ directory into 'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ .
EOF
(exit 1); exit 1
}
# Emit an error message and exit with error status 1
error () {
echo "$progname: $*" >&2
(exit 1); exit 1
}
# Usage: copy SRC DEST
# Copy file SRC to directory DEST, which is the staging area of the jar file.
# Fail if it is already present or if it is not a regular file.
copy () {
if test -f "$1"; then
# A simple optimization. Optimistically assuming that ln will work
# cuts 60% of the run-time!
if ln "$1" "$2"/"$1" > /dev/null 2>&1; then
return 0
fi
if test -e "$2"/"$1"; then
error "$1": Duplicate entry.
fi
dir=`dirname "$1"`
$mkdir_p "$2"/"$dir"
ln "$1" "$2"/"$1" > /dev/null 2>&1 || cp "$1" "$2"/"$1"
elif test -e "$1"; then
error "$1": Invalid file type.
else
error "$1": File not found.
fi
}
# Make a temporary directory and store its name in the JARTMP variable.
make_tmp () {
test -n "$JARTMP" && return
{
JARTMP=`(umask 077 && mktemp -d "$TMPDIR/jarXXXXXX") 2>/dev/null` &&
test -n "$JARTMP" && test -d "$JARTMP"
} || {
JARTMP=$TMPDIR/jar$$-$RANDOM
(umask 077 && mkdir "$JARTMP")
} || exit $?
trap 'exit_status=$?
if test -n "$JARTMP"; then rm -rf "$JARTMP"; fi
exit $exit_status' 0
}
# Usage: make_manifest destfile kind [source-manifest]
# Create a manifest file and store it in destfile. KIND can be "default",
# or "user", in which case SOURCE-MANIFEST must be specified as well.
make_manifest () {
dir=`dirname "$1"`
$mkdir_p "$dir"
case $2 in
default)
cat > "$1" <<\EOF
Manifest-Version: 1.0
Created-By: @VERSION@
EOF
;;
user)
cp "$3" "$1"
;;
esac
}
# Usage: set_var var [value]
# Exit with an error if set_var was already called for the same VAR. Else
# set the variable VAR to the value VALUE (or the empty value if no parameter
# is given).
set_var () {
if eval test x\$set_$1 = xset; then
error Incompatible or repeated options.
else
eval $1=\$2
eval set_$1=set
fi
}
# Process the arguments, including -C options, and copy the whole tree
# to $JARTMP/files so that zip can be invoked later from there.
make_files () {
change=false
if $process_response_files; then
if test $# = 0; then
while read arg; do
make_files_1 "$arg"
done
else
for infile
do
exec 5<&0
exec 0< $infile
while read arg; do
make_files_1 "$arg"
done
exec 0<&5
exec 5<&-
done
fi
else
for arg
do
make_files_1 "$arg"
done
fi
cd "$old_dir"
}
# Usage: make_files_1 ARG
# Process one argument, ARG.
make_files_1 () {
if $change; then
change=false
if cd "$1"; then
return
else
(exit 1); exit 1
fi
fi
case "$1" in
-C)
change=:
;;
-C*)
cd `expr "$1" : '-C\(.*\)' `
return
;;
*)
if test -d "$1"; then
$mkdir_p "$JARTMP"/files/"$1"
find "$1" | while read file; do
if test -d "$file"; then
$mkdir_p "$JARTMP"/files/"$file"
else
copy "$file" "$JARTMP"/files
fi
done
else
copy "$1" "$JARTMP"/files
fi
;;
esac
cd "$old_dir"
}
# Same as "jar tf $1".
jar_list () {
$UNZIP -l "$1" | \
sed '1,/^ ----/d;/^ ----/,$d;s/^ *[0-9]* ..-..-.. ..:.. //'
}
# Same as "jar tvf $1".
jar_list_verbose () {
$UNZIP -l "$1" | \
@AWK@ 'BEGIN { yes = 0 }
/^ ----/ { yes = !yes; next }
yes {
size=$1
split ($2, d, "-")
split ($3, t, ":")
d[3] += (d[3] < 80) ? 2000 : 1900
timestamp=d[3] " " d[1] " " d[2] " " t[1] " " t[2] " 00"
gsub (/^ *[0-9]* ..-..-.. ..:.. /, "")
printf "%6d %s %s\n", size, strftime ("%a %b %d %H:%M:%S %Z %Y", mktime (timestamp)), $0
}'
}
# mkdir -p emulation based on the mkinstalldirs script.
mkdir_p ()
{
for file
do
case $file in
/*) pathcomp=/ ;;
*) pathcomp= ;;
esac
oIFS=$IFS
IFS=/
set fnord $file
shift
IFS=$oIFS
for d
do
test "x$d" = x && continue
pathcomp=$pathcomp$d
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
mkdir "$pathcomp" || lasterr=$?
test -d "$pathcomp" || errstatus=$lasterr
fi
pathcomp=$pathcomp/
done
done
return "$errstatus"
}
# Detect mkdir -p
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
mkdir_p='mkdir -p'
else
mkdir_p='mkdir_p'
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
# Process the first command line option.
case "$1" in
-*) commands=`echo X"$1" | sed 's/^X-//' ` ;;
*) commands="$1"
esac
shift
# Operation to perform on the JAR file
mode=unknown
# First -C option on the command line
cur_dir=.
# Base directory for -C options
old_dir=`pwd`
# JAR file to operate on
jarfile=
# default for no {m,M} option, user for "m" option, none for "M" option
manifest_kind=default
# "-0" if the "0" option was given
store=
# true if the "v" option was given
verbose=false
# true if the non-standard "@" option was given
process_response_files=false
# An exec command if we need to redirect the zip/unzip commands' output
out_redirect=:
while test -n "$commands"; do
# Process a letter at a time
command=`expr "$commands" : '\(.\)'`
commands=`expr "$commands" : '.\(.*\)'`
case "$command" in
c)
set_var mode create
;;
t)
set_var mode list
;;
x)
set_var mode extract
;;
u)
set_var mode update
;;
f)
test $# = 0 && usage
# Multiple "f" options are accepted by Sun's JAR tool.
jarfile="$1"
test -z "$jarfile" && usage
shift
;;
m)
test $# = 0 && usage
# Multiple "m" options are accepted by Sun's JAR tool, but
# M always overrides m.
test "$manifest_kind" = default && manifest_kind=user
manifest_file="$1"
test -z "$manifest_file" && usage
shift
;;
0)
store=-0
;;
v)
verbose=:
;;
i)
# Not yet implemented, and probably never will.
;;
M)
manifest_kind=none
;;
C)
test $# = 0 && usage
cur_dir="$1"
shift
;;
@)
process_response_files=: ;;
*)
usage ;;
esac
done
set -e
case "X$jarfile" in
X)
# Work on stdin/stdout. Messages go to stderr, and if we need an input
# JAR file we save it temporarily in the temporary directory.
make_tmp
$mkdir_p "$JARTMP"/out
jarfile="$JARTMP"/out/tmp-stdin.jar
out_redirect='exec >&2'
case $mode in
update|extract|list)
if $process_response_files && test $# = 0; then
error Cannot use stdin for response file.
fi
cat > "$JARTMP"/out/tmp-stdin.jar
;;
esac
;;
X*/*)
# Make an absolute path.
dir=`dirname "$jarfile"`
jarfile=`cd $dir && pwd`/`basename "$jarfile"`
;;
X*)
# Make an absolute path from a filename in the current directory.
jarfile=`pwd`/`basename "$jarfile"`
;;
esac
# Perform a -C option if given right away.
cd "$cur_dir"
case $mode in
unknown)
usage
;;
extract)
make_tmp
# Extract the list of files in the JAR file
jar_list "$jarfile" > "$JARTMP"/list
# If there are files on the command line, expand directories and skip -C
# command line arguments
for arg
do
if $skip; then
skip=false
continue
fi
case "$arg" in
-C) skip=: ;;
-C*) ;;
*)
escaped=`echo "X$arg" | sed 's/^X//; s/[].[^$\\*]/\\\\&/g' `
grep "^$escaped/" "$JARTMP"/list >> "$JARTMP"/chosen || :
grep "^$escaped\$" "$JARTMP"/list >> "$JARTMP"/chosen || :
esac
done
test -f "$JARTMP"/chosen || cp "$JARTMP"/list "$JARTMP"/chosen
# Really execute unzip
if $verbose; then
sort < "$JARTMP"/chosen | uniq | xargs $UNZIP -o "$jarfile" | \
sed -ne 's/^ creating/ created/p' -e 's/^ inflating/extracted/p'
else
sort < "$JARTMP"/chosen | uniq | xargs $UNZIP -o "$jarfile" > /dev/null
fi
;;
create)
make_tmp
$mkdir_p "$JARTMP"/out
$mkdir_p "$JARTMP"/files
# Do not overwrite the JAR file if something goes wrong
tmp_jarfile="$JARTMP"/out/`basename "$jarfile"`
# Prepare the files in the temporary directory. This is necessary to
# support -C and still save relative paths in the JAR file.
make_files ${1+"$@"}
if test $manifest_kind != none; then
make_manifest "$JARTMP"/files/META-INF/MANIFEST.MF $manifest_kind "$manifest_file"
fi
# Really execute zip
if $verbose; then
(eval $out_redirect; cd "$JARTMP"/files && $ZIP -rv "$tmp_jarfile" $store .)
else
(cd "$JARTMP/files" && $ZIP -r "$tmp_jarfile" $store . > /dev/null)
fi
test "$jarfile" = "$tmp_jarfile" || mv "$tmp_jarfile" "$jarfile"
;;
update)
make_tmp
$mkdir_p "$JARTMP"/files
make_files ${1+"$@"}
# Same as above, but zip takes care of not overwriting the file
case $manifest_kind in
none)
$verbose && (eval $out_redirect; echo removing manifest)
$ZIP -d "$jarfile" META-INF/MANIFEST.MF > /dev/null 2>&1 || :
;;
*)
make_manifest "$JARTMP"/files/META-INF/MANIFEST.MF $manifest_kind "$manifest_file"
;;
esac
if $verbose; then
(eval $out_redirect; cd "$JARTMP"/files && $ZIP -ruv "$jarfile" $store .)
else
(cd "$JARTMP"/files && $ZIP -ru "$jarfile" $store . > /dev/null)
fi
;;
list)
# Everything's done in the functions
if $verbose; then
jar_list_verbose "$jarfile"
else
jar_list "$jarfile"
fi ;;
esac
if test "$out_redirect" != :; then
# Cat back to stdout if necessary
case $mode in
create|update) cat "$JARTMP"/out/tmp-stdin.jar ;;
esac
fi
exit 0

View File

@ -75,6 +75,8 @@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BACKTRACESPEC = @BACKTRACESPEC@
BASH_JAR_FALSE = @BASH_JAR_FALSE@
BASH_JAR_TRUE = @BASH_JAR_TRUE@
CAIRO_CFLAGS = @CAIRO_CFLAGS@
CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
@ -112,6 +114,7 @@ GCSPEC = @GCSPEC@
GCTESTSPEC = @GCTESTSPEC@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GREP = @GREP@
GTK_CAIRO_FALSE = @GTK_CAIRO_FALSE@
GTK_CAIRO_TRUE = @GTK_CAIRO_TRUE@
GTK_CFLAGS = @GTK_CFLAGS@
@ -190,6 +193,7 @@ THREADLDFLAGS = @THREADLDFLAGS@
THREADLIBS = @THREADLIBS@
THREADSPEC = @THREADSPEC@
TOOLKIT = @TOOLKIT@
UNZIP = @UNZIP@
USING_BOEHMGC_FALSE = @USING_BOEHMGC_FALSE@
USING_BOEHMGC_TRUE = @USING_BOEHMGC_TRUE@
USING_DARWIN_CRT_FALSE = @USING_DARWIN_CRT_FALSE@
@ -211,22 +215,18 @@ USING_WIN32_THREADS_TRUE = @USING_WIN32_THREADS_TRUE@
VERSION = @VERSION@
XLIB_AWT_FALSE = @XLIB_AWT_FALSE@
XLIB_AWT_TRUE = @XLIB_AWT_TRUE@
XMKMF = @XMKMF@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZINCS = @ZINCS@
ZIP = @ZIP@
ZLIBS = @ZLIBS@
ZLIBSPEC = @ZLIBSPEC@
ZLIBTESTSPEC = @ZLIBTESTSPEC@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_GCJ = @ac_ct_GCJ@
ac_ct_LD = @ac_ct_LD@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -246,7 +246,10 @@ build_os = @build_os@
build_subdir = @build_subdir@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
dbexecdir = @dbexecdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
extra_ldflags_libjava = @extra_ldflags_libjava@
gxx_include_dir = @gxx_include_dir@
@ -257,6 +260,7 @@ host_cpu = @host_cpu@
host_os = @host_os@
host_subdir = @host_subdir@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@ -264,13 +268,16 @@ libdir = @libdir@
libexecdir = @libexecdir@
libgcj_basedir = @libgcj_basedir@
libstdcxx_incdir = @libstdcxx_incdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
mkinstalldirs = @mkinstalldirs@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
subdirs = @subdirs@