Files
mercury/scripts/Mercury.config.in
James Goddard 75f3a934e7 Have the configure script decide whether to install the Java grade.
Estimated hours taken: 8
Branches: main

Have the configure script decide whether to install the Java grade.

configure.in:
	Add Java to the list of library grades to install by default,
	if the Java SDK is installed.
	Add the option to disable the Java grade.

aclocal.m4:
	Detect whether the Java SDK is installed.  Currently this is done
	by checking for javac, java and jar, then testing whether a program
	can be compiled which confirms the version is recent enough.

scripts/Mmake.vars.in:
	Add JAVAC, JAVA_INTERPRETER and JAR to the generated make variables.
	Add JAR_CREATE_FLAGS make variable, set as "cf"

scripts/Mercury.config.in:
scripts/Mercury.config.bootstrap.in:
	Define environmental variables MERCURY_JAVA_COMPILER and
	MERCURY_JAVA_INTERPRETER.
	Have the configure script set the default java compiler and interpreter
	as part of DEFAULT_MC_FLAGS.

library/Mmakefile:
	Use "$(JAR) $(JAR_CREATE_FLAGS)" instead of "jar cf"
2004-02-11 03:50:18 +00:00

104 lines
4.1 KiB
Bash

#! /bin/sh
# @configure_input@
#---------------------------------------------------------------------------#
# Copyright (C) 2003-2004 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
#
# Mercury.config
#
# Configuration file for the Melbourne Mercury Compiler.
#
# Note to developers: when updating this file consider whether
# Mercury.config.bootstrap.in should also be updated.
#
# Environment variables: MERCURY_STDLIB_DIR, MERCURY_C_COMPILER,
# MERCURY_DEFAULT_GRADE, MERCURY_DEFAULT_OPT_LEVEL,
# MERCURY_JAVA_COMPILER, MERCURY_JAVA_INTERPRETER.
# These settings won't override settings in the environment.
MERCURY_STDLIB_DIR=@LIBDIR@
MERCURY_DEFAULT_OPT_LEVEL=-O2
MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@
MERCURY_C_COMPILER=@CC@
MERCURY_MATH_LIB=@MATH_LIB@
MERCURY_JAVA_COMPILER=@JAVAC@
MERCURY_JAVA_INTERPRETER=@JAVA_INTERPRETER@
# $(MATH_LIB) needs to be defined because it may
# be used by the substitution for SHARED_LIBS.
MATH_LIB=$(MERCURY_MATH_LIB)
DEFAULT_MERCURY_LINKAGE=@DEFAULT_LINKAGE@
# The default optimization level should be after
# all the options that describe the machine configuration.
DEFAULT_MCFLAGS=\
@ALL_LOCAL_C_INCL_DIR_MMC_OPTS@ \
@ALL_LOCAL_C_LIB_DIR_MMC_OPTS@ \
--cc "$(MERCURY_C_COMPILER)" \
--java-compiler "$(MERCURY_JAVA_COMPILER)" \
--java-interpreter "$(MERCURY_JAVA_INTERPRETER)" \
--grade "$(MERCURY_DEFAULT_GRADE)" \
--cflags-for-ansi "@CFLAGS_FOR_ANSI@" \
--cflags-for-optimization "@CFLAGS_FOR_OPT@" \
--cflags-for-warnings "@CFLAGS_FOR_WARNINGS@" \
--cflags-for-threads "@CFLAGS_FOR_THREADS@" \
--cflags-for-debug "@CFLAGS_FOR_DEBUG@" \
--cflags-for-regs "@CFLAGS_FOR_REGS@" \
--cflags-for-gotos "@CFLAGS_FOR_GOTOS@" \
--cflags-for-pic "@CFLAGS_FOR_PIC@" \
--c-flag-to-name-object-file "@OBJFILE_OPT@" \
--object-file-extension ".@OBJ_SUFFIX@" \
--pic-object-file-extension ".@EXT_FOR_PIC_OBJECTS@" \
--link-with-pic-object-file-extension ".@EXT_FOR_LINK_WITH_PIC_OBJECTS@" \
--executable-file-extension "@EXT_FOR_EXE@" \
--shared-library-extension ".@EXT_FOR_SHARED_LIB@" \
--library-extension ".@LIB_SUFFIX@" \
--create-archive-command "@AR@" \
--create-archive-command-output-flag "@AR_LIBFILE_OPT@" \
--create-archive-command-flags "@ARFLAGS@" \
--ranlib-command "@RANLIB@" \
--link-executable-command "@LINK_EXE@" \
--link-shared-lib-command "@LINK_SHARED_OBJ@" \
--trace-libs "@TRACE_LIBS_SYSTEM@" \
--thread-libs "@THREAD_LIBS@" \
--shared-libs "@SHARED_LIBS@" \
--math-lib "@MATH_LIB@" \
--readline-libs "@READLINE_LIBRARIES@" \
--linker-opt-separator "@LINK_OPT_SEP@" \
--linker-thread-flags "@LDFLAGS_FOR_THREADS@" \
--shlib-linker-thread-flags "@LD_LIBFLAGS_FOR_THREADS@" \
--linker-trace-flags "@LDFLAGS_FOR_TRACE@" \
--shlib-linker-trace-flags "@LD_LIBFLAGS_FOR_TRACE@" \
--linker-static-flags "@LD_STATIC_FLAGS@" \
--linker-strip-flag "@LD_STRIP_FLAG@" \
--linker-debug-flags "@LDFLAGS_FOR_DEBUG@" \
--shlib-linker-debug-flags "@LD_LIBFLAGS_FOR_DEBUG@" \
--linker-link-lib-flag "@LINK_LIB@" \
--linker-link-lib-suffix "@LINK_LIB_SUFFIX@" \
--shlib-linker-link-lib-flag "@LINK_LIB@" \
--shlib-linker-link-lib-suffix "@LINK_LIB_SUFFIX@" \
--linker-path-flag "@LIB_LIBPATH@" \
--linker-rpath-flag "@EXE_RPATH_OPT@" \
--linker-rpath-separator "@EXE_RPATH_SEP@" \
--shlib-linker-rpath-flag "@SHLIB_RPATH_OPT@" \
--shlib-linker-rpath-separator "@SHLIB_RPATH_SEP@" \
--linker-allow-undefined-flag "@ALLOW_UNDEFINED@" \
--linker-error-undefined-flag "@ERROR_UNDEFINED@" \
--fullarch "@FULLARCH@" \
--install-prefix "@INSTALL_PREFIX@" \
--num-real-r-regs "@NUM_REAL_R_REGS@" \
--num-real-r-temps "@NUM_REAL_R_TEMPS@" \
--conf-low-tag-bits "@LOW_TAG_BITS@" \
--bits-per-word "@BITS_PER_WORD@" \
--bytes-per-word "@BYTES_PER_WORD@" \
--dotnet-library-version "@MS_DOTNET_LIBRARY_VERSION@" \
@HAVE_DELAY_SLOT@ \
@HAVE_BOXED_FLOATS@ \
@MCFLAGS_FOR_CC@ \
$(MERCURY_DEFAULT_OPT_LEVEL) \
@MMC_USE_SYMLINKS_OPT@ \
@LIBGRADE_OPTS@