Mercurial > hg > icepick
changeset 0:39481a565648
Initial import of the original IcePick
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Wed, 28 Nov 2007 16:17:01 +0000 |
parents | |
children | bda6762b6de3 |
files | Makefile.am autogen.sh configure.ac m4/acinclude.m4 tools/apt.in tools/javac.in tools/javadoc.in tools/javah.in |
diffstat | 8 files changed, 960 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile.am Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,160 @@ +## Input file for automake to generate the Makefile.in used by configure + +ACLOCAL_AMFLAGS = -I m4 ${LOCAL_AUTORECONF_FLAGS} + +# version info for generated compiler + +JDK_VERSION = 1.7.0 +RELEASE=$(JDK_VERSION)-opensource +BUILD_NUMBER = b00 +USER_RELEASE_SUFFIX := $(shell echo $(USER)_`date '+%d_%b_%Y_%H_%M' | tr "A-Z" "a-z"`) +FULL_VERSION = $(RELEASE)-$(USER_RELEASE_SUFFIX)-$(BUILD_NUMBER) + +# Setup the compiler to use the GNU Classpath library we just built. +if FOUND_ECJ +JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -bootclasspath $(PATH_TO_GLIBJ_ZIP) -classpath .:$(USER_CLASSLIB) +else +if FOUND_JAVAC +JCOMPILER = $(JAVAC) -encoding UTF-8 -bootclasspath $(PATH_TO_GLIBJ_ZIP) -classpath .:$(GLIBJ_CLASSPATH) +else +error dunno how to setup the JCOMPILER and compile +endif +endif + +bin_SCRIPTS = tools/apt tools/javac tools/javah tools/javadoc +bin_PROGRAMS = + +EXTRA_DIST = tools/apt.in tools/javac.in tools/javah.in tools/javadoc.in + +# All our example java source files +OPENJDK_CLASSES = $(OPENJDK_SRC_DIR)/j2se/src/share/classes +TOOLS_JAVA_FILES = $(OPENJDK_CLASSES)/com/sun/tools/apt/Main.java \ + $(OPENJDK_CLASSES)/com/sun/javadoc/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/comp/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/main/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/mirror/apt/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/mirror/type/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/mirror/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/mirror/declaration/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/apt/mirror/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/api/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/jvm/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/sym/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/code/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/comp/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/main/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/tree/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/model/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/parser/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/processing/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javah/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javah/oldjavah/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/javadoc/*.java \ + $(OPENJDK_CLASSES)/com/sun/mirror/apt/*.java \ + $(OPENJDK_CLASSES)/com/sun/mirror/type/*.java \ + $(OPENJDK_CLASSES)/com/sun/mirror/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/mirror/declaration/*.java \ + $(OPENJDK_CLASSES)/com/sun/source/tree/*.java \ + $(OPENJDK_CLASSES)/com/sun/source/util/*.java \ + $(OPENJDK_CLASSES)/javax/lang/model/type/*.java \ + $(OPENJDK_CLASSES)/javax/lang/model/util/*.java \ + $(OPENJDK_CLASSES)/javax/lang/model/*.java \ + $(OPENJDK_CLASSES)/javax/lang/model/element/*.java \ + $(OPENJDK_CLASSES)/javax/tools/*.java \ + $(OPENJDK_CLASSES)/javax/annotation/processing/*.java \ + $(OPENJDK_CLASSES)/sun/tools/asm/*.java \ + $(OPENJDK_CLASSES)/sun/tools/java/*.java \ + $(OPENJDK_CLASSES)/sun/tools/javac/*.java \ + $(OPENJDK_CLASSES)/sun/tools/tree/*.java \ + $(OPENJDK_CLASSES)/sun/tools/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/formats/html/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/formats/html/markup/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/internal/toolkit/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/internal/toolkit/builders/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/internal/toolkit/taglets/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/internal/toolkit/util/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/internal/toolkit/util/links/*.java \ + $(OPENJDK_CLASSES)/com/sun/tools/doclets/standard/*.java \ + $(srcdir)/com/sun/tools/javac/resources/version.java + +# The zip files with classes we want to produce. +TOOLS_ZIP = tools.jar + +# Extra objects that will not exist until configure-time +BUILT_SOURCES = $(TOOLS_ZIP) + +# All the files we find "interesting" +ALL_TOOLS_FILES = $(TOOLS_JAVA_FILES) + +# Some architecture independent data to be installed. +TOOLS_DATA = $(TOOLS_ZIP) + +# Where we want these data files installed. +TOOLSdir = $(libdir) + +# Make sure everything is included in the distribution. +dist-hook: + srcdir_cnt=`echo $(srcdir) | wc -c`; \ + for file in $(ALL_TOOLS_FILES); do \ + f=`echo $$file | cut -c$$srcdir_cnt-`; \ + fdir=`dirname $$f`; \ + if test ! -d $(distdir)/$$fdir; then \ + echo "$(makeinstalldirs) $(distdir)/$$fdir"; \ + $(mkinstalldirs) $(distdir)/$$fdir; \ + fi; \ + echo "cp -p $$file $(distdir)/$$f"; \ + cp -p $$file $(distdir)/$$f; \ + done + +$(srcdir)/com/sun/tools/javac/resources/version.java: \ + $(OPENJDK_CLASSES)/com/sun/tools/javac/resources/version-template.java + $(MKDIR) -p $(@D) + $(SED) -e 's/$$(JDK_VERSION)/$(JDK_VERSION)/' \ + -e 's/$$(FULL_VERSION)/$(FULL_VERSION)/' \ + -e 's/$$(RELEASE)/$(RELEASE)/' \ + < $< > $@ + +# To generate the example zip just depend on the sources and ignore +# the class files. Always regenerate all .class files and remove them +# immediately. And copy the template files we use to the classes dir +# so they get also included. +$(TOOLS_ZIP): $(TOOLS_JAVA_FILES) + @rm -rf classes + $(MKDIR) classes +# $(FIND) $(srcdir)/com $(srcdir)/javax \ +# -name '*.java' -print > classes.lst + echo $(TOOLS_JAVA_FILES) > classes.lst + $(JCOMPILER) -g -d classes @classes.lst +## Copy over tools resource files. +#mkdir classes/com/sun/tools/apt/resources +#mkdir classes/com/sun/tools/javah/resources +#mkdir classes/com/sun/tools/javah/oldjavah/resources +#mkdir classes/com/sun/tools/javadoc/resources + @list=`cd $(OPENJDK_CLASSES) && $(FIND) com/sun/tools/{javac,javadoc,apt,javah,doclets} -name \*\.properties -print`; cd $(top_srcdir); for p in $$list; do \ + dirname=`dirname $$p`; \ + if ! test -d classes/"$$dirname"; then mkdir -p classes/"$$dirname"; fi; \ + cp $(OPENJDK_CLASSES)/$$p classes/$$p; \ + done + @list=`cd $(OPENJDK_CLASSES)/com/sun/tools/jdi && $(FIND) META-INF -name CVS -prune -o -name \*\.in -prune -o -type f -print`; for p in $$list; do \ + dirname=`dirname $$p`; \ + if ! test -d classes/"$$dirname"; then mkdir -p classes/"$$dirname"; fi; \ + cp $(OPENJDK_CLASSES)/com/sun/tools/jdi/$$p classes/$$p; \ + done +## First add classpath tools stuff. + (cd classes; \ + if test "$(ZIP)" != ""; then $(ZIP) -r ../$(TOOLS_ZIP) .; fi; \ + if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(TOOLS_ZIP) .; fi; \ + cd ..) +#rm -rf classes + +# Zip file be gone! (and make sure the classes are gone too) +clean-local: + rm -rf $(TOOLS_ZIP) classes classes.lst + +# FIXME: remove this when GNU Classpath includes a bootstrap VM. +installcheck-binSCRIPTS: + :
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autogen.sh Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,36 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir +PROJECT=classpath +TEST_TYPE=-f +FILE=tools/javadoc.in + +DIE=0 + +test $TEST_TYPE $FILE || { + echo "You must run this script in the top-level $PROJECT directory" + exit 1 +} + +if test "x$AUTOGEN_SUBDIR_MODE" = "xyes"; then + if test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish " + echo "to pass any to it, please specify them on the $0 command line." + fi +fi + +autoreconf --force --install --warnings=no-portability || exit $? + +cd $ORIGDIR || exit $? + +if test "x$AUTOGEN_SUBDIR_MODE" = "xyes"; then + $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $? + + echo + echo "Now type 'make' to compile $PROJECT." +fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/configure.ac Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,102 @@ +dnl Process this file with autoconf to produce a configure script. + +dnl ----------------------------------------------------------- +dnl Turning off cache for debug reasons +dnl ----------------------------------------------------------- +dnl define([AC_CACHE_LOAD], )dnl +dnl define([AC_CACHE_SAVE], )dnl + +AC_INIT([IcePick],[0.01],[classpath@gnu.org],[icedpick]) +AC_CONFIG_SRCDIR(tools/javadoc.in) + +AC_CANONICAL_TARGET + +AC_PREREQ(2.59) +AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar -Wno-portability]) +AC_PREFIX_DEFAULT(/usr/local/icepick) + +dnl ----------------------------------------------------------- +dnl Sets the VM name for use in tool wrapper scripts +dnl ----------------------------------------------------------- +AC_ARG_WITH([vm], + [AS_HELP_STRING(--with-vm,sets the VM binary name [default='${prefix}/bin/java'])], + [ + VM_BINARY=${withval} + ], + [ + VM_BINARY='${prefix}/bin/java' + ]) + +AC_SUBST(VM_BINARY) +AM_CONDITIONAL(FOUND_CACAO, test "x`basename $VM_BINARY`" = xcacao) + +AC_PROG_INSTALL + +AC_PATH_PROG(MKDIR, mkdir) +AC_PATH_PROG(SED, sed) +AC_PATH_PROG(FIND, find) +AC_PATH_PROG(ZIP, zip) +AC_ARG_WITH([fastjar], + [AS_HELP_STRING([--with-fastjar=PATH], [define to use a fastjar style tool])], + [ + AC_MSG_CHECKING([for user supplied fastjar]) + FASTJAR=${withval} + AC_MSG_RESULT([${FASTJAR}]) + ], + [AC_PATH_PROG(FASTJAR, fastjar)]) +dnl We disable ZIP by default if we find fastjar. + if test x"${FASTJAR}" != x; then + ZIP="" + fi + +CLASSPATH_FIND_JAVAC + +CLASSPATH_WITH_CLASSLIB + +WITH_OPENJDK_SRC_DIR + +dnl ----------------------------------------------------------- +dnl Initialize maintainer mode +dnl ----------------------------------------------------------- +AM_MAINTAINER_MODE + +dnl ----------------------------------------------------------------------- +dnl Support for using a prebuilt class library +dnl ----------------------------------------------------------------------- +AC_ARG_WITH([glibj_zip], + AS_HELP_STRING([--with-glibj-zip=ABS.PATH], + [use prebuilt glibj.zip class library])) + +case "$with_glibj_zip" in +"") + use_glibj_zip=false + ;; +"no" ) + use_glibj_zip=false + ;; +"yes") + AC_MSG_ERROR([Please suply an absolute path to a prebuilt glibj.zip]) + ;; +*) + use_glibj_zip=true + PATH_TO_GLIBJ_ZIP=$with_glibj_zip + ;; +esac; + +AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue) +AC_SUBST(PATH_TO_GLIBJ_ZIP) + +dnl ----------------------------------------------------------- +dnl output files +dnl ----------------------------------------------------------- +AC_CONFIG_FILES([Makefile +tools/apt +tools/javac +tools/javah +tools/javadoc]) + +AC_CONFIG_COMMANDS([apt],[chmod 755 tools/apt]) +AC_CONFIG_COMMANDS([javac],[chmod 755 tools/javac]) +AC_CONFIG_COMMANDS([javah],[chmod 755 tools/javah]) +AC_CONFIG_COMMANDS([javadoc],[chmod 755 tools/javadoc]) +AC_OUTPUT
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/acinclude.m4 Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,474 @@ +dnl Used by aclocal to generate configure + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_FIND_JAVAC], +[ + user_specified_javac= + +dnl CLASSPATH_WITH_GCJ +dnl CLASSPATH_WITH_JIKES +dnl CLASSPATH_WITH_KJC + CLASSPATH_WITH_ECJ + CLASSPATH_WITH_JAVAC + + if test "x${user_specified_javac}" = x; then +dnl AM_CONDITIONAL(FOUND_GCJ, test "x${GCJ}" != x) +dnl AM_CONDITIONAL(FOUND_JIKES, test "x${JIKES}" != x) + AM_CONDITIONAL(FOUND_ECJ, test "x${ECJ}" != x) + AM_CONDITIONAL(FOUND_JAVAC, test "x${JAVAC}" != x) + else +dnl AM_CONDITIONAL(FOUND_GCJ, test "x${user_specified_javac}" = xgcj) +dnl AM_CONDITIONAL(FOUND_JIKES, test "x${user_specified_javac}" = xjikes) + AM_CONDITIONAL(FOUND_ECJ, test "x${user_specified_javac}" = xecj) + AM_CONDITIONAL(FOUND_JAVAC, test "x${user_specified_javac}" = xjavac) + fi +dnl AM_CONDITIONAL(FOUND_KJC, test "x${user_specified_javac}" = xkjc) + +dnl if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc; then + if test "x${ECJ}" = x && test "x${JAVAC}" = x && test "x${user_specified_javac}" != xecj; then + AC_MSG_ERROR([cannot find javac, try --with-ecj]) + fi +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_GCJ], +[ + AC_ARG_WITH([gcj], + [AS_HELP_STRING(--with-gcj,bytecode compilation with gcj)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_GCJ(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_GCJ + fi + fi + user_specified_javac=gcj + ], + [ + CLASSPATH_CHECK_GCJ + ]) + AC_SUBST(GCJ) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_GCJ], +[ + if test "x$1" != x; then + if test -f "$1"; then + GCJ="$1" + else + AC_PATH_PROG(GCJ, "$1") + fi + else + AC_PATH_PROG(GCJ, "gcj") + fi + dnl Test the given GCJ, but use it as C (!) compiler to check version + if test "x$GCJ" != x; then + AC_MSG_CHECKING([gcj version 4.0]) + AC_LANG_PUSH([C]) + AC_LANG_CONFTEST( + [[#if __GNUC__ <= 3 + #error GCJ 4.0.0 or higher is required + #endif + ]]) + $GCJ -E conftest.c > /dev/null + gcj_4_result=$? + if test "x$gcj_4_result" = "x0"; then + AC_MSG_RESULT([4.0 or higher found]) + else + AC_MSG_WARN([4.0 or higher required]) + fi + AC_LANG_POP + fi +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_JIKES], +[ + AC_ARG_WITH([jikes], + [AS_HELP_STRING(--with-jikes,bytecode compilation with jikes)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_JIKES(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_JIKES + fi + fi + user_specified_javac=jikes + ], + [ + CLASSPATH_CHECK_JIKES + ]) + AC_SUBST(JIKES) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_JIKES], +[ + if test "x$1" != x; then + if test -f "$1"; then + JIKES="$1" + else + AC_PATH_PROG(JIKES, "$1") + fi + else + AC_PATH_PROG(JIKES, "jikes") + fi + if test "x$JIKES" != "x"; then + dnl Require at least version 1.19 + AC_MSG_CHECKING(jikes version) + JIKES_VERSION=`$JIKES --version | awk '/^Jikes Compiler/' | cut -d ' ' -f 5` + JIKES_VERSION_MAJOR=`echo "$JIKES_VERSION" | cut -d '.' -f 1` + JIKES_VERSION_MINOR=`echo "$JIKES_VERSION" | cut -d '.' -f 2` + if expr "$JIKES_VERSION_MAJOR" = 1 > /dev/null; then + if expr "$JIKES_VERSION_MINOR" \< 19 > /dev/null; then + JIKES="" + fi + fi + if test "x$JIKES" != "x"; then + AC_MSG_RESULT($JIKES_VERSION) + else + AC_MSG_WARN($JIKES_VERSION: jikes 1.19 or higher required) + fi + + JIKESENCODING= + if test -n "`$JIKES --help 2>&1 | grep encoding`"; then + JIKESENCODING='-encoding UTF-8' + fi + AC_SUBST(JIKESENCODING) + + JIKESWARNINGS="+Pno-switchcheck" + if test "x$JIKES_VERSION_MAJOR" = x"1" ; then + if ! test "x$JIKES_VERSION_MINOR" = x"19"; then + JIKESWARNINGS="$JIKESWARNINGS +Pno-shadow" + fi + fi + AC_SUBST(JIKESWARNINGS) + + fi +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_KJC], +[ + AC_ARG_WITH([kjc], + [AS_HELP_STRING(--with-kjc,bytecode compilation with kjc)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_KJC(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_KJC + fi + fi + user_specified_javac=kjc + ], + [ + CLASSPATH_CHECK_KJC + ]) + AC_SUBST(KJC) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_KJC], +[ + if test "x$1" != x; then + if test -f "$1"; then + KJC="$1" + else + AC_PATH_PROG(KJC, "$1") + fi + else + AC_PATH_PROG(KJC, "kJC") + fi +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_JAVAH], +[ + AC_ARG_WITH([javah], + [AS_HELP_STRING(--with-javah,specify path or name of a javah-like program)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_JAVAH(${withval}) + else + CLASSPATH_CHECK_JAVAH + fi + ], + [ + CLASSPATH_CHECK_JAVAH + ]) + AC_SUBST(USER_JAVAH) +]) + +dnl ----------------------------------------------------------- +dnl Checking for a javah like program +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_JAVAH], +[ + if test "x$1" != x; then + if test -f "$1"; then + USER_JAVAH="$1" + else + AC_PATH_PROG(USER_JAVAH, "$1") + fi + else + AC_PATH_PROGS([USER_JAVAH],[gjavah gcjh-wrapper-4.1 gcjh-4.1 gcjh javah]) + fi + + if test "x${USER_JAVAH}" = x; then + AC_MSG_ERROR([can not find javah]) + fi +]) + +dnl ----------------------------------------------------------- +dnl CLASSPATH_WITH_CLASSLIB - checks for user specified classpath additions +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_CLASSLIB], +[ + AC_ARG_WITH([classpath], + [AS_HELP_STRING(--with-classpath,specify path to a classes.zip like file)], + [ + if test "x${withval}" = xyes; then + # set user classpath to CLASSPATH from env + AC_MSG_CHECKING(for classlib) + USER_CLASSLIB=${CLASSPATH} + AC_SUBST(USER_CLASSLIB) + AC_MSG_RESULT(${USER_CLASSLIB}) + conditional_with_classlib=true + elif test "x${withval}" != x && test "x${withval}" != xno; then + # set user classpath to specified value + AC_MSG_CHECKING(for classlib) + USER_CLASSLIB=${withval} + AC_SUBST(USER_CLASSLIB) + AC_MSG_RESULT(${withval}) + conditional_with_classlib=true + fi + ], + [ conditional_with_classlib=false ]) + AM_CONDITIONAL(USER_SPECIFIED_CLASSLIB, test "x${conditional_with_classlib}" = xtrue) + + AC_ARG_WITH([vm-classes], + [AS_HELP_STRING(--with-vm-classes,specify path to VM override source files)], [vm_classes="$with_vm_classes"], + [vm_classes='${top_srcdir}/vm/reference']) + AC_SUBST(vm_classes) +]) + +dnl ----------------------------------------------------------- +dnl CLASSPATH_WITH_GLIBJ - specify what to install +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_GLIBJ], +[ + AC_PATH_PROG(ZIP, zip) + AC_ARG_WITH([fastjar], + [AS_HELP_STRING([--with-fastjar=PATH], [define to use a fastjar style tool])], + [ + AC_MSG_CHECKING([for user supplied fastjar]) + FASTJAR=${withval} + AC_MSG_RESULT([${FASTJAR}]) + ], + [AC_PATH_PROG(FASTJAR, fastjar)]) +dnl We disable ZIP by default if we find fastjar. + if test x"${FASTJAR}" != x; then + ZIP="" + fi + + AC_ARG_WITH([glibj], + [AS_HELP_STRING([--with-glibj],[define what to install (zip|flat|both|none|build) [default=zip]])], + [ + if test "x${withval}" = xyes || test "x${withval}" = xzip; then + install_class_files=no + build_class_files=yes + use_zip=yes + elif test "x${withval}" = xboth; then + install_class_files=yes + build_class_files=yes + use_zip=yes + elif test "x${withval}" = xflat; then + install_class_files=yes + build_class_files=yes + use_zip=no + elif test "x${withval}" = xno || test "x${withval}" = xnone; then + install_class_files=no + build_class_files=no + use_zip=no + elif test "x${withval}" = xbuild; then + install_class_files=no + build_class_files=yes + use_zip=no + else + AC_MSG_ERROR([unknown value given to --with-glibj]) + fi + ], + [ + install_class_files=no + use_zip=yes + ]) + AM_CONDITIONAL(INSTALL_GLIBJ_ZIP, test "x${use_zip}" = xyes) + AM_CONDITIONAL(INSTALL_CLASS_FILES, test "x${install_class_files}" = xyes) + AM_CONDITIONAL(BUILD_CLASS_FILES, test "x${build_class_files}" = xyes) + + AC_ARG_ENABLE([examples], + [AS_HELP_STRING(--enable-examples,enable build of the examples [default=yes])], + [case "${enableval}" in + yes) EXAMPLESDIR="examples" ;; + no) EXAMPLESDIR="" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-examples) ;; + esac], + [EXAMPLESDIR="examples"]) + if test "x${use_zip}" = xno && test "x${install_class_files}" = xno; then + EXAMPLESDIR="" + fi + AC_SUBST(EXAMPLESDIR) +]) + +dnl ----------------------------------------------------------- +dnl Enable generation of API documentation, with gjdoc if it +dnl has been compiled to an executable (or a suitable script +dnl is in your PATH) or using the argument as gjdoc executable. +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_GJDOC], +[ + AC_ARG_WITH([gjdoc], + AS_HELP_STRING([--with-gjdoc], + [generate documentation using gjdoc (default is NO)]), + [if test "x${withval}" = xno; then + WITH_GJDOC=no; + elif test "x${withval}" = xyes -o "x{withval}" = x; then + WITH_GJDOC=yes; + AC_PATH_PROG(GJDOC, gjdoc, "no") + if test "x${GJDOC}" = xno; then + AC_MSG_ERROR("gjdoc executable not found"); + fi + else + WITH_GJDOC=yes + GJDOC="${withval}" + AC_CHECK_FILE(${GJDOC}, AC_SUBST(GJDOC), + AC_MSG_ERROR("Cannot use ${withval} as gjdoc executable since it doesn't exist")) + fi], + [WITH_GJDOC=no]) + + AM_CONDITIONAL(CREATE_API_DOCS, test "x${WITH_GJDOC}" = xyes) +]) + +dnl ----------------------------------------------------------- +dnl Enable regeneration of parsers using jay +dnl http://www.informatik.uni-osnabrueck.de/alumni/bernd/jay/ +dnl ----------------------------------------------------------- +AC_DEFUN([REGEN_WITH_JAY], +[ + AC_ARG_WITH([jay], + [AS_HELP_STRING(--with-jay,Regenerate the parsers with jay must be given the path to the jay executable)], + [ + if test -d "${withval}"; then + JAY_DIR_PATH="${withval}" + AC_PATH_PROG(JAY, jay, "no", ${JAY_DIR_PATH}) + if test "x${JAY}" = xno; then + AC_MSG_ERROR("jay executable not found"); + fi + else + JAY_DIR_PATH=`dirname "${withval}"` + JAY="${withval}" + AC_SUBST(JAY) + fi + JAY_SKELETON="${JAY_DIR_PATH}/skeleton" + AC_CHECK_FILE(${JAY_SKELETON}, AC_SUBST(JAY_SKELETON), + AC_MSG_ERROR("Expected skeleton file in `dirname ${withval}`")) + JAY_FOUND=yes + ], + [ + JAY_FOUND=no + ]) + AM_CONDITIONAL(REGEN_PARSERS, test "x${JAY_FOUND}" = xyes) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_ECJ], +[ + AC_ARG_WITH([ecj], + [AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_ECJ(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_ECJ + fi + fi + user_specified_javac=ecj + ], + [ + CLASSPATH_CHECK_ECJ + ]) + AC_SUBST(ECJ) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_ECJ], +[ + if test "x$1" != x; then + if test -f "$1"; then + ECJ="$1" + else + AC_PATH_PROG(ECJ, "$1") + fi + else + AC_PATH_PROG(ECJ, "ecj") + fi +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_JAVAC], +[ + AC_ARG_WITH([javac], + [AS_HELP_STRING(--with-javac,bytecode compilation with javac)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_JAVAC(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_JAVAC + fi + fi + user_specified_javac=javac + ], + [ + CLASSPATH_CHECK_JAVAC + ]) + AC_SUBST(JAVAC) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_JAVAC], +[ + if test "x$1" != x; then + if test -f "$1"; then + JAVAC="$1" + else + AC_PATH_PROG(JAVAC, "$1") + fi + else + AC_PATH_PROG(JAVAC, "javac") + fi +]) + +AC_DEFUN([WITH_OPENJDK_SRC_DIR], +[ + AC_MSG_CHECKING(openjdk sources) + AC_ARG_WITH([openjdk-src-dir], + [AS_HELP_STRING(--with-openjdk-src-dir,specify the location of the openjdk sources)], + [ + OPENJDK_SRC_DIR=${withval} + AC_MSG_RESULT(${withval}) + conditional_with_openjdk_sources=true + ], + [ + conditional_with_openjdk_sources=false + OPENJDK_SRC_DIR=`pwd`/openjdk + AC_MSG_RESULT(${OPENJDK_SRC_DIR}) + ]) + AC_SUBST(OPENJDK_SRC_DIR) + AM_CONDITIONAL(GNU_CLASSLIB_FOUND, test "x${conditional_with_openjdk_sources}" = xtrue) +])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/apt.in Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,47 @@ +#!/bin/sh + +## Copyright (C) 2006 Free Software Foundation, Inc. +## +## This file is a part of GNU Classpath. +## +## GNU Classpath 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. +## +## GNU Classpath 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 GNU Classpath; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +## USA. +## +## Linking this library statically or dynamically with other modules is +## making a combined work based on this library. Thus, the terms and +## conditions of the GNU General Public License cover the whole +## combination. +## +## As a special exception, the copyright holders of this library give you +## permission to link this library with independent modules to produce an +## executable, regardless of the license terms of these independent +## modules, and to copy and distribute the resulting executable under +## terms of your choice, provided that you also meet, for each linked +## independent module, the terms and conditions of the license of that +## module. An independent module is a module which is not derived from +## or based on this library. If you modify this library, you may extend +## this exception to your version of the library, but you are not +## obligated to do so. If you do not wish to do so, delete this +## exception statement from your version. +## +## A simple shell script to launch the GNU Classpath appletviewer tool. +## + +prefix=@prefix@ +datarootdir=@datarootdir@ +tools_dir=${prefix}/lib +tools_cp=${tools_dir}/tools.jar + +exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" com.sun.tools.apt.Main "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/javac.in Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,47 @@ +#!/bin/sh + +## Copyright (C) 2006 Free Software Foundation, Inc. +## +## This file is a part of GNU Classpath. +## +## GNU Classpath 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. +## +## GNU Classpath 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 GNU Classpath; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +## USA. +## +## Linking this library statically or dynamically with other modules is +## making a combined work based on this library. Thus, the terms and +## conditions of the GNU General Public License cover the whole +## combination. +## +## As a special exception, the copyright holders of this library give you +## permission to link this library with independent modules to produce an +## executable, regardless of the license terms of these independent +## modules, and to copy and distribute the resulting executable under +## terms of your choice, provided that you also meet, for each linked +## independent module, the terms and conditions of the license of that +## module. An independent module is a module which is not derived from +## or based on this library. If you modify this library, you may extend +## this exception to your version of the library, but you are not +## obligated to do so. If you do not wish to do so, delete this +## exception statement from your version. +## +## A simple shell script to launch the GNU Classpath appletviewer tool. +## + +prefix=@prefix@ +datarootdir=@datarootdir@ +tools_dir=${prefix}/lib +tools_cp=${tools_dir}/tools.jar + +exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" com.sun.tools.javac.Main "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/javadoc.in Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,47 @@ +#!/bin/sh + +## Copyright (C) 2006 Free Software Foundation, Inc. +## +## This file is a part of GNU Classpath. +## +## GNU Classpath 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. +## +## GNU Classpath 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 GNU Classpath; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +## USA. +## +## Linking this library statically or dynamically with other modules is +## making a combined work based on this library. Thus, the terms and +## conditions of the GNU General Public License cover the whole +## combination. +## +## As a special exception, the copyright holders of this library give you +## permission to link this library with independent modules to produce an +## executable, regardless of the license terms of these independent +## modules, and to copy and distribute the resulting executable under +## terms of your choice, provided that you also meet, for each linked +## independent module, the terms and conditions of the license of that +## module. An independent module is a module which is not derived from +## or based on this library. If you modify this library, you may extend +## this exception to your version of the library, but you are not +## obligated to do so. If you do not wish to do so, delete this +## exception statement from your version. +## +## A simple shell script to launch the GNU Classpath appletviewer tool. +## + +prefix=@prefix@ +datarootdir=@datarootdir@ +tools_dir=${prefix}/lib +tools_cp=${tools_dir}/tools.jar + +exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" com.sun.tools.javadoc.Main "$@"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/javah.in Wed Nov 28 16:17:01 2007 +0000 @@ -0,0 +1,47 @@ +#!/bin/sh + +## Copyright (C) 2006 Free Software Foundation, Inc. +## +## This file is a part of GNU Classpath. +## +## GNU Classpath 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. +## +## GNU Classpath 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 GNU Classpath; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +## USA. +## +## Linking this library statically or dynamically with other modules is +## making a combined work based on this library. Thus, the terms and +## conditions of the GNU General Public License cover the whole +## combination. +## +## As a special exception, the copyright holders of this library give you +## permission to link this library with independent modules to produce an +## executable, regardless of the license terms of these independent +## modules, and to copy and distribute the resulting executable under +## terms of your choice, provided that you also meet, for each linked +## independent module, the terms and conditions of the license of that +## module. An independent module is a module which is not derived from +## or based on this library. If you modify this library, you may extend +## this exception to your version of the library, but you are not +## obligated to do so. If you do not wish to do so, delete this +## exception statement from your version. +## +## A simple shell script to launch the GNU Classpath appletviewer tool. +## + +prefix=@prefix@ +datarootdir=@datarootdir@ +tools_dir=${prefix}/lib +tools_cp=${tools_dir}/tools.jar + +exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}" com.sun.tools.javah.Main "$@"