8001931: The new build system whitespace cleanup

Reviewed-by: tbell, simonis, erikj
This commit is contained in:
Magnus Ihse Bursie 2013-10-10 14:58:19 +02:00
parent 3cb6eedf9f
commit 952d9ce87c
40 changed files with 10108 additions and 10122 deletions

View File

@ -24,7 +24,7 @@
# #
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2\ # If so, then append $1 to $2 \
# Also set JVM_ARG_OK to true/false depending on outcome. # Also set JVM_ARG_OK to true/false depending on outcome.
AC_DEFUN([ADD_JVM_ARG_IF_OK], AC_DEFUN([ADD_JVM_ARG_IF_OK],
[ [
@ -214,12 +214,12 @@ AC_DEFUN([BASIC_DEPRECATED_ARG_WITH],
AC_DEFUN_ONCE([BASIC_INIT], AC_DEFUN_ONCE([BASIC_INIT],
[ [
# Save the original command line. This is passed to us by the wrapper configure script. # Save the original command line. This is passed to us by the wrapper configure script.
AC_SUBST(CONFIGURE_COMMAND_LINE) AC_SUBST(CONFIGURE_COMMAND_LINE)
DATE_WHEN_CONFIGURED=`LANG=C date` DATE_WHEN_CONFIGURED=`LANG=C date`
AC_SUBST(DATE_WHEN_CONFIGURED) AC_SUBST(DATE_WHEN_CONFIGURED)
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.]) AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.]) AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
]) ])
# Test that variable $1 denoting a program is not empty. If empty, exit with an error. # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
@ -253,128 +253,128 @@ AC_DEFUN([BASIC_REQUIRE_PROG],
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
[ [
# Start with tools that do not need have cross compilation support # Start with tools that do not need have cross compilation support
# and can be expected to be found in the default PATH. These tools are # and can be expected to be found in the default PATH. These tools are
# used by configure. Nor are these tools expected to be found in the # used by configure. Nor are these tools expected to be found in the
# devkit from the builddeps server either, since they are # devkit from the builddeps server either, since they are
# needed to download the devkit. # needed to download the devkit.
# First are all the simple required tools. # First are all the simple required tools.
BASIC_REQUIRE_PROG(BASENAME, basename) BASIC_REQUIRE_PROG(BASENAME, basename)
BASIC_REQUIRE_PROG(BASH, bash) BASIC_REQUIRE_PROG(BASH, bash)
BASIC_REQUIRE_PROG(CAT, cat) BASIC_REQUIRE_PROG(CAT, cat)
BASIC_REQUIRE_PROG(CHMOD, chmod) BASIC_REQUIRE_PROG(CHMOD, chmod)
BASIC_REQUIRE_PROG(CMP, cmp) BASIC_REQUIRE_PROG(CMP, cmp)
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
BASIC_REQUIRE_PROG(CP, cp) BASIC_REQUIRE_PROG(CP, cp)
BASIC_REQUIRE_PROG(CPIO, cpio) BASIC_REQUIRE_PROG(CPIO, cpio)
BASIC_REQUIRE_PROG(CUT, cut) BASIC_REQUIRE_PROG(CUT, cut)
BASIC_REQUIRE_PROG(DATE, date) BASIC_REQUIRE_PROG(DATE, date)
BASIC_REQUIRE_PROG(DIFF, [gdiff diff]) BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
BASIC_REQUIRE_PROG(DIRNAME, dirname) BASIC_REQUIRE_PROG(DIRNAME, dirname)
BASIC_REQUIRE_PROG(ECHO, echo) BASIC_REQUIRE_PROG(ECHO, echo)
BASIC_REQUIRE_PROG(EXPR, expr) BASIC_REQUIRE_PROG(EXPR, expr)
BASIC_REQUIRE_PROG(FILE, file) BASIC_REQUIRE_PROG(FILE, file)
BASIC_REQUIRE_PROG(FIND, find) BASIC_REQUIRE_PROG(FIND, find)
BASIC_REQUIRE_PROG(HEAD, head) BASIC_REQUIRE_PROG(HEAD, head)
BASIC_REQUIRE_PROG(LN, ln) BASIC_REQUIRE_PROG(LN, ln)
BASIC_REQUIRE_PROG(LS, ls) BASIC_REQUIRE_PROG(LS, ls)
BASIC_REQUIRE_PROG(MKDIR, mkdir) BASIC_REQUIRE_PROG(MKDIR, mkdir)
BASIC_REQUIRE_PROG(MKTEMP, mktemp) BASIC_REQUIRE_PROG(MKTEMP, mktemp)
BASIC_REQUIRE_PROG(MV, mv) BASIC_REQUIRE_PROG(MV, mv)
BASIC_REQUIRE_PROG(PRINTF, printf) BASIC_REQUIRE_PROG(PRINTF, printf)
BASIC_REQUIRE_PROG(RM, rm) BASIC_REQUIRE_PROG(RM, rm)
BASIC_REQUIRE_PROG(SH, sh) BASIC_REQUIRE_PROG(SH, sh)
BASIC_REQUIRE_PROG(SORT, sort) BASIC_REQUIRE_PROG(SORT, sort)
BASIC_REQUIRE_PROG(TAIL, tail) BASIC_REQUIRE_PROG(TAIL, tail)
BASIC_REQUIRE_PROG(TAR, tar) BASIC_REQUIRE_PROG(TAR, tar)
BASIC_REQUIRE_PROG(TEE, tee) BASIC_REQUIRE_PROG(TEE, tee)
BASIC_REQUIRE_PROG(TOUCH, touch) BASIC_REQUIRE_PROG(TOUCH, touch)
BASIC_REQUIRE_PROG(TR, tr) BASIC_REQUIRE_PROG(TR, tr)
BASIC_REQUIRE_PROG(UNAME, uname) BASIC_REQUIRE_PROG(UNAME, uname)
BASIC_REQUIRE_PROG(UNIQ, uniq) BASIC_REQUIRE_PROG(UNIQ, uniq)
BASIC_REQUIRE_PROG(WC, wc) BASIC_REQUIRE_PROG(WC, wc)
BASIC_REQUIRE_PROG(WHICH, which) BASIC_REQUIRE_PROG(WHICH, which)
BASIC_REQUIRE_PROG(XARGS, xargs) BASIC_REQUIRE_PROG(XARGS, xargs)
# Then required tools that require some special treatment. # Then required tools that require some special treatment.
AC_PROG_AWK AC_PROG_AWK
BASIC_CHECK_NONEMPTY(AWK) BASIC_CHECK_NONEMPTY(AWK)
AC_PROG_GREP AC_PROG_GREP
BASIC_CHECK_NONEMPTY(GREP) BASIC_CHECK_NONEMPTY(GREP)
AC_PROG_EGREP AC_PROG_EGREP
BASIC_CHECK_NONEMPTY(EGREP) BASIC_CHECK_NONEMPTY(EGREP)
AC_PROG_FGREP AC_PROG_FGREP
BASIC_CHECK_NONEMPTY(FGREP) BASIC_CHECK_NONEMPTY(FGREP)
AC_PROG_SED AC_PROG_SED
BASIC_CHECK_NONEMPTY(SED) BASIC_CHECK_NONEMPTY(SED)
AC_PATH_PROGS(NAWK, [nawk gawk awk]) AC_PATH_PROGS(NAWK, [nawk gawk awk])
BASIC_CHECK_NONEMPTY(NAWK) BASIC_CHECK_NONEMPTY(NAWK)
# Always force rm. # Always force rm.
RM="$RM -f" RM="$RM -f"
# pwd behaves differently on various platforms and some don't support the -L flag. # pwd behaves differently on various platforms and some don't support the -L flag.
# Always use the bash builtin pwd to get uniform behavior. # Always use the bash builtin pwd to get uniform behavior.
THEPWDCMD=pwd THEPWDCMD=pwd
# These are not required on all platforms # These are not required on all platforms
AC_PATH_PROG(CYGPATH, cygpath) AC_PATH_PROG(CYGPATH, cygpath)
AC_PATH_PROG(READLINK, readlink) AC_PATH_PROG(READLINK, readlink)
AC_PATH_PROG(DF, df) AC_PATH_PROG(DF, df)
AC_PATH_PROG(SETFILE, SetFile) AC_PATH_PROG(SETFILE, SetFile)
]) ])
# Setup basic configuration paths, and platform-specific stuff related to PATHs. # Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN_ONCE([BASIC_SETUP_PATHS], AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
[ [
# Locate the directory of this script. # Locate the directory of this script.
SCRIPT="[$]0" SCRIPT="[$]0"
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L` AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
# Where is the source? It is located two levels above the configure script. # Where is the source? It is located two levels above the configure script.
CURDIR="$PWD" CURDIR="$PWD"
cd "$AUTOCONF_DIR/../.." cd "$AUTOCONF_DIR/../.."
SRC_ROOT="`$THEPWDCMD -L`" SRC_ROOT="`$THEPWDCMD -L`"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";" PATH_SEP=";"
BASIC_CHECK_PATHS_WINDOWS BASIC_CHECK_PATHS_WINDOWS
else else
PATH_SEP=":" PATH_SEP=":"
fi fi
AC_SUBST(SRC_ROOT) AC_SUBST(SRC_ROOT)
AC_SUBST(PATH_SEP) AC_SUBST(PATH_SEP)
cd "$CURDIR" cd "$CURDIR"
BASIC_FIXUP_PATH(SRC_ROOT) BASIC_FIXUP_PATH(SRC_ROOT)
BASIC_FIXUP_PATH(CURDIR) BASIC_FIXUP_PATH(CURDIR)
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
# Add extra search paths on solaris for utilities like ar and as etc... # Add extra search paths on solaris for utilities like ar and as etc...
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin" PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
fi fi
# You can force the sys-root if the sys-root encoded into the cross compiler tools # You can force the sys-root if the sys-root encoded into the cross compiler tools
# is not correct. # is not correct.
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
[pass this sys-root to the compilers and tools (for cross-compiling)])]) [pass this sys-root to the compilers and tools (for cross-compiling)])])
if test "x$with_sys_root" != x; then if test "x$with_sys_root" != x; then
SYS_ROOT=$with_sys_root SYS_ROOT=$with_sys_root
else else
SYS_ROOT=/ SYS_ROOT=/
fi fi
AC_SUBST(SYS_ROOT) AC_SUBST(SYS_ROOT)
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir], AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
[search this directory for compilers and tools (for cross-compiling)])], [search this directory for compilers and tools (for cross-compiling)])],
[TOOLS_DIR=$with_tools_dir] [TOOLS_DIR=$with_tools_dir]
) )
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit], AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this directory as base for tools-dir and sys-root (for cross-compiling)])], [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
[ [
if test "x$with_sys_root" != x; then if test "x$with_sys_root" != x; then
@ -393,12 +393,12 @@ AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
[ [
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
[use this as the name of the configuration @<:@generated from important configuration options@:>@])], [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
[ CONF_NAME=${with_conf_name} ]) [ CONF_NAME=${with_conf_name} ])
# Test from where we are running configure, in or outside of src root. # Test from where we are running configure, in or outside of src root.
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \ || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|| test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
# We are running configure from the src root. # We are running configure from the src root.
@ -411,7 +411,7 @@ if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
if test ! -d "$OUTPUT_ROOT"; then if test ! -d "$OUTPUT_ROOT"; then
AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
fi fi
else else
# We are running configure from outside of the src dir. # We are running configure from outside of the src dir.
# Then use the current directory as output dir! # Then use the current directory as output dir!
# If configuration is situated in normal build directory, just use the build # If configuration is situated in normal build directory, just use the build
@ -443,46 +443,46 @@ else
AC_MSG_ERROR([Will not continue creating configuration in $CURDIR]) AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
fi fi
fi fi
fi fi
AC_MSG_CHECKING([what configuration name to use]) AC_MSG_CHECKING([what configuration name to use])
AC_MSG_RESULT([$CONF_NAME]) AC_MSG_RESULT([$CONF_NAME])
BASIC_FIXUP_PATH(OUTPUT_ROOT) BASIC_FIXUP_PATH(OUTPUT_ROOT)
AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk) AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
AC_SUBST(CONF_NAME, $CONF_NAME) AC_SUBST(CONF_NAME, $CONF_NAME)
AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT) AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
# Most of the probed defines are put into config.h # Most of the probed defines are put into config.h
AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in]) AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
# The spec.gmk file contains all variables for the make system. # The spec.gmk file contains all variables for the make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
# The hotspot-spec.gmk file contains legacy variables for the hotspot make system. # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
# The bootcycle-spec.gmk file contains support for boot cycle builds. # The bootcycle-spec.gmk file contains support for boot cycle builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
# The compare.sh is used to compare the build output to other builds. # The compare.sh is used to compare the build output to other builds.
AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
# Spec.sh is currently used by compare-objects.sh # Spec.sh is currently used by compare-objects.sh
AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
# The generated Makefile knows where the spec.gmk is and where the source is. # The generated Makefile knows where the spec.gmk is and where the source is.
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
# which will look for generated configurations # which will look for generated configurations
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in]) AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
# Save the arguments given to us # Save the arguments given to us
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
]) ])
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING], AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
[ [
# Setup default logging of stdout and stderr to build.log in the output root. # Setup default logging of stdout and stderr to build.log in the output root.
BUILD_LOG='$(OUTPUT_ROOT)/build.log' BUILD_LOG='$(OUTPUT_ROOT)/build.log'
BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old' BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
AC_SUBST(BUILD_LOG) AC_SUBST(BUILD_LOG)
AC_SUBST(BUILD_LOG_PREVIOUS) AC_SUBST(BUILD_LOG_PREVIOUS)
AC_SUBST(BUILD_LOG_WRAPPER) AC_SUBST(BUILD_LOG_WRAPPER)
]) ])
@ -604,46 +604,46 @@ AC_DEFUN([BASIC_CHECK_FIND_DELETE],
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS], AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
[ [
BASIC_CHECK_GNU_MAKE BASIC_CHECK_GNU_MAKE
BASIC_CHECK_FIND_DELETE BASIC_CHECK_FIND_DELETE
# These tools might not be installed by default, # These tools might not be installed by default,
# need hint on how to install them. # need hint on how to install them.
BASIC_REQUIRE_PROG(UNZIP, unzip) BASIC_REQUIRE_PROG(UNZIP, unzip)
BASIC_REQUIRE_PROG(ZIP, zip) BASIC_REQUIRE_PROG(ZIP, zip)
# Non-required basic tools # Non-required basic tools
AC_PATH_PROG(LDD, ldd) AC_PATH_PROG(LDD, ldd)
if test "x$LDD" = "x"; then if test "x$LDD" = "x"; then
# List shared lib dependencies is used for # List shared lib dependencies is used for
# debug output and checking for forbidden dependencies. # debug output and checking for forbidden dependencies.
# We can build without it. # We can build without it.
LDD="true" LDD="true"
fi fi
AC_PATH_PROG(OTOOL, otool) AC_PATH_PROG(OTOOL, otool)
if test "x$OTOOL" = "x"; then if test "x$OTOOL" = "x"; then
OTOOL="true" OTOOL="true"
fi fi
AC_PATH_PROGS(READELF, [readelf greadelf]) AC_PATH_PROGS(READELF, [readelf greadelf])
AC_PATH_PROG(HG, hg) AC_PATH_PROG(HG, hg)
AC_PATH_PROG(STAT, stat) AC_PATH_PROG(STAT, stat)
AC_PATH_PROG(TIME, time) AC_PATH_PROG(TIME, time)
# Check if it's GNU time # Check if it's GNU time
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'` IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
if test "x$IS_GNU_TIME" != x; then if test "x$IS_GNU_TIME" != x; then
IS_GNU_TIME=yes IS_GNU_TIME=yes
else else
IS_GNU_TIME=no IS_GNU_TIME=no
fi fi
AC_SUBST(IS_GNU_TIME) AC_SUBST(IS_GNU_TIME)
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
BASIC_REQUIRE_PROG(COMM, comm) BASIC_REQUIRE_PROG(COMM, comm)
fi fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_REQUIRE_PROG(XATTR, xattr) BASIC_REQUIRE_PROG(XATTR, xattr)
AC_PATH_PROG(CODESIGN, codesign) AC_PATH_PROG(CODESIGN, codesign)
if test "x$CODESIGN" != "x"; then if test "x$CODESIGN" != "x"; then
@ -659,7 +659,7 @@ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
fi fi
fi fi
fi fi
]) ])
# Check if build directory is on local disk. If not possible to determine, # Check if build directory is on local disk. If not possible to determine,
@ -707,32 +707,30 @@ AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES], AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
[ [
AC_MSG_CHECKING([if build directory is on local disk])
AC_MSG_CHECKING([if build directory is on local disk]) BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
[OUTPUT_DIR_IS_LOCAL="yes"], [OUTPUT_DIR_IS_LOCAL="yes"],
[OUTPUT_DIR_IS_LOCAL="no"]) [OUTPUT_DIR_IS_LOCAL="no"])
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
BASIC_CHECK_SRC_PERMS BASIC_CHECK_SRC_PERMS
# Check if the user has any old-style ALT_ variables set. # Check if the user has any old-style ALT_ variables set.
FOUND_ALT_VARIABLES=`env | grep ^ALT_` FOUND_ALT_VARIABLES=`env | grep ^ALT_`
# Before generating output files, test if they exist. If they do, this is a reconfigure. # Before generating output files, test if they exist. If they do, this is a reconfigure.
# Since we can't properly handle the dependencies for this, warn the user about the situation # Since we can't properly handle the dependencies for this, warn the user about the situation
if test -e $OUTPUT_ROOT/spec.gmk; then if test -e $OUTPUT_ROOT/spec.gmk; then
IS_RECONFIGURE=yes IS_RECONFIGURE=yes
else else
IS_RECONFIGURE=no IS_RECONFIGURE=no
fi fi
if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
HIDE_PERFORMANCE_HINTS=yes HIDE_PERFORMANCE_HINTS=yes
else else
HIDE_PERFORMANCE_HINTS=no HIDE_PERFORMANCE_HINTS=no
# Hide it the next time around... # Hide it the next time around...
$TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1 $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
fi fi
]) ])

View File

@ -367,12 +367,12 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH], AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
[ [
# When using cygwin or msys, we need a wrapper binary that renames # When using cygwin or msys, we need a wrapper binary that renames
# /cygdrive/c/ arguments into c:/ arguments and peeks into # /cygdrive/c/ arguments into c:/ arguments and peeks into
# @files and rewrites these too! This wrapper binary is # @files and rewrites these too! This wrapper binary is
# called fixpath. # called fixpath.
FIXPATH= FIXPATH=
if test "x$OPENJDK_BUILD_OS" = xwindows; then if test "x$OPENJDK_BUILD_OS" = xwindows; then
AC_MSG_CHECKING([if fixpath can be created]) AC_MSG_CHECKING([if fixpath can be created])
FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c" FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe" FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
@ -414,7 +414,7 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then
fi fi
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
fi fi
AC_SUBST(FIXPATH) AC_SUBST(FIXPATH)
]) ])

View File

@ -79,11 +79,11 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
# Test: Is bootjdk explicitely set by command line arguments? # Test: Is bootjdk explicitely set by command line arguments?
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS], AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[ [
if test "x$with_boot_jdk" != x; then if test "x$with_boot_jdk" != x; then
BOOT_JDK=$with_boot_jdk BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments]) AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
fi fi
]) ])
# Test: Is bootjdk available from builddeps? # Test: Is bootjdk available from builddeps?
@ -218,90 +218,90 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK], AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
[ [
BOOT_JDK_FOUND=no BOOT_JDK_FOUND=no
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
# We look for the Boot JDK through various means, going from more certain to # We look for the Boot JDK through various means, going from more certain to
# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
# we detected something (if so, the path to the jdk is in BOOT_JDK). But we # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
# must check if this is indeed valid; otherwise we'll continue looking. # must check if this is indeed valid; otherwise we'll continue looking.
# Test: Is bootjdk explicitely set by command line arguments? # Test: Is bootjdk explicitely set by command line arguments?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_ARGUMENTS])
if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
# Having specified an argument which is incorrect will produce an instant failure; # Having specified an argument which is incorrect will produce an instant failure;
# we should not go on looking # we should not go on looking
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK]) AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi fi
# Test: Is bootjdk available from builddeps? # Test: Is bootjdk available from builddeps?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_BUILDDEPS])
# Test: Is $JAVA_HOME set? # Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME])
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK? # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
# Test: Is there a JDK installed in default, well-known locations? # Test: Is there a JDK installed in default, well-known locations?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS]) BOOTJDK_DO_CHECK([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS])
# If we haven't found anything yet, we've truly lost. Give up. # If we haven't found anything yet, we've truly lost. Give up.
if test "x$BOOT_JDK_FOUND" = xno; then if test "x$BOOT_JDK_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([openjdk]) HELP_MSG_MISSING_DEPENDENCY([openjdk])
AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG]) AC_MSG_NOTICE([Could not find a valid Boot JDK. $HELP_MSG])
AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk]) AC_MSG_NOTICE([This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
# Setup proper paths for what we found # Setup proper paths for what we found
BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
if test ! -f "$BOOT_RTJAR"; then if test ! -f "$BOOT_RTJAR"; then
# On MacOSX it is called classes.jar # On MacOSX it is called classes.jar
BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar" BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
if test -f "$BOOT_RTJAR"; then if test -f "$BOOT_RTJAR"; then
# Remove the .. # Remove the ..
BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
fi fi
fi fi
BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
BOOT_JDK="$BOOT_JDK" BOOT_JDK="$BOOT_JDK"
AC_SUBST(BOOT_RTJAR) AC_SUBST(BOOT_RTJAR)
AC_SUBST(BOOT_TOOLSJAR) AC_SUBST(BOOT_TOOLSJAR)
AC_SUBST(BOOT_JDK) AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK. # Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA,java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC,javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAH,javah)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAP,javap)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR,jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(RMIC,rmic)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii) BOOTJDK_CHECK_TOOL_IN_BOOTJDK(NATIVE2ASCII,native2ascii)
# Finally, set some other options... # Finally, set some other options...
# When compiling code to be executed by the Boot JDK, force jdk7 compatibility. # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
BOOT_JDK_SOURCETARGET="-source 7 -target 7" BOOT_JDK_SOURCETARGET="-source 7 -target 7"
AC_SUBST(BOOT_JDK_SOURCETARGET) AC_SUBST(BOOT_JDK_SOURCETARGET)
AC_SUBST(JAVAC_FLAGS) AC_SUBST(JAVAC_FLAGS)
]) ])
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS], AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
[ [
############################################################################## ##############################################################################
# #
# Specify options for anything that is run with the Boot JDK. # Specify options for anything that is run with the Boot JDK.
# #
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs], AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])]) e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
if test "x$with_boot_jdk_jvmargs" = x; then if test "x$with_boot_jdk_jvmargs" = x; then
# Not all JVM:s accept the same arguments on the command line. # Not all JVM:s accept the same arguments on the command line.
# OpenJDK specific increase in thread stack for JDK build, # OpenJDK specific increase in thread stack for JDK build,
# well more specifically, when running javac. # well more specifically, when running javac.
@ -329,7 +329,7 @@ if test "x$with_boot_jdk_jvmargs" = x; then
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
# Disable special log output when a debug build is used as Boot JDK... # Disable special log output when a debug build is used as Boot JDK...
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
fi fi
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs) AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
]) ])

View File

@ -53,7 +53,6 @@ AC_DEFUN([BPERF_CHECK_CORES],
AC_MSG_RESULT([could not detect number of cores, defaulting to 1]) AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
AC_MSG_WARN([This will disable all parallelism from build!]) AC_MSG_WARN([This will disable all parallelism from build!])
fi fi
]) ])
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE], AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
@ -232,20 +231,20 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS], AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
[ [
############################################################################### ###############################################################################
# #
# Can the C/C++ compiler use precompiled headers? # Can the C/C++ compiler use precompiled headers?
# #
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])], [disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes]) [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1 USE_PRECOMPILED_HEADER=1
if test "x$ENABLE_PRECOMPH" = xno; then if test "x$ENABLE_PRECOMPH" = xno; then
USE_PRECOMPILED_HEADER=0 USE_PRECOMPILED_HEADER=0
fi fi
if test "x$ENABLE_PRECOMPH" = xyes; then if test "x$ENABLE_PRECOMPH" = xyes; then
# Check that the compiler actually supports precomp headers. # Check that the compiler actually supports precomp headers.
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
AC_MSG_CHECKING([that precompiled headers work]) AC_MSG_CHECKING([that precompiled headers work])
@ -259,34 +258,34 @@ if test "x$ENABLE_PRECOMPH" = xyes; then
fi fi
rm -f conftest.h conftest.hpp.gch rm -f conftest.h conftest.hpp.gch
fi fi
fi fi
AC_SUBST(USE_PRECOMPILED_HEADER) AC_SUBST(USE_PRECOMPILED_HEADER)
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
[ [
AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java], AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])]) [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
if test "x$with_sjavac_server_java" != x; then if test "x$with_sjavac_server_java" != x; then
SJAVAC_SERVER_JAVA="$with_sjavac_server_java" SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""` FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
if test "x$FOUND_VERSION" = x; then if test "x$FOUND_VERSION" = x; then
AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA]) AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
fi fi
else else
SJAVAC_SERVER_JAVA="" SJAVAC_SERVER_JAVA=""
# Hotspot specific options. # Hotspot specific options.
ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
# JRockit specific options. # JRockit specific options.
ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA" SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
fi fi
AC_SUBST(SJAVAC_SERVER_JAVA) AC_SUBST(SJAVAC_SERVER_JAVA)
if test "$MEMORY_SIZE" -gt "2500"; then if test "$MEMORY_SIZE" -gt "2500"; then
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
if test "$JVM_ARG_OK" = true; then if test "$JVM_ARG_OK" = true; then
JVM_64BIT=true JVM_64BIT=true
@ -294,7 +293,7 @@ if test "$MEMORY_SIZE" -gt "2500"; then
fi fi
fi fi
if test "$JVM_64BIT" = true; then if test "$JVM_64BIT" = true; then
if test "$MEMORY_SIZE" -gt "17000"; then if test "$MEMORY_SIZE" -gt "17000"; then
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
@ -307,29 +306,28 @@ if test "$JVM_64BIT" = true; then
if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
fi fi
if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$JVM_ARG_OK" = false; then if test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
AC_MSG_CHECKING([whether to use sjavac]) AC_MSG_CHECKING([whether to use sjavac])
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
[use sjavac to do fast incremental compiles @<:@disabled@:>@])], [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no']) [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
AC_MSG_RESULT([$ENABLE_SJAVAC]) AC_MSG_RESULT([$ENABLE_SJAVAC])
AC_SUBST(ENABLE_SJAVAC) AC_SUBST(ENABLE_SJAVAC)
if test "x$ENABLE_SJAVAC" = xyes; then if test "x$ENABLE_SJAVAC" = xyes; then
SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers" SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
else else
SJAVAC_SERVER_DIR= SJAVAC_SERVER_DIR=
fi fi
AC_SUBST(SJAVAC_SERVER_DIR) AC_SUBST(SJAVAC_SERVER_DIR)
]) ])

View File

@ -109,11 +109,11 @@ AC_DEFUN([BDEPS_FTPGET],
# the "pass" command does not work on some # the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works, # ftp clients (read ftp.exe) but if it works,
# passive mode is better! # passive mode is better!
(\ ( \
echo "user $FTPUSER $FTPPWD" ;\ echo "user $FTPUSER $FTPPWD" ; \
echo "pass" ;\ echo "pass" ; \
echo "bin" ;\ echo "bin" ; \
echo "get $FTPPATH $2" ;\ echo "get $FTPPATH $2" ; \
) | ftp -in $FTPSERVER ) | ftp -in $FTPSERVER
fi fi
if test "x$VALID_TOOL" != xyes; then if test "x$VALID_TOOL" != xyes; then
@ -180,13 +180,13 @@ AC_DEFUN([BDEPS_CHECK_MODULE],
AC_DEFUN([BDEPS_FETCH], AC_DEFUN([BDEPS_FETCH],
[ [
# $1 is for example mymodule # $1 is for example mymodule
# $2 is for example libs/general/libmymod_1_2_3.zip # $2 is for example libs/general/libmymod_1_2_3.zip
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps # $3 is for example ftp://mybuilddeps.myserver.com/builddeps
# $4 is for example /localhome/builddeps # $4 is for example /localhome/builddeps
# $5 is the name of the variable into which we store the depdir, eg MYMOD # $5 is the name of the variable into which we store the depdir, eg MYMOD
# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
filename=`basename $2` filename=`basename $2`
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'` filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
filebase=${filename%%.*} filebase=${filename%%.*}
@ -231,17 +231,17 @@ AC_DEFUN([BDEPS_FETCH],
AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS], AC_DEFUN_ONCE([BDEPS_CONFIGURE_BUILDDEPS],
[ [
AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf], AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf],
[use this configuration file for the builddeps])]) [use this configuration file for the builddeps])])
AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server], AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server],
[download and use build dependencies from this server url])]) [download and use build dependencies from this server url])])
AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir], AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir],
[store downloaded build dependencies here @<:@/localhome/builddeps@:>@])], [store downloaded build dependencies here @<:@/localhome/builddeps@:>@])],
[], [],
[with_builddeps_dir=/localhome/builddeps]) [with_builddeps_dir=/localhome/builddeps])
AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group], AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group],
[chgrp the downloaded build dependencies to this group])]) [chgrp the downloaded build dependencies to this group])])
]) ])

View File

@ -88,7 +88,6 @@ check_hg_updates() {
check_autoconf_timestamps check_autoconf_timestamps
fi fi
fi fi
fi fi
} }

File diff suppressed because it is too large Load Diff

View File

@ -128,91 +128,91 @@ pkgadd_help() {
AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS], AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
[ [
# Finally output some useful information to the user # Finally output some useful information to the user
if test "x$CCACHE_FOUND" != x; then if test "x$CCACHE_FOUND" != x; then
if test "x$HAS_GOOD_CCACHE" = x; then if test "x$HAS_GOOD_CCACHE" = x; then
CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
else else
CCACHE_STATUS="installed and in use" CCACHE_STATUS="installed and in use"
fi fi
else else
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
CCACHE_STATUS="not installed (consider installing)" CCACHE_STATUS="not installed (consider installing)"
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
else else
CCACHE_STATUS="not available for your system" CCACHE_STATUS="not available for your system"
fi fi
fi fi
printf "\n" printf "\n"
printf "====================================================\n" printf "====================================================\n"
printf "A new configuration has been successfully created in\n" printf "A new configuration has been successfully created in\n"
printf "$OUTPUT_ROOT\n" printf "$OUTPUT_ROOT\n"
if test "x$CONFIGURE_COMMAND_LINE" != x; then if test "x$CONFIGURE_COMMAND_LINE" != x; then
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
else else
printf "using default settings.\n" printf "using default settings.\n"
fi fi
printf "\n" printf "\n"
printf "Configuration summary:\n" printf "Configuration summary:\n"
printf "* Debug level: $DEBUG_LEVEL\n" printf "* Debug level: $DEBUG_LEVEL\n"
printf "* JDK variant: $JDK_VARIANT\n" printf "* JDK variant: $JDK_VARIANT\n"
printf "* JVM variants: $with_jvm_variants\n" printf "* JVM variants: $with_jvm_variants\n"
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n" printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
printf "\n" printf "\n"
printf "Tools summary:\n" printf "Tools summary:\n"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n" printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
fi fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n" printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n" printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n" printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
printf "\n" printf "\n"
printf "Build performance summary:\n" printf "Build performance summary:\n"
printf "* Cores to use: $JOBS\n" printf "* Cores to use: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n" printf "* Memory limit: $MEMORY_SIZE MB\n"
printf "* ccache status: $CCACHE_STATUS\n" printf "* ccache status: $CCACHE_STATUS\n"
printf "\n" printf "\n"
if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
printf "$CCACHE_HELP_MSG\n" printf "$CCACHE_HELP_MSG\n"
HELP_MSG_MISSING_DEPENDENCY([ccache]) HELP_MSG_MISSING_DEPENDENCY([ccache])
printf "$HELP_MSG\n" printf "$HELP_MSG\n"
printf "\n" printf "\n"
fi fi
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
printf "NOTE: You have requested to build more than one version of the JVM, which\n" printf "NOTE: You have requested to build more than one version of the JVM, which\n"
printf "will result in longer build times.\n" printf "will result in longer build times.\n"
printf "\n" printf "\n"
fi fi
if test "x$FOUND_ALT_VARIABLES" != "x"; then if test "x$FOUND_ALT_VARIABLES" != "x"; then
printf "WARNING: You have old-style ALT_ environment variables set.\n" printf "WARNING: You have old-style ALT_ environment variables set.\n"
printf "These are not respected, and will be ignored. It is recommended\n" printf "These are not respected, and will be ignored. It is recommended\n"
printf "that you clean your environment. The following variables are set:\n" printf "that you clean your environment. The following variables are set:\n"
printf "$FOUND_ALT_VARIABLES\n" printf "$FOUND_ALT_VARIABLES\n"
printf "\n" printf "\n"
fi fi
if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
printf "WARNING: Your build output directory is not on a local disk.\n" printf "WARNING: Your build output directory is not on a local disk.\n"
printf "This will severely degrade build performance!\n" printf "This will severely degrade build performance!\n"
printf "It is recommended that you create an output directory on a local disk,\n" printf "It is recommended that you create an output directory on a local disk,\n"
printf "and run the configure script again from that directory.\n" printf "and run the configure script again from that directory.\n"
printf "\n" printf "\n"
fi fi
if test "x$IS_RECONFIGURE" = "xyes"; then if test "x$IS_RECONFIGURE" = "xyes"; then
printf "WARNING: The result of this configuration has overridden an older\n" printf "WARNING: The result of this configuration has overridden an older\n"
printf "configuration. You *should* run 'make clean' to make sure you get a\n" printf "configuration. You *should* run 'make clean' to make sure you get a\n"
printf "proper build. Failure to do so might result in strange build problems.\n" printf "proper build. Failure to do so might result in strange build problems.\n"
printf "\n" printf "\n"
fi fi
]) ])

View File

@ -25,138 +25,137 @@
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
[ [
############################################################################### ###############################################################################
# #
# Check which variant of the JDK that we want to build. # Check which variant of the JDK that we want to build.
# Currently we have: # Currently we have:
# normal: standard edition # normal: standard edition
# but the custom make system may add other variants # but the custom make system may add other variants
# #
# Effectively the JDK variant gives a name to a specific set of # Effectively the JDK variant gives a name to a specific set of
# modules to compile into the JDK. In the future, these modules # modules to compile into the JDK. In the future, these modules
# might even be Jigsaw modules. # might even be Jigsaw modules.
# #
AC_MSG_CHECKING([which variant of the JDK to build]) AC_MSG_CHECKING([which variant of the JDK to build])
AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant],
[JDK variant to build (normal) @<:@normal@:>@])]) [JDK variant to build (normal) @<:@normal@:>@])])
if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
JDK_VARIANT="normal" JDK_VARIANT="normal"
else else
AC_MSG_ERROR([The available JDK variants are: normal]) AC_MSG_ERROR([The available JDK variants are: normal])
fi fi
AC_SUBST(JDK_VARIANT) AC_SUBST(JDK_VARIANT)
AC_MSG_RESULT([$JDK_VARIANT]) AC_MSG_RESULT([$JDK_VARIANT])
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS], AC_DEFUN_ONCE([JDKOPT_SETUP_JVM_VARIANTS],
[ [
############################################################################### ###############################################################################
# #
# Check which variants of the JVM that we want to build. # Check which variants of the JVM that we want to build.
# Currently we have: # Currently we have:
# server: normal interpreter and a tiered C1/C2 compiler # server: normal interpreter and a tiered C1/C2 compiler
# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) # client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
# minimal1: reduced form of client with optional VM services and features stripped out # minimal1: reduced form of client with optional VM services and features stripped out
# kernel: kernel footprint JVM that passes the TCK without major performance problems, # kernel: kernel footprint JVM that passes the TCK without major performance problems,
# ie normal interpreter and C1, only the serial GC, kernel jvmti etc # ie normal interpreter and C1, only the serial GC, kernel jvmti etc
# zero: no machine code interpreter, no compiler # zero: no machine code interpreter, no compiler
# zeroshark: zero interpreter and shark/llvm compiler backend # zeroshark: zero interpreter and shark/llvm compiler backend
AC_MSG_CHECKING([which variants of the JVM to build]) AC_MSG_CHECKING([which variants of the JVM to build])
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
[JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])]) [JVM variants (separated by commas) to build (server, client, minimal1, kernel, zero, zeroshark) @<:@server@:>@])])
if test "x$with_jvm_variants" = x; then if test "x$with_jvm_variants" = x; then
with_jvm_variants="server" with_jvm_variants="server"
fi fi
JVM_VARIANTS=",$with_jvm_variants," JVM_VARIANTS=",$with_jvm_variants,"
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
if test "x$TEST_VARIANTS" != "x,"; then if test "x$TEST_VARIANTS" != "x,"; then
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark]) AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark])
fi fi
AC_MSG_RESULT([$with_jvm_variants]) AC_MSG_RESULT([$with_jvm_variants])
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'` JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
if test "x$JVM_VARIANT_CLIENT" = xtrue; then if test "x$JVM_VARIANT_CLIENT" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
fi fi
fi fi
if test "x$JVM_VARIANT_KERNEL" = xtrue; then if test "x$JVM_VARIANT_KERNEL" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.])
fi fi
fi fi
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.]) AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
fi fi
fi fi
# Replace the commas with AND for use in the build directory name. # Replace the commas with AND for use in the build directory name.
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
if test "x$COUNT_VARIANTS" != "x,1"; then if test "x$COUNT_VARIANTS" != "x,1"; then
BUILDING_MULTIPLE_JVM_VARIANTS=yes BUILDING_MULTIPLE_JVM_VARIANTS=yes
else else
BUILDING_MULTIPLE_JVM_VARIANTS=no BUILDING_MULTIPLE_JVM_VARIANTS=no
fi fi
AC_SUBST(JVM_VARIANTS) AC_SUBST(JVM_VARIANTS)
AC_SUBST(JVM_VARIANT_SERVER) AC_SUBST(JVM_VARIANT_SERVER)
AC_SUBST(JVM_VARIANT_CLIENT) AC_SUBST(JVM_VARIANT_CLIENT)
AC_SUBST(JVM_VARIANT_MINIMAL1) AC_SUBST(JVM_VARIANT_MINIMAL1)
AC_SUBST(JVM_VARIANT_KERNEL) AC_SUBST(JVM_VARIANT_KERNEL)
AC_SUBST(JVM_VARIANT_ZERO) AC_SUBST(JVM_VARIANT_ZERO)
AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_ZEROSHARK)
INCLUDE_SA=true INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false INCLUDE_SA=false
fi fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false INCLUDE_SA=false
fi fi
AC_SUBST(INCLUDE_SA) AC_SUBST(INCLUDE_SA)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true" MACOSX_UNIVERSAL="true"
fi fi
AC_SUBST(MACOSX_UNIVERSAL)
AC_SUBST(MACOSX_UNIVERSAL)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL], AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
[ [
############################################################################### ###############################################################################
# #
# Set the debug level # Set the debug level
# release: no debug information, all optimizations, no asserts. # release: no debug information, all optimizations, no asserts.
# fastdebug: debug information (-g), all optimizations, all asserts # fastdebug: debug information (-g), all optimizations, all asserts
# slowdebug: debug information (-g), no optimizations, all asserts # slowdebug: debug information (-g), no optimizations, all asserts
# #
DEBUG_LEVEL="release" DEBUG_LEVEL="release"
AC_MSG_CHECKING([which debug level to use]) AC_MSG_CHECKING([which debug level to use])
AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
[set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])],
[ [
ENABLE_DEBUG="${enableval}" ENABLE_DEBUG="${enableval}"
DEBUG_LEVEL="fastdebug" DEBUG_LEVEL="fastdebug"
], [ENABLE_DEBUG="no"]) ], [ENABLE_DEBUG="no"])
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
[set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])],
[ [
DEBUG_LEVEL="${withval}" DEBUG_LEVEL="${withval}"
@ -164,21 +163,21 @@ AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.])
fi fi
]) ])
AC_MSG_RESULT([$DEBUG_LEVEL]) AC_MSG_RESULT([$DEBUG_LEVEL])
if test "x$DEBUG_LEVEL" != xrelease && \ if test "x$DEBUG_LEVEL" != xrelease && \
test "x$DEBUG_LEVEL" != xfastdebug && \ test "x$DEBUG_LEVEL" != xfastdebug && \
test "x$DEBUG_LEVEL" != xslowdebug; then test "x$DEBUG_LEVEL" != xslowdebug; then
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug])
fi fi
############################################################################### ###############################################################################
# #
# Setup legacy vars/targets and new vars to deal with different debug levels. # Setup legacy vars/targets and new vars to deal with different debug levels.
# #
case $DEBUG_LEVEL in case $DEBUG_LEVEL in
release ) release )
VARIANT="OPT" VARIANT="OPT"
FASTDEBUG="false" FASTDEBUG="false"
@ -203,57 +202,57 @@ case $DEBUG_LEVEL in
HOTSPOT_DEBUG_LEVEL="jvmg" HOTSPOT_DEBUG_LEVEL="jvmg"
HOTSPOT_EXPORT="debug" HOTSPOT_EXPORT="debug"
;; ;;
esac esac
##### #####
# Generate the legacy makefile targets for hotspot. # Generate the legacy makefile targets for hotspot.
# The hotspot api for selecting the build artifacts, really, needs to be improved. # The hotspot api for selecting the build artifacts, really, needs to be improved.
# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
# But until then ... # But until then ...
HOTSPOT_TARGET="" HOTSPOT_TARGET=""
if test "x$JVM_VARIANT_SERVER" = xtrue; then if test "x$JVM_VARIANT_SERVER" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
fi fi
if test "x$JVM_VARIANT_CLIENT" = xtrue; then if test "x$JVM_VARIANT_CLIENT" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
fi fi
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
fi fi
if test "x$JVM_VARIANT_KERNEL" = xtrue; then if test "x$JVM_VARIANT_KERNEL" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
fi fi
if test "x$JVM_VARIANT_ZERO" = xtrue; then if test "x$JVM_VARIANT_ZERO" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
fi fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
fi fi
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
# On Macosx universal binaries are produced, but they only contain # On Macosx universal binaries are produced, but they only contain
# 64 bit intel. This invalidates control of which jvms are built # 64 bit intel. This invalidates control of which jvms are built
# from configure, but only server is valid anyway. Fix this # from configure, but only server is valid anyway. Fix this
# when hotspot makefiles are rewritten. # when hotspot makefiles are rewritten.
if test "x$MACOSX_UNIVERSAL" = xtrue; then if test "x$MACOSX_UNIVERSAL" = xtrue; then
HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT} HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
fi fi
##### #####
AC_SUBST(DEBUG_LEVEL) AC_SUBST(DEBUG_LEVEL)
AC_SUBST(VARIANT) AC_SUBST(VARIANT)
AC_SUBST(FASTDEBUG) AC_SUBST(FASTDEBUG)
AC_SUBST(DEBUG_CLASSFILES) AC_SUBST(DEBUG_CLASSFILES)
AC_SUBST(BUILD_VARIANT_RELEASE) AC_SUBST(BUILD_VARIANT_RELEASE)
]) ])
@ -301,100 +300,100 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
[ [
############################################################################### ###############################################################################
# #
# Should we build a JDK/JVM with headful support (ie a graphical ui)? # Should we build a JDK/JVM with headful support (ie a graphical ui)?
# We always build headless support. # We always build headless support.
# #
AC_MSG_CHECKING([headful support]) AC_MSG_CHECKING([headful support])
AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful],
[disable building headful support (graphical UI support) @<:@enabled@:>@])], [disable building headful support (graphical UI support) @<:@enabled@:>@])],
[SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes])
SUPPORT_HEADLESS=yes SUPPORT_HEADLESS=yes
BUILD_HEADLESS="BUILD_HEADLESS:=true" BUILD_HEADLESS="BUILD_HEADLESS:=true"
if test "x$SUPPORT_HEADFUL" = xyes; then if test "x$SUPPORT_HEADFUL" = xyes; then
# We are building both headful and headless. # We are building both headful and headless.
headful_msg="include support for both headful and headless" headful_msg="include support for both headful and headless"
fi fi
if test "x$SUPPORT_HEADFUL" = xno; then if test "x$SUPPORT_HEADFUL" = xno; then
# Thus we are building headless only. # Thus we are building headless only.
BUILD_HEADLESS="BUILD_HEADLESS:=true" BUILD_HEADLESS="BUILD_HEADLESS:=true"
headful_msg="headless only" headful_msg="headless only"
fi fi
AC_MSG_RESULT([$headful_msg]) AC_MSG_RESULT([$headful_msg])
AC_SUBST(SUPPORT_HEADLESS) AC_SUBST(SUPPORT_HEADLESS)
AC_SUBST(SUPPORT_HEADFUL) AC_SUBST(SUPPORT_HEADFUL)
AC_SUBST(BUILD_HEADLESS) AC_SUBST(BUILD_HEADLESS)
# Control wether Hotspot runs Queens test after build. # Control wether Hotspot runs Queens test after build.
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
[run the Queens test after Hotspot build @<:@disabled@:>@])],, [run the Queens test after Hotspot build @<:@disabled@:>@])],,
[enable_hotspot_test_in_build=no]) [enable_hotspot_test_in_build=no])
if test "x$enable_hotspot_test_in_build" = "xyes"; then if test "x$enable_hotspot_test_in_build" = "xyes"; then
TEST_IN_BUILD=true TEST_IN_BUILD=true
else else
TEST_IN_BUILD=false TEST_IN_BUILD=false
fi fi
AC_SUBST(TEST_IN_BUILD) AC_SUBST(TEST_IN_BUILD)
############################################################################### ###############################################################################
# #
# Choose cacerts source file # Choose cacerts source file
# #
AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file],
[specify alternative cacerts file])]) [specify alternative cacerts file])])
if test "x$with_cacerts_file" != x; then if test "x$with_cacerts_file" != x; then
CACERTS_FILE=$with_cacerts_file CACERTS_FILE=$with_cacerts_file
else else
CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
fi fi
AC_SUBST(CACERTS_FILE) AC_SUBST(CACERTS_FILE)
############################################################################### ###############################################################################
# #
# Enable or disable unlimited crypto # Enable or disable unlimited crypto
# #
AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto], AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto],
[Enable unlimited crypto policy @<:@disabled@:>@])],, [Enable unlimited crypto policy @<:@disabled@:>@])],,
[enable_unlimited_crypto=no]) [enable_unlimited_crypto=no])
if test "x$enable_unlimited_crypto" = "xyes"; then if test "x$enable_unlimited_crypto" = "xyes"; then
UNLIMITED_CRYPTO=true UNLIMITED_CRYPTO=true
else else
UNLIMITED_CRYPTO=false UNLIMITED_CRYPTO=false
fi fi
AC_SUBST(UNLIMITED_CRYPTO) AC_SUBST(UNLIMITED_CRYPTO)
############################################################################### ###############################################################################
# #
# Enable or disable the elliptic curve crypto implementation # Enable or disable the elliptic curve crypto implementation
# #
AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
[ [
AC_MSG_CHECKING([if elliptic curve crypto implementation is present]) AC_MSG_CHECKING([if elliptic curve crypto implementation is present])
if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
ENABLE_INTREE_EC=yes ENABLE_INTREE_EC=yes
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
ENABLE_INTREE_EC=no ENABLE_INTREE_EC=no
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
AC_SUBST(ENABLE_INTREE_EC) AC_SUBST(ENABLE_INTREE_EC)
]) ])
############################################################################### ###############################################################################
# #
# Compress jars # Compress jars
# #
COMPRESS_JARS=false COMPRESS_JARS=false
AC_SUBST(COMPRESS_JARS) AC_SUBST(COMPRESS_JARS)
]) ])
############################################################################### ###############################################################################
@ -403,46 +402,46 @@ AC_SUBST(COMPRESS_JARS)
# #
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS], AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
[ [
# Source the version numbers # Source the version numbers
. $AUTOCONF_DIR/version-numbers . $AUTOCONF_DIR/version-numbers
# Get the settings from parameters # Get the settings from parameters
AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone], AC_ARG_WITH(milestone, [AS_HELP_STRING([--with-milestone],
[Set milestone value for build @<:@internal@:>@])]) [Set milestone value for build @<:@internal@:>@])])
if test "x$with_milestone" = xyes; then if test "x$with_milestone" = xyes; then
AC_MSG_ERROR([Milestone must have a value]) AC_MSG_ERROR([Milestone must have a value])
elif test "x$with_milestone" != x; then elif test "x$with_milestone" != x; then
MILESTONE="$with_milestone" MILESTONE="$with_milestone"
fi fi
if test "x$MILESTONE" = x; then if test "x$MILESTONE" = x; then
MILESTONE=internal MILESTONE=internal
fi fi
AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version], AC_ARG_WITH(update-version, [AS_HELP_STRING([--with-update-version],
[Set update version value for build @<:@b00@:>@])]) [Set update version value for build @<:@b00@:>@])])
if test "x$with_update_version" = xyes; then if test "x$with_update_version" = xyes; then
AC_MSG_ERROR([Update version must have a value]) AC_MSG_ERROR([Update version must have a value])
elif test "x$with_update_version" != x; then elif test "x$with_update_version" != x; then
JDK_UPDATE_VERSION="$with_update_version" JDK_UPDATE_VERSION="$with_update_version"
fi fi
AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix], AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
[Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])]) [Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
if test "x$with_user_release_suffix" = xyes; then if test "x$with_user_release_suffix" = xyes; then
AC_MSG_ERROR([Release suffix must have a value]) AC_MSG_ERROR([Release suffix must have a value])
elif test "x$with_user_release_suffix" != x; then elif test "x$with_user_release_suffix" != x; then
USER_RELEASE_SUFFIX="$with_user_release_suffix" USER_RELEASE_SUFFIX="$with_user_release_suffix"
fi fi
AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number], AC_ARG_WITH(build-number, [AS_HELP_STRING([--with-build-number],
[Set build number value for build @<:@b00@:>@])]) [Set build number value for build @<:@b00@:>@])])
if test "x$with_build_number" = xyes; then if test "x$with_build_number" = xyes; then
AC_MSG_ERROR([Build number must have a value]) AC_MSG_ERROR([Build number must have a value])
elif test "x$with_build_number" != x; then elif test "x$with_build_number" != x; then
JDK_BUILD_NUMBER="$with_build_number" JDK_BUILD_NUMBER="$with_build_number"
fi fi
# Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
if test "x$JDK_BUILD_NUMBER" = x; then if test "x$JDK_BUILD_NUMBER" = x; then
JDK_BUILD_NUMBER=b00 JDK_BUILD_NUMBER=b00
if test "x$USER_RELEASE_SUFFIX" = x; then if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
@ -450,74 +449,73 @@ if test "x$JDK_BUILD_NUMBER" = x; then
CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'` CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi fi
fi fi
# Now set the JDK version, milestone, build number etc. # Now set the JDK version, milestone, build number etc.
AC_SUBST(USER_RELEASE_SUFFIX) AC_SUBST(USER_RELEASE_SUFFIX)
AC_SUBST(JDK_MAJOR_VERSION) AC_SUBST(JDK_MAJOR_VERSION)
AC_SUBST(JDK_MINOR_VERSION) AC_SUBST(JDK_MINOR_VERSION)
AC_SUBST(JDK_MICRO_VERSION) AC_SUBST(JDK_MICRO_VERSION)
AC_SUBST(JDK_UPDATE_VERSION) AC_SUBST(JDK_UPDATE_VERSION)
AC_SUBST(JDK_BUILD_NUMBER) AC_SUBST(JDK_BUILD_NUMBER)
AC_SUBST(MILESTONE) AC_SUBST(MILESTONE)
AC_SUBST(LAUNCHER_NAME) AC_SUBST(LAUNCHER_NAME)
AC_SUBST(PRODUCT_NAME) AC_SUBST(PRODUCT_NAME)
AC_SUBST(PRODUCT_SUFFIX) AC_SUBST(PRODUCT_SUFFIX)
AC_SUBST(JDK_RC_PLATFORM_NAME) AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(COMPANY_NAME) AC_SUBST(COMPANY_NAME)
AC_SUBST(MACOSX_BUNDLE_NAME_BASE) AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
AC_SUBST(MACOSX_BUNDLE_ID_BASE) AC_SUBST(MACOSX_BUNDLE_ID_BASE)
COPYRIGHT_YEAR=`date +'%Y'` COPYRIGHT_YEAR=`date +'%Y'`
AC_SUBST(COPYRIGHT_YEAR) AC_SUBST(COPYRIGHT_YEAR)
if test "x$JDK_UPDATE_VERSION" != x; then if test "x$JDK_UPDATE_VERSION" != x; then
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
else else
JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
fi fi
AC_SUBST(JDK_VERSION) AC_SUBST(JDK_VERSION)
COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
AC_SUBST(COOKED_BUILD_NUMBER) AC_SUBST(COOKED_BUILD_NUMBER)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS], AC_DEFUN_ONCE([JDKOPT_SETUP_BUILD_TWEAKS],
[ [
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET" HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
AC_SUBST(HOTSPOT_MAKE_ARGS) AC_SUBST(HOTSPOT_MAKE_ARGS)
# The name of the Service Agent jar. # The name of the Service Agent jar.
SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
fi fi
AC_SUBST(SALIB_NAME) AC_SUBST(SALIB_NAME)
]) ])
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS], AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
[ [
# #
# ENABLE_DEBUG_SYMBOLS # ENABLE_DEBUG_SYMBOLS
# This must be done after the toolchain is setup, since we're looking at objcopy. # This must be done after the toolchain is setup, since we're looking at objcopy.
# #
AC_ARG_ENABLE([debug-symbols], AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])]) [AS_HELP_STRING([--disable-debug-symbols],[disable generation of debug symbols @<:@enabled@:>@])])
AC_MSG_CHECKING([if we should generate debug symbols]) AC_MSG_CHECKING([if we should generate debug symbols])
if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
# explicit enabling of enable-debug-symbols and can't find objcopy # explicit enabling of enable-debug-symbols and can't find objcopy
# this is an error # this is an error
AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols]) AC_MSG_ERROR([Unable to find objcopy, cannot enable debug-symbols])
fi fi
if test "x$enable_debug_symbols" = "xyes"; then if test "x$enable_debug_symbols" = "xyes"; then
ENABLE_DEBUG_SYMBOLS=true ENABLE_DEBUG_SYMBOLS=true
elif test "x$enable_debug_symbols" = "xno"; then elif test "x$enable_debug_symbols" = "xno"; then
ENABLE_DEBUG_SYMBOLS=false ENABLE_DEBUG_SYMBOLS=false
else else
# default on macosx is false # default on macosx is false
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ENABLE_DEBUG_SYMBOLS=false ENABLE_DEBUG_SYMBOLS=false
@ -527,29 +525,29 @@ else
else else
ENABLE_DEBUG_SYMBOLS=false ENABLE_DEBUG_SYMBOLS=false
fi fi
fi fi
AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS]) AC_MSG_RESULT([$ENABLE_DEBUG_SYMBOLS])
# #
# ZIP_DEBUGINFO_FILES # ZIP_DEBUGINFO_FILES
# #
AC_MSG_CHECKING([if we should zip debug-info files]) AC_MSG_CHECKING([if we should zip debug-info files])
AC_ARG_ENABLE([zip-debug-info], AC_ARG_ENABLE([zip-debug-info],
[AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])], [AS_HELP_STRING([--disable-zip-debug-info],[disable zipping of debug-info files @<:@enabled@:>@])],
[enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"]) [enable_zip_debug_info="${enableval}"], [enable_zip_debug_info="yes"])
AC_MSG_RESULT([${enable_zip_debug_info}]) AC_MSG_RESULT([${enable_zip_debug_info}])
if test "x${enable_zip_debug_info}" = "xno"; then if test "x${enable_zip_debug_info}" = "xno"; then
ZIP_DEBUGINFO_FILES=false ZIP_DEBUGINFO_FILES=false
else else
ZIP_DEBUGINFO_FILES=true ZIP_DEBUGINFO_FILES=true
fi fi
AC_SUBST(ENABLE_DEBUG_SYMBOLS) AC_SUBST(ENABLE_DEBUG_SYMBOLS)
AC_SUBST(ZIP_DEBUGINFO_FILES) AC_SUBST(ZIP_DEBUGINFO_FILES)
AC_SUBST(CFLAGS_DEBUG_SYMBOLS) AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS) AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
]) ])
# Support for customization of the build process. Some build files # Support for customization of the build process. Some build files
@ -557,5 +555,5 @@ AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
# for a degree of customization of the build targets and the rules/recipes # for a degree of customization of the build targets and the rules/recipes
# to create them # to create them
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir], AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir]) [use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
AC_SUBST(CUSTOM_MAKE_DIR) AC_SUBST(CUSTOM_MAKE_DIR)

View File

@ -26,33 +26,33 @@
AC_DEFUN_ONCE([LIB_SETUP_INIT], AC_DEFUN_ONCE([LIB_SETUP_INIT],
[ [
############################################################################### ###############################################################################
# #
# OS specific settings that we never will need to probe. # OS specific settings that we never will need to probe.
# #
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
AC_MSG_CHECKING([what is not needed on Linux?]) AC_MSG_CHECKING([what is not needed on Linux?])
PULSE_NOT_NEEDED=yes PULSE_NOT_NEEDED=yes
AC_MSG_RESULT([pulse]) AC_MSG_RESULT([pulse])
fi fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_MSG_CHECKING([what is not needed on Solaris?]) AC_MSG_CHECKING([what is not needed on Solaris?])
ALSA_NOT_NEEDED=yes ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes PULSE_NOT_NEEDED=yes
AC_MSG_RESULT([alsa pulse]) AC_MSG_RESULT([alsa pulse])
fi fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then if test "x$OPENJDK_TARGET_OS" = xwindows; then
AC_MSG_CHECKING([what is not needed on Windows?]) AC_MSG_CHECKING([what is not needed on Windows?])
CUPS_NOT_NEEDED=yes CUPS_NOT_NEEDED=yes
ALSA_NOT_NEEDED=yes ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes PULSE_NOT_NEEDED=yes
X11_NOT_NEEDED=yes X11_NOT_NEEDED=yes
AC_MSG_RESULT([alsa cups pulse x11]) AC_MSG_RESULT([alsa cups pulse x11])
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
AC_MSG_CHECKING([what is not needed on MacOSX?]) AC_MSG_CHECKING([what is not needed on MacOSX?])
ALSA_NOT_NEEDED=yes ALSA_NOT_NEEDED=yes
PULSE_NOT_NEEDED=yes PULSE_NOT_NEEDED=yes
@ -61,34 +61,34 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# If the java runtime framework is disabled, then we need X11. # If the java runtime framework is disabled, then we need X11.
# This will be adjusted below. # This will be adjusted below.
AC_MSG_RESULT([alsa pulse x11]) AC_MSG_RESULT([alsa pulse x11])
fi fi
if test "x$OPENJDK_TARGET_OS" = xbsd; then if test "x$OPENJDK_TARGET_OS" = xbsd; then
AC_MSG_CHECKING([what is not needed on bsd?]) AC_MSG_CHECKING([what is not needed on bsd?])
ALSA_NOT_NEEDED=yes ALSA_NOT_NEEDED=yes
AC_MSG_RESULT([alsa]) AC_MSG_RESULT([alsa])
fi fi
if test "x$OPENJDK" = "xfalse"; then if test "x$OPENJDK" = "xfalse"; then
FREETYPE2_NOT_NEEDED=yes FREETYPE2_NOT_NEEDED=yes
fi fi
if test "x$SUPPORT_HEADFUL" = xno; then if test "x$SUPPORT_HEADFUL" = xno; then
X11_NOT_NEEDED=yes X11_NOT_NEEDED=yes
fi fi
############################################################################### ###############################################################################
# #
# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
# that uses this API. # that uses this API.
# #
AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support], AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
[disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])], [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
[MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"]) [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
USE_MACOSX_RUNTIME_SUPPORT=no USE_MACOSX_RUNTIME_SUPPORT=no
AC_MSG_CHECKING([for explicit Java runtime support in the OS]) AC_MSG_CHECKING([for explicit Java runtime support in the OS])
if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
MACOSX_RUNTIME_SUPPORT=yes MACOSX_RUNTIME_SUPPORT=yes
USE_MACOSX_RUNTIME_SUPPORT=yes USE_MACOSX_RUNTIME_SUPPORT=yes
@ -96,30 +96,30 @@ if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSup
else else
AC_MSG_RESULT([yes, but explicitly disabled.]) AC_MSG_RESULT([yes, but explicitly disabled.])
fi fi
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?]) AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
X11_NOT_NEEDED= X11_NOT_NEEDED=
FREETYPE2_NOT_NEEDED= FREETYPE2_NOT_NEEDED=
AC_MSG_RESULT([alsa pulse]) AC_MSG_RESULT([alsa pulse])
fi fi
]) ])
AC_DEFUN_ONCE([LIB_SETUP_X11], AC_DEFUN_ONCE([LIB_SETUP_X11],
[ [
############################################################################### ###############################################################################
# #
# Check for X Windows # Check for X Windows
# #
# Check if the user has specified sysroot, but not --x-includes or --x-libraries. # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and # Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct. # --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYS_ROOT" != "x/"; then if test "x$SYS_ROOT" != "x/"; then
if test "x$x_includes" = xNONE; then if test "x$x_includes" = xNONE; then
if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
x_includes="$SYS_ROOT/usr/X11R6/include" x_includes="$SYS_ROOT/usr/X11R6/include"
@ -136,93 +136,95 @@ if test "x$SYS_ROOT" != "x/"; then
x_libraries="$SYS_ROOT/usr/lib" x_libraries="$SYS_ROOT/usr/lib"
fi fi
fi fi
fi fi
# Now let autoconf do it's magic # Now let autoconf do it's magic
AC_PATH_X AC_PATH_X
AC_PATH_XTRA AC_PATH_XTRA
# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
# this doesn't make sense so we remove it. # this doesn't make sense so we remove it.
if test "x$COMPILE_TYPE" = xcross; then if test "x$COMPILE_TYPE" = xcross; then
X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'` X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
fi fi
if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
HELP_MSG_MISSING_DEPENDENCY([x11]) HELP_MSG_MISSING_DEPENDENCY([x11])
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
fi fi
# Some of the old makefiles require a setting of OPENWIN_HOME # Some of the old makefiles require a setting of OPENWIN_HOME
# Since the X11R6 directory has disappeared on later Linuxes, # Since the X11R6 directory has disappeared on later Linuxes,
# we need to probe for it. # we need to probe for it.
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
if test -d "$SYS_ROOT/usr/X11R6"; then if test -d "$SYS_ROOT/usr/X11R6"; then
OPENWIN_HOME="$SYS_ROOT/usr/X11R6" OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
elif test -d "$SYS_ROOT/usr/include/X11"; then elif test -d "$SYS_ROOT/usr/include/X11"; then
OPENWIN_HOME="$SYS_ROOT/usr" OPENWIN_HOME="$SYS_ROOT/usr"
fi fi
fi fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
OPENWIN_HOME="/usr/openwin" OPENWIN_HOME="/usr/openwin"
fi fi
AC_SUBST(OPENWIN_HOME) AC_SUBST(OPENWIN_HOME)
# #
# Weird Sol10 something check...TODO change to try compile # Weird Sol10 something check...TODO change to try compile
# #
if test "x${OPENJDK_TARGET_OS}" = xsolaris; then if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
if test "`uname -r`" = "5.10"; then if test "`uname -r`" = "5.10"; then
if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
fi fi
fi fi
fi fi
AC_LANG_PUSH(C) AC_LANG_PUSH(C)
OLD_CFLAGS="$CFLAGS" OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS" CFLAGS="$CFLAGS $X_CFLAGS"
# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
[X11_A_OK=yes], [X11_A_OK=yes],
[X11_A_OK=no; break], [X11_A_OK=no; break],
[ # include <X11/Xlib.h> [
# include <X11/Xlib.h>
# include <X11/Xutil.h> # include <X11/Xutil.h>
]) ]
)
CFLAGS="$OLD_CFLAGS" CFLAGS="$OLD_CFLAGS"
AC_LANG_POP(C) AC_LANG_POP(C)
if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
HELP_MSG_MISSING_DEPENDENCY([x11]) HELP_MSG_MISSING_DEPENDENCY([x11])
AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG]) AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
fi fi
AC_SUBST(X_CFLAGS) AC_SUBST(X_CFLAGS)
AC_SUBST(X_LIBS) AC_SUBST(X_LIBS)
]) ])
AC_DEFUN_ONCE([LIB_SETUP_CUPS], AC_DEFUN_ONCE([LIB_SETUP_CUPS],
[ [
############################################################################### ###############################################################################
# #
# The common unix printing system cups is used to print from java. # The common unix printing system cups is used to print from java.
# #
AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
[specify prefix directory for the cups package [specify prefix directory for the cups package
(expecting the headers under PATH/include)])]) (expecting the headers under PATH/include)])])
AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
[specify directory for the cups include files])]) [specify directory for the cups include files])])
if test "x$CUPS_NOT_NEEDED" = xyes; then if test "x$CUPS_NOT_NEEDED" = xyes; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
AC_MSG_WARN([cups not used, so --with-cups is ignored]) AC_MSG_WARN([cups not used, so --with-cups is ignored])
fi fi
CUPS_CFLAGS= CUPS_CFLAGS=
else else
CUPS_FOUND=no CUPS_FOUND=no
if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
@ -243,9 +245,12 @@ else
if test "x$CUPS_FOUND" = xno; then if test "x$CUPS_FOUND" = xno; then
# Are the cups headers installed in the default /usr/include location? # Are the cups headers installed in the default /usr/include location?
AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
[CUPS_FOUND=yes [
CUPS_FOUND=yes
CUPS_CFLAGS= CUPS_CFLAGS=
DEFAULT_CUPS=yes]) DEFAULT_CUPS=yes
]
)
fi fi
if test "x$CUPS_FOUND" = xno; then if test "x$CUPS_FOUND" = xno; then
# Getting nervous now? Lets poke around for standard Solaris third-party # Getting nervous now? Lets poke around for standard Solaris third-party
@ -266,34 +271,34 @@ else
HELP_MSG_MISSING_DEPENDENCY([cups]) HELP_MSG_MISSING_DEPENDENCY([cups])
AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
fi fi
fi fi
AC_SUBST(CUPS_CFLAGS) AC_SUBST(CUPS_CFLAGS)
]) ])
AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
[ [
############################################################################### ###############################################################################
# #
# The ubiquitous freetype2 library is used to render fonts. # The ubiquitous freetype2 library is used to render fonts.
# #
AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
[specify prefix directory for the freetype2 package [specify prefix directory for the freetype2 package
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) (expecting the libraries under PATH/lib and the headers under PATH/include)])])
# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
USING_SYSTEM_FT_LIB=false USING_SYSTEM_FT_LIB=false
if test "x$FREETYPE2_NOT_NEEDED" = xyes; then if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
fi fi
FREETYPE2_CFLAGS= FREETYPE2_CFLAGS=
FREETYPE2_LIBS= FREETYPE2_LIBS=
FREETYPE2_LIB_PATH= FREETYPE2_LIB_PATH=
else else
FREETYPE2_FOUND=no FREETYPE2_FOUND=no
if test "x$with_freetype" != x; then if test "x$with_freetype" != x; then
@ -377,7 +382,8 @@ else
PREV_LDFLAGS="$LDFLAGS" PREV_LDFLAGS="$LDFLAGS"
CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h> AC_LINK_IFELSE([AC_LANG_SOURCE([[
#include<ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
int main() { return 0; } int main() { return 0; }
]])], ]])],
@ -389,7 +395,8 @@ else
], ],
[ [
FREETYPE2_FOUND=no FREETYPE2_FOUND=no
]) ]
)
CXXCFLAGS="$PREV_CXXFLAGS" CXXCFLAGS="$PREV_CXXFLAGS"
LDFLAGS="$PREV_LDFLAGS" LDFLAGS="$PREV_LDFLAGS"
AC_MSG_RESULT([$FREETYPE2_FOUND]) AC_MSG_RESULT([$FREETYPE2_FOUND])
@ -409,37 +416,36 @@ else
AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])) AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
LDFLAGS="$PREV_LDFLAGS" LDFLAGS="$PREV_LDFLAGS"
fi fi
fi fi
AC_SUBST(USING_SYSTEM_FT_LIB)
AC_SUBST(FREETYPE2_LIB_PATH)
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
AC_SUBST(USING_SYSTEM_FT_LIB)
AC_SUBST(FREETYPE2_LIB_PATH)
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
]) ])
AC_DEFUN_ONCE([LIB_SETUP_ALSA], AC_DEFUN_ONCE([LIB_SETUP_ALSA],
[ [
############################################################################### ###############################################################################
# #
# Check for alsa headers and libraries. Used on Linux/GNU systems. # Check for alsa headers and libraries. Used on Linux/GNU systems.
# #
AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
[specify prefix directory for the alsa package [specify prefix directory for the alsa package
(expecting the libraries under PATH/lib and the headers under PATH/include)])]) (expecting the libraries under PATH/lib and the headers under PATH/include)])])
AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include], AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
[specify directory for the alsa include files])]) [specify directory for the alsa include files])])
AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib], AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
[specify directory for the alsa library])]) [specify directory for the alsa library])])
if test "x$ALSA_NOT_NEEDED" = xyes; then if test "x$ALSA_NOT_NEEDED" = xyes; then
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
AC_MSG_WARN([alsa not used, so --with-alsa is ignored]) AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
fi fi
ALSA_CFLAGS= ALSA_CFLAGS=
ALSA_LIBS= ALSA_LIBS=
else else
ALSA_FOUND=no ALSA_FOUND=no
if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
@ -467,115 +473,116 @@ else
fi fi
if test "x$ALSA_FOUND" = xno; then if test "x$ALSA_FOUND" = xno; then
AC_CHECK_HEADERS([alsa/asoundlib.h], AC_CHECK_HEADERS([alsa/asoundlib.h],
[ALSA_FOUND=yes [
ALSA_FOUND=yes
ALSA_CFLAGS=-Iignoreme ALSA_CFLAGS=-Iignoreme
ALSA_LIBS=-lasound ALSA_LIBS=-lasound
DEFAULT_ALSA=yes], DEFAULT_ALSA=yes
],
[ALSA_FOUND=no]) [ALSA_FOUND=no])
fi fi
if test "x$ALSA_FOUND" = xno; then if test "x$ALSA_FOUND" = xno; then
HELP_MSG_MISSING_DEPENDENCY([alsa]) HELP_MSG_MISSING_DEPENDENCY([alsa])
AC_MSG_ERROR([Could not find alsa! $HELP_MSG ]) AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
fi fi
fi fi
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
]) ])
AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
[ [
############################################################################### ###############################################################################
# #
# Check for the jpeg library # Check for the jpeg library
# #
USE_EXTERNAL_LIBJPEG=true USE_EXTERNAL_LIBJPEG=true
AC_CHECK_LIB(jpeg, main, [], AC_CHECK_LIB(jpeg, main, [],
[ USE_EXTERNAL_LIBJPEG=false [ USE_EXTERNAL_LIBJPEG=false
AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
]) ])
AC_SUBST(USE_EXTERNAL_LIBJPEG) AC_SUBST(USE_EXTERNAL_LIBJPEG)
############################################################################### ###############################################################################
# #
# Check for the gif library # Check for the gif library
# #
AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
[use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
AC_MSG_CHECKING([for which giflib to use]) AC_MSG_CHECKING([for which giflib to use])
# default is bundled # default is bundled
DEFAULT_GIFLIB=bundled DEFAULT_GIFLIB=bundled
# #
# if user didn't specify, use DEFAULT_GIFLIB # if user didn't specify, use DEFAULT_GIFLIB
# #
if test "x${with_giflib}" = "x"; then if test "x${with_giflib}" = "x"; then
with_giflib=${DEFAULT_GIFLIB} with_giflib=${DEFAULT_GIFLIB}
fi fi
AC_MSG_RESULT(${with_giflib}) AC_MSG_RESULT(${with_giflib})
if test "x${with_giflib}" = "xbundled"; then if test "x${with_giflib}" = "xbundled"; then
USE_EXTERNAL_LIBGIF=false USE_EXTERNAL_LIBGIF=false
elif test "x${with_giflib}" = "xsystem"; then elif test "x${with_giflib}" = "xsystem"; then
AC_CHECK_HEADER(gif_lib.h, [], AC_CHECK_HEADER(gif_lib.h, [],
[ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
AC_CHECK_LIB(gif, DGifGetCode, [], AC_CHECK_LIB(gif, DGifGetCode, [],
[ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
USE_EXTERNAL_LIBGIF=true USE_EXTERNAL_LIBGIF=true
else else
AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
fi fi
AC_SUBST(USE_EXTERNAL_LIBGIF) AC_SUBST(USE_EXTERNAL_LIBGIF)
############################################################################### ###############################################################################
# #
# Check for the zlib library # Check for the zlib library
# #
AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
[use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
AC_CHECK_LIB(z, compress, AC_CHECK_LIB(z, compress,
[ ZLIB_FOUND=yes ], [ ZLIB_FOUND=yes ],
[ ZLIB_FOUND=no ]) [ ZLIB_FOUND=no ])
AC_MSG_CHECKING([for which zlib to use]) AC_MSG_CHECKING([for which zlib to use])
DEFAULT_ZLIB=bundled
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
#
# On macosx default is system...on others default is
#
DEFAULT_ZLIB=system
fi
if test "x${ZLIB_FOUND}" != "xyes"; then
#
# If we don't find any system...set default to bundled
#
DEFAULT_ZLIB=bundled DEFAULT_ZLIB=bundled
fi if test "x$OPENJDK_TARGET_OS" = xmacosx; then
#
# On macosx default is system...on others default is
#
DEFAULT_ZLIB=system
fi
# if test "x${ZLIB_FOUND}" != "xyes"; then
# If user didn't specify, use DEFAULT_ZLIB #
# # If we don't find any system...set default to bundled
if test "x${with_zlib}" = "x"; then #
DEFAULT_ZLIB=bundled
fi
#
# If user didn't specify, use DEFAULT_ZLIB
#
if test "x${with_zlib}" = "x"; then
with_zlib=${DEFAULT_ZLIB} with_zlib=${DEFAULT_ZLIB}
fi fi
if test "x${with_zlib}" = "xbundled"; then if test "x${with_zlib}" = "xbundled"; then
USE_EXTERNAL_LIBZ=false USE_EXTERNAL_LIBZ=false
AC_MSG_RESULT([bundled]) AC_MSG_RESULT([bundled])
elif test "x${with_zlib}" = "xsystem"; then elif test "x${with_zlib}" = "xsystem"; then
if test "x${ZLIB_FOUND}" = "xyes"; then if test "x${ZLIB_FOUND}" = "xyes"; then
USE_EXTERNAL_LIBZ=true USE_EXTERNAL_LIBZ=true
AC_MSG_RESULT([system]) AC_MSG_RESULT([system])
@ -583,61 +590,61 @@ elif test "x${with_zlib}" = "xsystem"; then
AC_MSG_RESULT([system not found]) AC_MSG_RESULT([system not found])
AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
fi fi
else else
AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
fi fi
AC_SUBST(USE_EXTERNAL_LIBZ) AC_SUBST(USE_EXTERNAL_LIBZ)
############################################################################### ###############################################################################
LIBZIP_CAN_USE_MMAP=true LIBZIP_CAN_USE_MMAP=true
AC_SUBST(LIBZIP_CAN_USE_MMAP) AC_SUBST(LIBZIP_CAN_USE_MMAP)
############################################################################### ###############################################################################
# #
# Check if altzone exists in time.h # Check if altzone exists in time.h
# #
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])], AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
[has_altzone=yes], [has_altzone=yes],
[has_altzone=no]) [has_altzone=no])
if test "x$has_altzone" = xyes; then if test "x$has_altzone" = xyes; then
AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h]) AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
fi fi
############################################################################### ###############################################################################
# #
# Check the maths library # Check the maths library
# #
AC_CHECK_LIB(m, cos, [], AC_CHECK_LIB(m, cos, [],
[ [
AC_MSG_NOTICE([Maths library was not found]) AC_MSG_NOTICE([Maths library was not found])
]) ]
AC_SUBST(LIBM) )
AC_SUBST(LIBM)
############################################################################### ###############################################################################
# #
# Check for libdl.so # Check for libdl.so
save_LIBS="$LIBS"
LIBS=""
AC_CHECK_LIB(dl,dlopen)
LIBDL="$LIBS"
AC_SUBST(LIBDL)
LIBS="$save_LIBS"
save_LIBS="$LIBS"
LIBS=""
AC_CHECK_LIB(dl,dlopen)
LIBDL="$LIBS"
AC_SUBST(LIBDL)
LIBS="$save_LIBS"
]) ])
AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
[ [
############################################################################### ###############################################################################
# #
# statically link libstdc++ before C++ ABI is stablized on Linux unless # statically link libstdc++ before C++ ABI is stablized on Linux unless
# dynamic build is configured on command line. # dynamic build is configured on command line.
# #
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>], AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])], [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
[ [
if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
@ -646,9 +653,9 @@ AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<d
fi fi
], ],
[with_stdc__lib=default] [with_stdc__lib=default]
) )
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
# Test if -lstdc++ works. # Test if -lstdc++ works.
AC_MSG_CHECKING([if dynamic link of stdc++ is possible]) AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
AC_LANG_PUSH(C++) AC_LANG_PUSH(C++)
@ -703,16 +710,16 @@ if test "x$OPENJDK_TARGET_OS" = xlinux; then
STATIC_CXX_SETTING="STATIC_CXX=true" STATIC_CXX_SETTING="STATIC_CXX=true"
AC_MSG_RESULT([static]) AC_MSG_RESULT([static])
fi fi
fi fi
AC_SUBST(STATIC_CXX_SETTING) AC_SUBST(STATIC_CXX_SETTING)
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
# Figure out LIBFFI_CFLAGS and LIBFFI_LIBS # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
PKG_CHECK_MODULES([LIBFFI], [libffi]) PKG_CHECK_MODULES([LIBFFI], [libffi])
fi fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config]) AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
if test "x$LLVM_CONFIG" != xllvm-config; then if test "x$LLVM_CONFIG" != xllvm-config; then
@ -757,18 +764,17 @@ if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
AC_SUBST(LLVM_CFLAGS) AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_LDFLAGS) AC_SUBST(LLVM_LDFLAGS)
AC_SUBST(LLVM_LIBS) AC_SUBST(LLVM_LIBS)
fi fi
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi fi
# TODO better (platform agnostic) test # TODO better (platform agnostic) test
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
LIBCXX="-lstdc++" LIBCXX="-lstdc++"
fi fi
AC_SUBST(LIBCXX)
AC_SUBST(LIBCXX)
]) ])

View File

@ -238,12 +238,12 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
fi fi
AC_SUBST(COMPILE_TYPE) AC_SUBST(COMPILE_TYPE)
AC_MSG_CHECKING([compilation type]) AC_MSG_CHECKING([compilation type])
AC_MSG_RESULT([$COMPILE_TYPE]) AC_MSG_RESULT([$COMPILE_TYPE])
]) ])
# Setup the legacy variables, for controlling the old makefiles. # Setup the legacy variables, for controlling the old makefiles.
# #
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS], AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
[ [
# Also store the legacy naming of the cpu. # Also store the legacy naming of the cpu.
@ -355,7 +355,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z) *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
esac esac
AC_SUBST(ZERO_ARCHDEF) AC_SUBST(ZERO_ARCHDEF)
]) ])
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
@ -388,34 +387,34 @@ AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
#%%% Build and target systems %%% #%%% Build and target systems %%%
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
[ [
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
# product you're building. The target of this build is called "host". Since this is confusing to most people, we # product you're building. The target of this build is called "host". Since this is confusing to most people, we
# have not adopted that system, but use "target" as the platform we are building for. In some places though we need # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
# to use the configure naming style. # to use the configure naming style.
AC_CANONICAL_BUILD AC_CANONICAL_BUILD
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_CANONICAL_TARGET AC_CANONICAL_TARGET
PLATFORM_EXTRACT_TARGET_AND_BUILD PLATFORM_EXTRACT_TARGET_AND_BUILD
PLATFORM_SETUP_TARGET_CPU_BITS PLATFORM_SETUP_TARGET_CPU_BITS
PLATFORM_SET_RELEASE_FILE_OS_VALUES PLATFORM_SET_RELEASE_FILE_OS_VALUES
PLATFORM_SETUP_LEGACY_VARS PLATFORM_SETUP_LEGACY_VARS
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
[ [
############################################################################### ###############################################################################
# Note that this is the build platform OS version! # Note that this is the build platform OS version!
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
AC_SUBST(OS_VERSION_MAJOR) AC_SUBST(OS_VERSION_MAJOR)
AC_SUBST(OS_VERSION_MINOR) AC_SUBST(OS_VERSION_MINOR)
AC_SUBST(OS_VERSION_MICRO) AC_SUBST(OS_VERSION_MICRO)
]) ])
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS. # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
@ -441,25 +440,25 @@ AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
[ [
############################################################################### ###############################################################################
# #
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
# (The JVM can use 32 or 64 bit Java pointers but that decision # (The JVM can use 32 or 64 bit Java pointers but that decision
# is made at runtime.) # is made at runtime.)
# #
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Always specify -m flags on Solaris # Always specify -m flags on Solaris
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
elif test "x$COMPILE_TYPE" = xreduced; then elif test "x$COMPILE_TYPE" = xreduced; then
if test "x$OPENJDK_TARGET_OS" != xwindows; then if test "x$OPENJDK_TARGET_OS" != xwindows; then
# Specify -m if running reduced on other Posix platforms # Specify -m if running reduced on other Posix platforms
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
fi fi
fi fi
# Make compilation sanity check # Make compilation sanity check
AC_CHECK_HEADERS([stdio.h], , [ AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.]) AC_MSG_NOTICE([Failed to compile stdio.h. This likely implies missing compile dependencies.])
if test "x$COMPILE_TYPE" = xreduced; then if test "x$COMPILE_TYPE" = xreduced; then
AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.]) AC_MSG_NOTICE([You are doing a reduced build. Check that you have 32-bit libraries installed.])
@ -467,42 +466,42 @@ AC_CHECK_HEADERS([stdio.h], , [
AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.]) AC_MSG_NOTICE([You are doing a cross-compilation. Check that you have all target platform libraries installed.])
fi fi
AC_MSG_ERROR([Cannot continue.]) AC_MSG_ERROR([Cannot continue.])
]) ])
AC_CHECK_SIZEOF([int *], [1111]) AC_CHECK_SIZEOF([int *], [1111])
if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
# Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
SIZEOF_INT_P="$ac_cv_sizeof_int_p" SIZEOF_INT_P="$ac_cv_sizeof_int_p"
fi fi
if test "x$SIZEOF_INT_P" = x; then if test "x$SIZEOF_INT_P" = x; then
# The test failed, lets stick to the assumed value. # The test failed, lets stick to the assumed value.
AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.]) AC_MSG_WARN([The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS.])
else else
TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P` TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)]) AC_MSG_ERROR([The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
fi fi
fi fi
AC_MSG_CHECKING([for target address size]) AC_MSG_CHECKING([for target address size])
AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits]) AC_MSG_RESULT([$OPENJDK_TARGET_CPU_BITS bits])
]) ])
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS], AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
[ [
############################################################################### ###############################################################################
# #
# Is the target little of big endian? # Is the target little of big endian?
# #
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"]) AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
if test "x$ENDIAN" = xuniversal_endianness; then if test "x$ENDIAN" = xuniversal_endianness; then
AC_MSG_ERROR([Building with both big and little endianness is not supported]) AC_MSG_ERROR([Building with both big and little endianness is not supported])
fi fi
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)]) AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
fi fi
]) ])

View File

@ -25,53 +25,52 @@
AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
[ [
# Where are the sources. Any of these can be overridden
# Where are the sources. Any of these can be overridden # using --with-override-corba and the likes.
# using --with-override-corba and the likes. LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" CORBA_TOPDIR="$SRC_ROOT/corba"
CORBA_TOPDIR="$SRC_ROOT/corba" JAXP_TOPDIR="$SRC_ROOT/jaxp"
JAXP_TOPDIR="$SRC_ROOT/jaxp" JAXWS_TOPDIR="$SRC_ROOT/jaxws"
JAXWS_TOPDIR="$SRC_ROOT/jaxws" HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" NASHORN_TOPDIR="$SRC_ROOT/nashorn"
NASHORN_TOPDIR="$SRC_ROOT/nashorn" JDK_TOPDIR="$SRC_ROOT/jdk"
JDK_TOPDIR="$SRC_ROOT/jdk" AC_SUBST(LANGTOOLS_TOPDIR)
AC_SUBST(LANGTOOLS_TOPDIR) AC_SUBST(CORBA_TOPDIR)
AC_SUBST(CORBA_TOPDIR) AC_SUBST(JAXP_TOPDIR)
AC_SUBST(JAXP_TOPDIR) AC_SUBST(JAXWS_TOPDIR)
AC_SUBST(JAXWS_TOPDIR) AC_SUBST(HOTSPOT_TOPDIR)
AC_SUBST(HOTSPOT_TOPDIR) AC_SUBST(NASHORN_TOPDIR)
AC_SUBST(NASHORN_TOPDIR) AC_SUBST(JDK_TOPDIR)
AC_SUBST(JDK_TOPDIR)
]) ])
AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
[ [
############################################################################### ###############################################################################
# #
# Pickup additional source for a component from outside of the source root # Pickup additional source for a component from outside of the source root
# or override source for a component. # or override source for a component.
# #
AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root], AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root],
[for each and every source directory, look in this additional source root for [for each and every source directory, look in this additional source root for
the same directory; if it exists and have files in it, include it in the build])]) the same directory; if it exists and have files in it, include it in the build])])
AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root], AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root],
[for each and every source directory, look in this override source root for [for each and every source directory, look in this override source root for
the same directory; if it exists, use that directory instead and the same directory; if it exists, use that directory instead and
ignore the directory in the original source root])]) ignore the directory in the original source root])])
AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides], AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides],
[use the subdirs 'adds' and 'overrides' in the specified directory as [use the subdirs 'adds' and 'overrides' in the specified directory as
add-source-root and override-source-root])]) add-source-root and override-source-root])])
if test "x$with_adds_and_overrides" != x; then if test "x$with_adds_and_overrides" != x; then
with_add_source_root="$with_adds_and_overrides/adds" with_add_source_root="$with_adds_and_overrides/adds"
with_override_source_root="$with_adds_and_overrides/overrides" with_override_source_root="$with_adds_and_overrides/overrides"
fi fi
if test "x$with_add_source_root" != x; then if test "x$with_add_source_root" != x; then
if ! test -d $with_add_source_root; then if ! test -d $with_add_source_root; then
AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root]) AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root])
fi fi
@ -109,10 +108,10 @@ if test "x$with_add_source_root" != x; then
test -f $with_add_source_root/jdk/make/Makefile; then test -f $with_add_source_root/jdk/make/Makefile; then
AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.]) AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.])
fi fi
fi fi
AC_SUBST(ADD_SRC_ROOT) AC_SUBST(ADD_SRC_ROOT)
if test "x$with_override_source_root" != x; then if test "x$with_override_source_root" != x; then
if ! test -d $with_override_source_root; then if ! test -d $with_override_source_root; then
AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root]) AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root])
fi fi
@ -148,50 +147,50 @@ if test "x$with_override_source_root" != x; then
test -f $with_override_source_root/jdk/make/Makefile; then test -f $with_override_source_root/jdk/make/Makefile; then
AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.]) AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.])
fi fi
fi fi
AC_SUBST(OVERRIDE_SRC_ROOT) AC_SUBST(OVERRIDE_SRC_ROOT)
############################################################################### ###############################################################################
# #
# Override a repo completely, this is used for example when you have 3 small # Override a repo completely, this is used for example when you have 3 small
# development sandboxes of the langtools sources and want to avoid having 3 full # development sandboxes of the langtools sources and want to avoid having 3 full
# OpenJDK sources checked out on disk. # OpenJDK sources checked out on disk.
# #
# Assuming that the 3 langtools sandboxes are located here: # Assuming that the 3 langtools sandboxes are located here:
# /home/fredrik/sandbox1/langtools # /home/fredrik/sandbox1/langtools
# /home/fredrik/sandbox2/langtools # /home/fredrik/sandbox2/langtools
# /home/fredrik/sandbox3/langtools # /home/fredrik/sandbox3/langtools
# #
# From the source root you create build subdirs manually: # From the source root you create build subdirs manually:
# mkdir -p build1 build2 build3 # mkdir -p build1 build2 build3
# in each build directory run: # in each build directory run:
# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) # (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) # (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) # (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
# #
AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools], AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools],
[use this langtools dir for the build])]) [use this langtools dir for the build])])
AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba], AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba],
[use this corba dir for the build])]) [use this corba dir for the build])])
AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp], AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp],
[use this jaxp dir for the build])]) [use this jaxp dir for the build])])
AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws], AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws],
[use this jaxws dir for the build])]) [use this jaxws dir for the build])])
AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot], AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot],
[use this hotspot dir for the build])]) [use this hotspot dir for the build])])
AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn], AC_ARG_WITH(override-nashorn, [AS_HELP_STRING([--with-override-nashorn],
[use this nashorn dir for the build])]) [use this nashorn dir for the build])])
AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk], AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk],
[use this jdk dir for the build])]) [use this jdk dir for the build])])
if test "x$with_override_langtools" != x; then if test "x$with_override_langtools" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_langtools" cd "$with_override_langtools"
LANGTOOLS_TOPDIR="`pwd`" LANGTOOLS_TOPDIR="`pwd`"
@ -201,8 +200,8 @@ if test "x$with_override_langtools" != x; then
fi fi
AC_MSG_CHECKING([if langtools should be overridden]) AC_MSG_CHECKING([if langtools should be overridden])
AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR]) AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR])
fi fi
if test "x$with_override_corba" != x; then if test "x$with_override_corba" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_corba" cd "$with_override_corba"
CORBA_TOPDIR="`pwd`" CORBA_TOPDIR="`pwd`"
@ -212,8 +211,8 @@ if test "x$with_override_corba" != x; then
fi fi
AC_MSG_CHECKING([if corba should be overridden]) AC_MSG_CHECKING([if corba should be overridden])
AC_MSG_RESULT([yes with $CORBA_TOPDIR]) AC_MSG_RESULT([yes with $CORBA_TOPDIR])
fi fi
if test "x$with_override_jaxp" != x; then if test "x$with_override_jaxp" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jaxp" cd "$with_override_jaxp"
JAXP_TOPDIR="`pwd`" JAXP_TOPDIR="`pwd`"
@ -223,8 +222,8 @@ if test "x$with_override_jaxp" != x; then
fi fi
AC_MSG_CHECKING([if jaxp should be overridden]) AC_MSG_CHECKING([if jaxp should be overridden])
AC_MSG_RESULT([yes with $JAXP_TOPDIR]) AC_MSG_RESULT([yes with $JAXP_TOPDIR])
fi fi
if test "x$with_override_jaxws" != x; then if test "x$with_override_jaxws" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jaxws" cd "$with_override_jaxws"
JAXWS_TOPDIR="`pwd`" JAXWS_TOPDIR="`pwd`"
@ -234,8 +233,8 @@ if test "x$with_override_jaxws" != x; then
fi fi
AC_MSG_CHECKING([if jaxws should be overridden]) AC_MSG_CHECKING([if jaxws should be overridden])
AC_MSG_RESULT([yes with $JAXWS_TOPDIR]) AC_MSG_RESULT([yes with $JAXWS_TOPDIR])
fi fi
if test "x$with_override_hotspot" != x; then if test "x$with_override_hotspot" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_hotspot" cd "$with_override_hotspot"
HOTSPOT_TOPDIR="`pwd`" HOTSPOT_TOPDIR="`pwd`"
@ -246,8 +245,8 @@ if test "x$with_override_hotspot" != x; then
fi fi
AC_MSG_CHECKING([if hotspot should be overridden]) AC_MSG_CHECKING([if hotspot should be overridden])
AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR])
fi fi
if test "x$with_override_nashorn" != x; then if test "x$with_override_nashorn" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_nashorn" cd "$with_override_nashorn"
NASHORN_TOPDIR="`pwd`" NASHORN_TOPDIR="`pwd`"
@ -257,8 +256,8 @@ if test "x$with_override_nashorn" != x; then
fi fi
AC_MSG_CHECKING([if nashorn should be overridden]) AC_MSG_CHECKING([if nashorn should be overridden])
AC_MSG_RESULT([yes with $NASHORN_TOPDIR]) AC_MSG_RESULT([yes with $NASHORN_TOPDIR])
fi fi
if test "x$with_override_jdk" != x; then if test "x$with_override_jdk" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_override_jdk" cd "$with_override_jdk"
JDK_TOPDIR="`pwd`" JDK_TOPDIR="`pwd`"
@ -268,22 +267,21 @@ if test "x$with_override_jdk" != x; then
fi fi
AC_MSG_CHECKING([if JDK should be overridden]) AC_MSG_CHECKING([if JDK should be overridden])
AC_MSG_RESULT([yes with $JDK_TOPDIR]) AC_MSG_RESULT([yes with $JDK_TOPDIR])
fi fi
]) ])
AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], AC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
[ [
BUILD_OUTPUT="$OUTPUT_ROOT" BUILD_OUTPUT="$OUTPUT_ROOT"
AC_SUBST(BUILD_OUTPUT) AC_SUBST(BUILD_OUTPUT)
HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
BUILD_HOTSPOT=true BUILD_HOTSPOT=true
AC_SUBST(HOTSPOT_DIST) AC_SUBST(HOTSPOT_DIST)
AC_SUBST(BUILD_HOTSPOT) AC_SUBST(BUILD_HOTSPOT)
AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot], AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot],
[import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])]) [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])])
if test "x$with_import_hotspot" != x; then if test "x$with_import_hotspot" != x; then
CURDIR="$PWD" CURDIR="$PWD"
cd "$with_import_hotspot" cd "$with_import_hotspot"
HOTSPOT_DIST="`pwd`" HOTSPOT_DIST="`pwd`"
@ -294,7 +292,7 @@ if test "x$with_import_hotspot" != x; then
AC_MSG_CHECKING([if hotspot should be imported]) AC_MSG_CHECKING([if hotspot should be imported])
AC_MSG_RESULT([yes from $HOTSPOT_DIST]) AC_MSG_RESULT([yes from $HOTSPOT_DIST])
BUILD_HOTSPOT=false BUILD_HOTSPOT=false
fi fi
JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
]) ])

View File

@ -175,7 +175,7 @@ else
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE) RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
endif endif
ifneq ($(USER_RELEASE_SUFFIX),) ifneq ($(USER_RELEASE_SUFFIX), )
FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER) FULL_VERSION=$(RELEASE)-$(USER_RELEASE_SUFFIX)-$(JDK_BUILD_NUMBER)
else else
FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER) FULL_VERSION=$(RELEASE)-$(JDK_BUILD_NUMBER)
@ -461,7 +461,7 @@ NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main
# Guarding this against resetting value. Legacy make files include spec multiple # Guarding this against resetting value. Legacy make files include spec multiple
# times. # times.
ifndef RC_FLAGS ifndef RC_FLAGS
RC_FLAGS:=@RC_FLAGS@ RC_FLAGS:=@RC_FLAGS@
endif endif
# A specific java binary with specific options can be used to run # A specific java binary with specific options can be used to run

View File

@ -86,25 +86,25 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS], AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
[ [
############################################################################### ###############################################################################
# #
# Configure the development tool paths and potential sysroot. # Configure the development tool paths and potential sysroot.
# #
AC_LANG(C++) AC_LANG(C++)
# The option used to specify the target .o,.a or .so file. # The option used to specify the target .o,.a or .so file.
# When compiling, how to specify the to be created object file. # When compiling, how to specify the to be created object file.
CC_OUT_OPTION='-o$(SPACE)' CC_OUT_OPTION='-o$(SPACE)'
# When linking, how to specify the to be created executable. # When linking, how to specify the to be created executable.
EXE_OUT_OPTION='-o$(SPACE)' EXE_OUT_OPTION='-o$(SPACE)'
# When linking, how to specify the to be created dynamically linkable library. # When linking, how to specify the to be created dynamically linkable library.
LD_OUT_OPTION='-o$(SPACE)' LD_OUT_OPTION='-o$(SPACE)'
# When archiving, how to specify the to be create static archive for object files. # When archiving, how to specify the to be create static archive for object files.
AR_OUT_OPTION='rcs$(SPACE)' AR_OUT_OPTION='rcs$(SPACE)'
AC_SUBST(CC_OUT_OPTION) AC_SUBST(CC_OUT_OPTION)
AC_SUBST(EXE_OUT_OPTION) AC_SUBST(EXE_OUT_OPTION)
AC_SUBST(LD_OUT_OPTION) AC_SUBST(LD_OUT_OPTION)
AC_SUBST(AR_OUT_OPTION) AC_SUBST(AR_OUT_OPTION)
]) ])
# $1 = compiler to test (CC or CXX) # $1 = compiler to test (CC or CXX)
@ -174,26 +174,26 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
AC_DEFUN([TOOLCHAIN_SETUP_PATHS], AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
[ [
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
BASIC_DEPRECATED_ARG_WITH([dxsdk]) BASIC_DEPRECATED_ARG_WITH([dxsdk])
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib]) BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
BASIC_DEPRECATED_ARG_WITH([dxsdk-include]) BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
fi fi
AC_SUBST(MSVCR_DLL) AC_SUBST(MSVCR_DLL)
# If --build AND --host is set, then the configure script will find any # If --build AND --host is set, then the configure script will find any
# cross compilation tools in the PATH. Cross compilation tools # cross compilation tools in the PATH. Cross compilation tools
# follows the cross compilation standard where they are prefixed with ${host}. # follows the cross compilation standard where they are prefixed with ${host}.
# For example the binary i686-sun-solaris2.10-gcc # For example the binary i686-sun-solaris2.10-gcc
# will cross compile for i686-sun-solaris2.10 # will cross compile for i686-sun-solaris2.10
# If neither of build and host is not set, then build=host and the # If neither of build and host is not set, then build=host and the
# default compiler found in the path will be used. # default compiler found in the path will be used.
# Setting only --host, does not seem to be really supported. # Setting only --host, does not seem to be really supported.
# Please set both --build and --host if you want to cross compile. # Please set both --build and --host if you want to cross compile.
if test "x$COMPILE_TYPE" = "xcross"; then if test "x$COMPILE_TYPE" = "xcross"; then
# Now we to find a C/C++ compiler that can build executables for the build # Now we to find a C/C++ compiler that can build executables for the build
# platform. We can't use the AC_PROG_CC macro, since it can only be used # platform. We can't use the AC_PROG_CC macro, since it can only be used
# once. Also, we need to do this before adding a tools dir to the path, # once. Also, we need to do this before adding a tools dir to the path,
@ -206,17 +206,18 @@ if test "x$COMPILE_TYPE" = "xcross"; then
BASIC_FIXUP_EXECUTABLE(BUILD_CXX) BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
AC_PATH_PROG(BUILD_LD, ld) AC_PATH_PROG(BUILD_LD, ld)
BASIC_FIXUP_EXECUTABLE(BUILD_LD) BASIC_FIXUP_EXECUTABLE(BUILD_LD)
fi fi
AC_SUBST(BUILD_CC) AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CXX) AC_SUBST(BUILD_CXX)
AC_SUBST(BUILD_LD) AC_SUBST(BUILD_LD)
# If a devkit is found on the builddeps server, then prepend its path to the # If a devkit is found on the builddeps server, then prepend its path to the
# PATH variable. If there are cross compilers available in the devkit, these # PATH variable. If there are cross compilers available in the devkit, these
# will be found by AC_PROG_CC et al. # will be found by AC_PROG_CC et al.
DEVKIT= DEVKIT=
BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
[# Found devkit [
# Found devkit
PATH="$DEVKIT/bin:$PATH" PATH="$DEVKIT/bin:$PATH"
SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
if test "x$x_includes" = "xNONE"; then if test "x$x_includes" = "xNONE"; then
@ -228,101 +229,101 @@ BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
], ],
[]) [])
# Store the CFLAGS etal passed to the configure script. # Store the CFLAGS etal passed to the configure script.
ORG_CFLAGS="$CFLAGS" ORG_CFLAGS="$CFLAGS"
ORG_CXXFLAGS="$CXXFLAGS" ORG_CXXFLAGS="$CXXFLAGS"
ORG_OBJCFLAGS="$OBJCFLAGS" ORG_OBJCFLAGS="$OBJCFLAGS"
# autoconf magic only relies on PATH, so update it if tools dir is specified # autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH" OLD_PATH="$PATH"
if test "x$TOOLS_DIR" != x; then if test "x$TOOLS_DIR" != x; then
PATH=$TOOLS_DIR:$PATH PATH=$TOOLS_DIR:$PATH
fi fi
### Locate C compiler (CC) ### Locate C compiler (CC)
# On windows, only cl.exe is supported. # On windows, only cl.exe is supported.
# On Solaris, cc is preferred to gcc. # On Solaris, cc is preferred to gcc.
# Elsewhere, gcc is preferred to cc. # Elsewhere, gcc is preferred to cc.
if test "x$CC" != x; then if test "x$CC" != x; then
COMPILER_CHECK_LIST="$CC" COMPILER_CHECK_LIST="$CC"
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
COMPILER_CHECK_LIST="cl" COMPILER_CHECK_LIST="cl"
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
COMPILER_CHECK_LIST="cc gcc" COMPILER_CHECK_LIST="cc gcc"
else else
COMPILER_CHECK_LIST="gcc cc" COMPILER_CHECK_LIST="gcc cc"
fi fi
TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST]) TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
# Now that we have resolved CC ourself, let autoconf have its go at it # Now that we have resolved CC ourself, let autoconf have its go at it
AC_PROG_CC([$CC]) AC_PROG_CC([$CC])
### Locate C++ compiler (CXX) ### Locate C++ compiler (CXX)
if test "x$CXX" != x; then if test "x$CXX" != x; then
COMPILER_CHECK_LIST="$CXX" COMPILER_CHECK_LIST="$CXX"
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
COMPILER_CHECK_LIST="cl" COMPILER_CHECK_LIST="cl"
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
COMPILER_CHECK_LIST="CC g++" COMPILER_CHECK_LIST="CC g++"
else else
COMPILER_CHECK_LIST="g++ CC" COMPILER_CHECK_LIST="g++ CC"
fi fi
TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST]) TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
# Now that we have resolved CXX ourself, let autoconf have its go at it # Now that we have resolved CXX ourself, let autoconf have its go at it
AC_PROG_CXX([$CXX]) AC_PROG_CXX([$CXX])
### Locate other tools ### Locate other tools
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
AC_PROG_OBJC AC_PROG_OBJC
BASIC_FIXUP_EXECUTABLE(OBJC) BASIC_FIXUP_EXECUTABLE(OBJC)
else else
OBJC= OBJC=
fi fi
# Restore the flags to the user specified values. # Restore the flags to the user specified values.
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
CFLAGS="$ORG_CFLAGS" CFLAGS="$ORG_CFLAGS"
CXXFLAGS="$ORG_CXXFLAGS" CXXFLAGS="$ORG_CXXFLAGS"
OBJCFLAGS="$ORG_OBJCFLAGS" OBJCFLAGS="$ORG_OBJCFLAGS"
LD="$CC" LD="$CC"
LDEXE="$CC" LDEXE="$CC"
LDCXX="$CXX" LDCXX="$CXX"
LDEXECXX="$CXX" LDEXECXX="$CXX"
AC_SUBST(LD) AC_SUBST(LD)
# LDEXE is the linker to use, when creating executables. # LDEXE is the linker to use, when creating executables.
AC_SUBST(LDEXE) AC_SUBST(LDEXE)
# Linking C++ libraries. # Linking C++ libraries.
AC_SUBST(LDCXX) AC_SUBST(LDCXX)
# Linking C++ executables. # Linking C++ executables.
AC_SUBST(LDEXECXX) AC_SUBST(LDEXECXX)
if test "x$OPENJDK_TARGET_OS" != xwindows; then if test "x$OPENJDK_TARGET_OS" != xwindows; then
AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(AR, ar)
BASIC_FIXUP_EXECUTABLE(AR) BASIC_FIXUP_EXECUTABLE(AR)
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ARFLAGS="-r" ARFLAGS="-r"
else else
ARFLAGS="" ARFLAGS=""
fi fi
AC_SUBST(ARFLAGS) AC_SUBST(ARFLAGS)
# For hotspot, we need these in Windows mixed path; other platforms keep them the same # For hotspot, we need these in Windows mixed path; other platforms keep them the same
HOTSPOT_CXX="$CXX" HOTSPOT_CXX="$CXX"
HOTSPOT_LD="$LD" HOTSPOT_LD="$LD"
AC_SUBST(HOTSPOT_CXX) AC_SUBST(HOTSPOT_CXX)
AC_SUBST(HOTSPOT_LD) AC_SUBST(HOTSPOT_LD)
COMPILER_NAME=gcc COMPILER_NAME=gcc
COMPILER_TYPE=CC COMPILER_TYPE=CC
AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [ AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
# For now, assume that we are always compiling using cl.exe. # For now, assume that we are always compiling using cl.exe.
CC_OUT_OPTION=-Fo CC_OUT_OPTION=-Fo
EXE_OUT_OPTION=-out: EXE_OUT_OPTION=-out:
@ -397,17 +398,17 @@ AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
COMPILER_TYPE=CL COMPILER_TYPE=CL
CCXXFLAGS="$CCXXFLAGS -nologo" CCXXFLAGS="$CCXXFLAGS -nologo"
]) ])
AC_SUBST(RC_FLAGS) AC_SUBST(RC_FLAGS)
AC_SUBST(COMPILER_TYPE) AC_SUBST(COMPILER_TYPE)
AC_PROG_CPP AC_PROG_CPP
BASIC_FIXUP_EXECUTABLE(CPP) BASIC_FIXUP_EXECUTABLE(CPP)
AC_PROG_CXXCPP AC_PROG_CXXCPP
BASIC_FIXUP_EXECUTABLE(CXXCPP) BASIC_FIXUP_EXECUTABLE(CXXCPP)
if test "x$COMPILE_TYPE" != "xcross"; then if test "x$COMPILE_TYPE" != "xcross"; then
# If we are not cross compiling, use the same compilers for # If we are not cross compiling, use the same compilers for
# building the build platform executables. The cross-compilation # building the build platform executables. The cross-compilation
# case needed to be done earlier, but this can only be done after # case needed to be done earlier, but this can only be done after
@ -415,28 +416,28 @@ if test "x$COMPILE_TYPE" != "xcross"; then
BUILD_CC="$CC" BUILD_CC="$CC"
BUILD_CXX="$CXX" BUILD_CXX="$CXX"
BUILD_LD="$LD" BUILD_LD="$LD"
fi fi
# for solaris we really need solaris tools, and not gnu equivalent # for solaris we really need solaris tools, and not gnu equivalent
# these seems to normally reside in /usr/ccs/bin so add that to path before # these seems to normally reside in /usr/ccs/bin so add that to path before
# starting to probe # starting to probe
# #
# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH # NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
# so that it can be overriden --with-tools-dir # so that it can be overriden --with-tools-dir
if test "x$OPENJDK_BUILD_OS" = xsolaris; then if test "x$OPENJDK_BUILD_OS" = xsolaris; then
PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
fi fi
# Find the right assembler. # Find the right assembler.
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_PATH_PROG(AS, as) AC_PATH_PROG(AS, as)
BASIC_FIXUP_EXECUTABLE(AS) BASIC_FIXUP_EXECUTABLE(AS)
else else
AS="$CC -c" AS="$CC -c"
fi fi
AC_SUBST(AS) AC_SUBST(AS)
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
AC_PATH_PROG(NM, nm) AC_PATH_PROG(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM) BASIC_FIXUP_EXECUTABLE(NM)
AC_PATH_PROG(GNM, gnm) AC_PATH_PROG(GNM, gnm)
@ -445,52 +446,52 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then
BASIC_FIXUP_EXECUTABLE(STRIP) BASIC_FIXUP_EXECUTABLE(STRIP)
AC_PATH_PROG(MCS, mcs) AC_PATH_PROG(MCS, mcs)
BASIC_FIXUP_EXECUTABLE(MCS) BASIC_FIXUP_EXECUTABLE(MCS)
elif test "x$OPENJDK_TARGET_OS" != xwindows; then elif test "x$OPENJDK_TARGET_OS" != xwindows; then
AC_CHECK_TOOL(NM, nm) AC_CHECK_TOOL(NM, nm)
BASIC_FIXUP_EXECUTABLE(NM) BASIC_FIXUP_EXECUTABLE(NM)
GNM="$NM" GNM="$NM"
AC_SUBST(GNM) AC_SUBST(GNM)
AC_CHECK_TOOL(STRIP, strip) AC_CHECK_TOOL(STRIP, strip)
BASIC_FIXUP_EXECUTABLE(STRIP) BASIC_FIXUP_EXECUTABLE(STRIP)
fi fi
# objcopy is used for moving debug symbols to separate files when # objcopy is used for moving debug symbols to separate files when
# full debug symbols are enabled. # full debug symbols are enabled.
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy]) AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
# Only call fixup if objcopy was found. # Only call fixup if objcopy was found.
if test -n "$OBJCOPY"; then if test -n "$OBJCOPY"; then
BASIC_FIXUP_EXECUTABLE(OBJCOPY) BASIC_FIXUP_EXECUTABLE(OBJCOPY)
fi fi
fi fi
AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump]) AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
if test "x$OBJDUMP" != x; then if test "x$OBJDUMP" != x; then
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
BASIC_FIXUP_EXECUTABLE(OBJDUMP) BASIC_FIXUP_EXECUTABLE(OBJDUMP)
fi fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
AC_PATH_PROG(LIPO, lipo) AC_PATH_PROG(LIPO, lipo)
BASIC_FIXUP_EXECUTABLE(LIPO) BASIC_FIXUP_EXECUTABLE(LIPO)
fi fi
TOOLCHAIN_SETUP_JTREG TOOLCHAIN_SETUP_JTREG
# Restore old path without tools dir # Restore old path without tools dir
PATH="$OLD_PATH" PATH="$OLD_PATH"
]) ])
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS], AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
[ [
############################################################################### ###############################################################################
# #
# How to compile shared libraries. # How to compile shared libraries.
# #
if test "x$GCC" = xyes; then if test "x$GCC" = xyes; then
COMPILER_NAME=gcc COMPILER_NAME=gcc
PICFLAG="-fPIC" PICFLAG="-fPIC"
LIBRARY_PREFIX=lib LIBRARY_PREFIX=lib
@ -527,7 +528,7 @@ if test "x$GCC" = xyes; then
SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
POST_STRIP_CMD="$STRIP -S" POST_STRIP_CMD="$STRIP -S"
fi fi
else else
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# If it is not gcc, then assume it is the Oracle Solaris Studio Compiler # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
COMPILER_NAME=ossc COMPILER_NAME=ossc
@ -569,43 +570,43 @@ else
SET_SHARED_LIBRARY_ORIGIN='' SET_SHARED_LIBRARY_ORIGIN=''
SET_EXECUTABLE_ORIGIN='' SET_EXECUTABLE_ORIGIN=''
fi fi
fi fi
AC_SUBST(COMPILER_NAME) AC_SUBST(COMPILER_NAME)
AC_SUBST(OBJ_SUFFIX) AC_SUBST(OBJ_SUFFIX)
AC_SUBST(SHARED_LIBRARY) AC_SUBST(SHARED_LIBRARY)
AC_SUBST(STATIC_LIBRARY) AC_SUBST(STATIC_LIBRARY)
AC_SUBST(LIBRARY_PREFIX) AC_SUBST(LIBRARY_PREFIX)
AC_SUBST(SHARED_LIBRARY_SUFFIX) AC_SUBST(SHARED_LIBRARY_SUFFIX)
AC_SUBST(STATIC_LIBRARY_SUFFIX) AC_SUBST(STATIC_LIBRARY_SUFFIX)
AC_SUBST(EXE_SUFFIX) AC_SUBST(EXE_SUFFIX)
AC_SUBST(SHARED_LIBRARY_FLAGS) AC_SUBST(SHARED_LIBRARY_FLAGS)
AC_SUBST(SET_SHARED_LIBRARY_NAME) AC_SUBST(SET_SHARED_LIBRARY_NAME)
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE) AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
AC_SUBST(C_FLAG_REORDER) AC_SUBST(C_FLAG_REORDER)
AC_SUBST(CXX_FLAG_REORDER) AC_SUBST(CXX_FLAG_REORDER)
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
AC_SUBST(SET_EXECUTABLE_ORIGIN) AC_SUBST(SET_EXECUTABLE_ORIGIN)
AC_SUBST(POST_STRIP_CMD) AC_SUBST(POST_STRIP_CMD)
AC_SUBST(POST_MCS_CMD) AC_SUBST(POST_MCS_CMD)
# The (cross) compiler is now configured, we can now test capabilities # The (cross) compiler is now configured, we can now test capabilities
# of the target platform. # of the target platform.
]) ])
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION], AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
[ [
############################################################################### ###############################################################################
# #
# Setup the opt flags for different compilers # Setup the opt flags for different compilers
# and different operating systems. # and different operating systems.
# #
# #
# NOTE: check for -mstackrealign needs to be below potential addition of -m32 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
# #
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
# While waiting for a better solution, the current workaround is to use -mstackrealign. # While waiting for a better solution, the current workaround is to use -mstackrealign.
CFLAGS="$CFLAGS -mstackrealign" CFLAGS="$CFLAGS -mstackrealign"
@ -617,13 +618,14 @@ if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacos
[ [
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
]) ]
fi )
fi
C_FLAG_DEPS="-MMD -MF" C_FLAG_DEPS="-MMD -MF"
CXX_FLAG_DEPS="-MMD -MF" CXX_FLAG_DEPS="-MMD -MF"
case $COMPILER_TYPE in case $COMPILER_TYPE in
CC ) CC )
case $COMPILER_NAME in case $COMPILER_NAME in
gcc ) gcc )
@ -739,71 +741,71 @@ case $COMPILER_TYPE in
CXX_O_FLAG_NORM="$C_O_FLAG_NORM" CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
CXX_O_FLAG_NONE="$C_O_FLAG_NONE" CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
;; ;;
esac esac
if test -z "$C_O_FLAG_HIGHEST"; then if test -z "$C_O_FLAG_HIGHEST"; then
C_O_FLAG_HIGHEST="$C_O_FLAG_HI" C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
fi fi
if test -z "$CXX_O_FLAG_HIGHEST"; then if test -z "$CXX_O_FLAG_HIGHEST"; then
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
fi fi
AC_SUBST(C_O_FLAG_HIGHEST) AC_SUBST(C_O_FLAG_HIGHEST)
AC_SUBST(C_O_FLAG_HI) AC_SUBST(C_O_FLAG_HI)
AC_SUBST(C_O_FLAG_NORM) AC_SUBST(C_O_FLAG_NORM)
AC_SUBST(C_O_FLAG_NONE) AC_SUBST(C_O_FLAG_NONE)
AC_SUBST(CXX_O_FLAG_HIGHEST) AC_SUBST(CXX_O_FLAG_HIGHEST)
AC_SUBST(CXX_O_FLAG_HI) AC_SUBST(CXX_O_FLAG_HI)
AC_SUBST(CXX_O_FLAG_NORM) AC_SUBST(CXX_O_FLAG_NORM)
AC_SUBST(CXX_O_FLAG_NONE) AC_SUBST(CXX_O_FLAG_NONE)
AC_SUBST(C_FLAG_DEPS) AC_SUBST(C_FLAG_DEPS)
AC_SUBST(CXX_FLAG_DEPS) AC_SUBST(CXX_FLAG_DEPS)
]) ])
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
[ [
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags]) AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
fi fi
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags]) AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
fi fi
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags]) AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
fi fi
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags], AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
[extra flags to be used when compiling jdk c-files])]) [extra flags to be used when compiling jdk c-files])])
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags], AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
[extra flags to be used when compiling jdk c++-files])]) [extra flags to be used when compiling jdk c++-files])])
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags], AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
[extra flags to be used when linking jdk])]) [extra flags to be used when linking jdk])])
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
# Hotspot needs these set in their legacy form # Hotspot needs these set in their legacy form
LEGACY_EXTRA_CFLAGS=$with_extra_cflags LEGACY_EXTRA_CFLAGS=$with_extra_cflags
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
AC_SUBST(LEGACY_EXTRA_CFLAGS) AC_SUBST(LEGACY_EXTRA_CFLAGS)
AC_SUBST(LEGACY_EXTRA_CXXFLAGS) AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
AC_SUBST(LEGACY_EXTRA_LDFLAGS) AC_SUBST(LEGACY_EXTRA_LDFLAGS)
############################################################################### ###############################################################################
# #
# Now setup the CFLAGS and LDFLAGS for the JDK build. # Now setup the CFLAGS and LDFLAGS for the JDK build.
# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
# #
case $COMPILER_NAME in case $COMPILER_NAME in
gcc ) gcc )
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
-pipe \ -pipe \
@ -851,12 +853,12 @@ case $COMPILER_NAME in
;; ;;
esac esac
;; ;;
esac esac
############################################################################### ###############################################################################
# Adjust flags according to debug level. # Adjust flags according to debug level.
case $DEBUG_LEVEL in case $DEBUG_LEVEL in
fastdebug ) fastdebug )
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
@ -875,15 +877,15 @@ case $DEBUG_LEVEL in
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
JAVAC_FLAGS="$JAVAC_FLAGS -g" JAVAC_FLAGS="$JAVAC_FLAGS -g"
;; ;;
esac esac
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
# The package path is used only on macosx? # The package path is used only on macosx?
PACKAGE_PATH=/opt/local PACKAGE_PATH=/opt/local
AC_SUBST(PACKAGE_PATH) AC_SUBST(PACKAGE_PATH)
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
@ -894,19 +896,19 @@ if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
else else
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
fi fi
else else
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
fi fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
fi fi
if test "x$OPENJDK_TARGET_OS" = xwindows; then if test "x$OPENJDK_TARGET_OS" = xwindows; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
fi fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
# Setting these parameters makes it an error to link to macosx APIs that are # Setting these parameters makes it an error to link to macosx APIs that are
# newer than the given OS version and makes the linked binaries compatible even # newer than the given OS version and makes the linked binaries compatible even
@ -919,23 +921,23 @@ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# command line. # command line.
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
fi fi
if test "x$OPENJDK_TARGET_OS" = xbsd; then if test "x$OPENJDK_TARGET_OS" = xbsd; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
fi fi
if test "x$DEBUG_LEVEL" = xrelease; then if test "x$DEBUG_LEVEL" = xrelease; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
if test "x$OPENJDK_TARGET_OS" = xsolaris; then if test "x$OPENJDK_TARGET_OS" = xsolaris; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
fi fi
else else
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
fi fi
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-I${JDK_OUTPUTDIR}/include \ -I${JDK_OUTPUTDIR}/include \
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
-I${JDK_TOPDIR}/src/share/javavm/export \ -I${JDK_TOPDIR}/src/share/javavm/export \
@ -943,23 +945,23 @@ CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
-I${JDK_TOPDIR}/src/share/native/common \ -I${JDK_TOPDIR}/src/share/native/common \
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
# The shared libraries are compiled using the picflag. # The shared libraries are compiled using the picflag.
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
# Executable flags # Executable flags
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
# Now this is odd. The JDK native libraries have to link against libjvm.so # Now this is odd. The JDK native libraries have to link against libjvm.so
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server. # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
# is identical for client and server? Yes. Which is picked at runtime (client or server)? # is identical for client and server? Yes. Which is picked at runtime (client or server)?
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
# libraries will link to whatever is in memory. Yuck. # libraries will link to whatever is in memory. Yuck.
# #
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
if test "x$COMPILER_NAME" = xcl; then if test "x$COMPILER_NAME" = xcl; then
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
if test "x$OPENJDK_TARGET_CPU" = xx86; then if test "x$OPENJDK_TARGET_CPU" = xx86; then
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
@ -974,7 +976,7 @@ if test "x$COMPILER_NAME" = xcl; then
LDFLAGS_STACK_SIZE=327680 LDFLAGS_STACK_SIZE=327680
fi fi
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
else else
if test "x$COMPILER_NAME" = xgcc; then if test "x$COMPILER_NAME" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why? # If this is a --hash-style=gnu system, use --hash-style=both, why?
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
@ -1018,19 +1020,19 @@ else
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
fi fi
fi fi
AC_SUBST(CFLAGS_JDKLIB) AC_SUBST(CFLAGS_JDKLIB)
AC_SUBST(CFLAGS_JDKEXE) AC_SUBST(CFLAGS_JDKEXE)
AC_SUBST(CXXFLAGS_JDKLIB) AC_SUBST(CXXFLAGS_JDKLIB)
AC_SUBST(CXXFLAGS_JDKEXE) AC_SUBST(CXXFLAGS_JDKEXE)
AC_SUBST(LDFLAGS_JDKLIB) AC_SUBST(LDFLAGS_JDKLIB)
AC_SUBST(LDFLAGS_JDKEXE) AC_SUBST(LDFLAGS_JDKEXE)
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX) AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX) AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
AC_SUBST(LDFLAGS_CXX_JDK) AC_SUBST(LDFLAGS_CXX_JDK)
]) ])
@ -1046,18 +1048,16 @@ AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
saved_cflags="$CFLAGS" saved_cflags="$CFLAGS"
CFLAGS="$CFLAGS $1" CFLAGS="$CFLAGS $1"
AC_LANG_PUSH([C]) AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
AC_LANG_SOURCE([[int i;]]) [supports=no])
], [], [supports=no])
AC_LANG_POP([C]) AC_LANG_POP([C])
CFLAGS="$saved_cflags" CFLAGS="$saved_cflags"
saved_cxxflags="$CXXFLAGS" saved_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAG $1" CXXFLAGS="$CXXFLAG $1"
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [],
AC_LANG_SOURCE([[int i;]]) [supports=no])
], [], [supports=no])
AC_LANG_POP([C++]) AC_LANG_POP([C++])
CXXFLAGS="$saved_cxxflags" CXXFLAGS="$saved_cxxflags"

View File

@ -76,31 +76,31 @@ define add_idl_package
endef endef
define SetupIdlCompilation define SetupIdlCompilation
# param 1 is for example BUILD_IDLS # param 1 is for example BUILD_IDLS
# param 2,3,4,5,6,7,8 are named args. # param 2,3,4,5,6,7,8 are named args.
# IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES # IDLJ,SRC,BIN,INCLUDES,EXCLUDES,OLDIMPLBASES,DELETES
$(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15, $(if $($i),$1_$(strip $($i)))$(NEWLINE))
$(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15)) $(call LogSetupMacroEntry,SetupIdlCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
$(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk)) $(if $(16),$(error Internal makefile error: Too many arguments to SetupIdlCompilation, please update IdlCompilation.gmk))
# Find all existing java files and existing class files. # Find all existing java files and existing class files.
$$(eval $$(call MakeDir,$$($1_BIN))) $$(eval $$(call MakeDir,$$($1_BIN)))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl") $1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
$1_BINS := $$(shell find $$($1_BIN) -name "*.java") $1_BINS := $$(shell find $$($1_BIN) -name "*.java")
# Prepend the source/bin path to the filter expressions. # Prepend the source/bin path to the filter expressions.
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES)) $1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES)) $1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES)) $1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES)) $1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES)) $1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
# Now remove unwanted java/class files. # Now remove unwanted java/class files.
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS)) $1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS)) $1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS)) $1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS)) $1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS))) $1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
# Now create the dependencies for each idl target. # Now create the dependencies for each idl target.
$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ)))) $$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
endef endef
.SUFFIXES: .java .class .package .SUFFIXES: .java .class .package

View File

@ -105,7 +105,7 @@ define SetupArchive
# On windows, a lot of includes/excludes risk making the command line too long, so # On windows, a lot of includes/excludes risk making the command line too long, so
# writing the grep patterns to files. # writing the grep patterns to files.
ifneq (,$$($1_INCLUDES)) ifneq (,$$($1_INCLUDES))
$1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),\ $1_GREP_INCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS), \
$$(addprefix $$(src)/,$$($1_INCLUDES))) $$(addprefix $$(src)/,$$($1_INCLUDES)))
# If there are a lot of include patterns, output to file to shorten command lines # If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),) ifeq ($$(word 20,$$($1_GREP_INCLUDE_PATTERNS)),)
@ -118,7 +118,7 @@ define SetupArchive
endif endif
endif endif
ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES)) ifneq (,$$($1_EXCLUDES)$$($1_EXCLUDE_FILES))
$1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/,\ $1_GREP_EXCLUDE_PATTERNS:=$$(foreach src,$$($1_SRCS),$$(addprefix $$(src)/, \
$$($1_EXCLUDES) $$($1_EXCLUDE_FILES))) $$($1_EXCLUDES) $$($1_EXCLUDE_FILES)))
# If there are a lot of include patterns, output to file to shorten command lines # If there are a lot of include patterns, output to file to shorten command lines
ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),) ifeq ($$(word 20,$$($1_GREP_EXCLUDE_PATTERNS)),)
@ -143,7 +143,7 @@ define SetupArchive
ifneq (,$2) ifneq (,$2)
$1_DEPS:=$2 $1_DEPS:=$2
else else
$1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)),\ $1_DEPS:=$$(filter $$(addprefix %,$$($1_SUFFIXES)), \
$$(call CacheFind,$$($1_SRCS))) $$(call CacheFind,$$($1_SRCS)))
ifneq (,$$($1_GREP_INCLUDE_PATTERNS)) ifneq (,$$($1_GREP_INCLUDE_PATTERNS))
$1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS)) $1_DEPS:=$$(filter $$(addsuffix %,$$($1_GREP_INCLUDE_PATTERNS)),$$($1_DEPS))
@ -163,9 +163,9 @@ define SetupArchive
# The capture contents macro finds all files (matching the patterns, typically # The capture contents macro finds all files (matching the patterns, typically
# .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar. # .class and .prp) that are newer than the jar-file, ie the new content to be put into the jar.
$1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\ $1_CAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \ (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) -a -newer $$@ $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
$(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \ $(ECHO) $$(subst $$(src)/,,$$($1_EXTRA_FILES))) > \
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE)) $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
# The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file. # The capture metainf macro finds all files below the META-INF directory that are newer than the jar-file.
@ -177,25 +177,25 @@ define SetupArchive
$1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE)) $1_CAPTURE_DELETES=$$(foreach src,$$($1_SRCS),($(FIND) $$(src) -name _the.package.deleted -newer $$@ -exec $(SED) 's|$$(src)||g' \{\} >> $$($1_DELETES_FILE) \;) $$(NEWLINE))
# The update contents macro updates the jar file with the previously capture contents. # The update contents macro updates the jar file with the previously capture contents.
# xargs is used to trim the whitespace from the contents file, to see if it is empty. # xargs is used to trim the whitespace from the contents file, to see if it is empty.
$1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\ $1_UPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
(cd $$(src) && \ (cd $$(src) && \
if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \ if [ -n "`$(CAT) _the.$$($1_JARNAME)_contents | $(XARGS)`" ]; then \
$(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \ $(ECHO) " updating" `$(WC) -l _the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
$(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \ $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @_the.$$($1_JARNAME)_contents; \
fi) $$(NEWLINE)) fi) $$(NEWLINE))
# The s-variants of the above macros are used when the jar is created from scratch. # The s-variants of the above macros are used when the jar is created from scratch.
$1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS),\ $1_SCAPTURE_CONTENTS=$$(foreach src,$$($1_SRCS), \
(($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \ (($(FIND) $$(src) -type f -a \( $$($1_FIND_PATTERNS) \) $$($1_GREP_INCLUDES) \
$$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' &&\ $$($1_GREP_EXCLUDES) | $(SED) 's|$$(src)/||g' && \
$$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \ $$(subst $$(src)/,,$(ECHO) $$($1_EXTRA_FILES))) > \
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE)) $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
ifeq (,$$($1_SKIP_METAINF)) ifeq (,$$($1_SKIP_METAINF))
$1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS),\ $1_SCAPTURE_METAINF=$$(foreach src,$$($1_SRCS), \
($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \ ($(FIND) $$(src)/META-INF -type f 2> /dev/null | $(SED) 's|$$(src)/||g' >> \
$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE)) $$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
endif endif
$1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS),\ $1_SUPDATE_CONTENTS=$$(foreach src,$$($1_SRCS), \
(cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE)) (cd $$(src) && $(JAR) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$(src)/_the.$$($1_JARNAME)_contents) $$(NEWLINE))
# Use a slightly shorter name for logging, but with enough path to identify this jar. # Use a slightly shorter name for logging, but with enough path to identify this jar.
@ -218,27 +218,27 @@ define SetupArchive
$(MKDIR) -p $$($1_BIN) $(MKDIR) -p $$($1_BIN)
$$($1_GREP_INCLUDE_OUTPUT) $$($1_GREP_INCLUDE_OUTPUT)
$$($1_GREP_EXCLUDE_OUTPUT) $$($1_GREP_EXCLUDE_OUTPUT)
$$(if $$($1_MANIFEST),\ $$(if $$($1_MANIFEST), \
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \ $(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \ -e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $$($1_MANIFEST) > $$($1_MANIFEST_FILE) \
,\ , \
$(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE)) $(RM) $$($1_MANIFEST_FILE) && $(TOUCH) $$($1_MANIFEST_FILE))
$$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE)) $$(if $$($1_JARMAIN),$(ECHO) "Main-Class: $$(strip $$($1_JARMAIN))" >> $$($1_MANIFEST_FILE))
$$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE)) $$(if $$($1_EXTRA_MANIFEST_ATTR),$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE))
$$(if $$(wildcard $$@),\ $$(if $$(wildcard $$@), \
$(ECHO) Modifying $$($1_NAME) $$(NEWLINE)\ $(ECHO) Modifying $$($1_NAME) $$(NEWLINE) \
$$($1_CAPTURE_CONTENTS) \ $$($1_CAPTURE_CONTENTS) \
$$($1_CAPTURE_METAINF) \ $$($1_CAPTURE_METAINF) \
$(RM) $$($1_DELETES_FILE) $$(NEWLINE)\ $(RM) $$($1_DELETES_FILE) $$(NEWLINE) \
$$($1_CAPTURE_DELETES) \ $$($1_CAPTURE_DELETES) \
$(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE)\ $(CAT) $$($1_DELETES_FILE) > $$($1_DELETESS_FILE) $$(NEWLINE) \
if [ -s $$($1_DELETESS_FILE) ]; then \ if [ -s $$($1_DELETESS_FILE) ]; then \
$(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \ $(ECHO) " deleting" `$(WC) -l $$($1_DELETESS_FILE) | $(AWK) '{ print $$$$1 }'` files && \
$(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \ $(ZIP) -q -d $$@ `$(CAT) $$($1_DELETESS_FILE)` ; \
fi $$(NEWLINE) \ fi $$(NEWLINE) \
$$($1_UPDATE_CONTENTS) true $$(NEWLINE) \ $$($1_UPDATE_CONTENTS) true $$(NEWLINE) \
$$($1_JARINDEX) && true \ $$($1_JARINDEX) && true \
,\ , \
$(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \ $(ECHO) Creating $$($1_NAME) && $(JAR) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
$$($1_SCAPTURE_CONTENTS) \ $$($1_SCAPTURE_CONTENTS) \
$$($1_SCAPTURE_METAINF) \ $$($1_SCAPTURE_METAINF) \
@ -259,19 +259,19 @@ define SetupZipArchive
# on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set # on some configurations (cygwin), use INCLUDES and INCLUDE_FILES to build a set
# of directories to run find in, if available. # of directories to run find in, if available.
ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),) ifneq ($$($1_INCLUDES)$$($1_INCLUDE_FILES),)
$1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC),\ $1_FIND_LIST := $$(wildcard $$(foreach i,$$($1_SRC), \
$$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES)))) $$(addprefix $$i/,$$($1_INCLUDES) $$($1_INCLUDE_FILES))))
else else
$1_FIND_LIST := $$($1_SRC) $1_FIND_LIST := $$($1_SRC)
endif endif
# Find all files in the source tree. # Find all files in the source tree.
$1_ALL_SRCS := $$(call not-containing,_the.,\ $1_ALL_SRCS := $$(call not-containing,_the., \
$$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST)))) $$(filter $$(addprefix %,$$($1_SUFFIXES)),$$(call CacheFind,$$($1_FIND_LIST))))
ifneq ($$($1_INCLUDES),) ifneq ($$($1_INCLUDES),)
ifneq ($$($1_SUFFIXES),) ifneq ($$($1_SUFFIXES),)
$1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES),\ $1_ZIP_INCLUDES := $$(foreach s,$$($1_SUFFIXES), \
$$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES)))) $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$$s$(DQUOTE),$$($1_INCLUDES))))
else else
$1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES))) $1_ZIP_INCLUDES := $$(addprefix -i$(SPACE)$(DQUOTE),$$(addsuffix /*$(DQUOTE),$$($1_INCLUDES)))
@ -560,28 +560,28 @@ define SetupJavaCompilation
$1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY) $1_SUFFIXES:=.class $$($1_CLEAN) $$($1_COPY)
endif endif
$$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1),\ $$(eval $$(call SetupArchive,ARCHIVE_$1,$$($1), \
SRCS:=$$($1_BIN),\ SRCS:=$$($1_BIN), \
SUFFIXES:=$$($1_SUFFIXES),\ SUFFIXES:=$$($1_SUFFIXES), \
EXCLUDE:=$$($1_EXCLUDES),\ EXCLUDE:=$$($1_EXCLUDES), \
INCLUDES:=$$($1_INCLUDES),\ INCLUDES:=$$($1_INCLUDES), \
EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS),\ EXTRA_FILES:=$$($1_ALL_COPY_TARGETS) $$($1_ALL_COPY_CLEAN_TARGETS), \
JAR:=$$($1_JAR),\ JAR:=$$($1_JAR), \
JARMAIN:=$$($1_JARMAIN),\ JARMAIN:=$$($1_JARMAIN), \
MANIFEST:=$$($1_MANIFEST),\ MANIFEST:=$$($1_MANIFEST), \
EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR),\ EXTRA_MANIFEST_ATTR:=$$($1_EXTRA_MANIFEST_ATTR), \
JARINDEX:=$$($1_JARINDEX),\ JARINDEX:=$$($1_JARINDEX), \
HEADERS:=$$($1_HEADERS),\ HEADERS:=$$($1_HEADERS), \
SETUP:=$$($1_SETUP))) SETUP:=$$($1_SETUP)))
endif endif
# Check if a srczip was specified, then setup the rules for the srczip. # Check if a srczip was specified, then setup the rules for the srczip.
ifneq (,$$($1_SRCZIP)) ifneq (,$$($1_SRCZIP))
$$(eval $$(call SetupZipArchive,ARCHIVE_$1,\ $$(eval $$(call SetupZipArchive,ARCHIVE_$1, \
SRC:=$$($1_SRC),\ SRC:=$$($1_SRC), \
ZIP:=$$($1_SRCZIP),\ ZIP:=$$($1_SRCZIP), \
INCLUDES:=$$($1_INCLUDES),\ INCLUDES:=$$($1_INCLUDES), \
EXCLUDES:=$$($1_EXCLUDES),\ EXCLUDES:=$$($1_EXCLUDES), \
EXCLUDE_FILES:=$$($1_EXCLUDE_FILES))) EXCLUDE_FILES:=$$($1_EXCLUDE_FILES)))
endif endif

View File

@ -85,36 +85,36 @@ $(BUILD_DIR_ROOT)/.bridge2configureOptsLatest: FRC
$(RM) $@.tmp $(RM) $@.tmp
$(MKDIR) -p $(BUILD_DIR_ROOT) $(MKDIR) -p $(BUILD_DIR_ROOT)
@$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp @$(ECHO) " --with-debug-level=$(if $(DEBUG_LEVEL),$(DEBUG_LEVEL),release) " >> $@.tmp
ifdef ARCH_DATA_MODEL ifdef ARCH_DATA_MODEL
@$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp @$(ECHO) " --with-target-bits=$(ARCH_DATA_MODEL) " >> $@.tmp
endif endif
ifeq ($(ARCH_DATA_MODEL),32) ifeq ($(ARCH_DATA_MODEL),32)
@$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp @$(ECHO) " --with-jvm-variants=client,server " >> $@.tmp
endif endif
ifdef ALT_PARALLEL_COMPILE_JOBS ifdef ALT_PARALLEL_COMPILE_JOBS
@$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp @$(ECHO) " --with-num-cores=$(ALT_PARALLEL_COMPILE_JOBS) " >> $@.tmp
endif endif
ifdef ALT_BOOTDIR ifdef ALT_BOOTDIR
@$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp @$(ECHO) " --with-boot-jdk=$(call UnixPath,$(ALT_BOOTDIR)) " >> $@.tmp
endif endif
ifdef ALT_CUPS_HEADERS_PATH ifdef ALT_CUPS_HEADERS_PATH
@$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp @$(ECHO) " --with-cups-include=$(call UnixPath,$(ALT_CUPS_HEADERS_PATH)) " >> $@.tmp
endif endif
ifdef ALT_FREETYPE_HEADERS_PATH ifdef ALT_FREETYPE_HEADERS_PATH
@$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp @$(ECHO) " --with-freetype=$(call UnixPath,$(ALT_FREETYPE_HEADERS_PATH)/..) " >> $@.tmp
endif endif
ifdef ENABLE_SJAVAC ifdef ENABLE_SJAVAC
@$(ECHO) " --enable-sjavac" >> $@.tmp @$(ECHO) " --enable-sjavac" >> $@.tmp
endif endif
ifeq ($(HOTSPOT_AVAILABLE),false) ifeq ($(HOTSPOT_AVAILABLE),false)
ifdef ALT_JDK_IMPORT_PATH ifdef ALT_JDK_IMPORT_PATH
@$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp @$(ECHO) " --with-import-hotspot=$(call UnixPath,$(ALT_JDK_IMPORT_PATH)) " >> $@.tmp
endif endif
endif endif
ifeq ($(OPEN_BUILD),true) ifeq ($(OPEN_BUILD),true)
@$(ECHO) " --enable-openjdk-only " >> $@.tmp @$(ECHO) " --enable-openjdk-only " >> $@.tmp
else else
# Todo: move to closed? # Todo: move to closed?
ifdef ALT_MOZILLA_HEADERS_PATH ifdef ALT_MOZILLA_HEADERS_PATH
@$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp @$(ECHO) " --with-mozilla-headers=$(call UnixPath,$(ALT_MOZILLA_HEADERS_PATH)) " >> $@.tmp
endif endif
@ -151,7 +151,7 @@ else
ifdef ALT_SPARKLE_FRAMEWORK_DIR ifdef ALT_SPARKLE_FRAMEWORK_DIR
@$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp @$(ECHO) " --with-sparkle-framework=$(call UnixPath,$(ALT_SPARKLE_FRAMEWORK_DIR)) " >> $@.tmp
endif endif
endif endif
@if [ -f $@ ] ; then \ @if [ -f $@ ] ; then \
if ! $(CMP) $@ $@.tmp > /dev/null ; then \ if ! $(CMP) $@ $@.tmp > /dev/null ; then \
$(CP) $@.tmp $@ ; \ $(CP) $@.tmp $@ ; \
@ -226,12 +226,12 @@ final-images-only: start-make
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)
$(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/ $(CP) -R -P $(SRC_JDK_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_IMAGE_SUBDIR)/
$(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/ $(CP) -R -P $(SRC_JRE_IMAGE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_IMAGE_SUBDIR)/
ifeq ($(OPENJDK_TARGET_OS),macosx) ifeq ($(OPENJDK_TARGET_OS),macosx)
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)
$(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR) $(MKDIR) -p $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)
$(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/ $(CP) -R -P $(SRC_JDK_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JDK_BUNDLE_SUBDIR)/
$(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/ $(CP) -R -P $(SRC_JRE_BUNDLE_DIR)/* $(BUILD_OUTPUT)/final-images/$(JRE_BUNDLE_SUBDIR)/
endif endif
@$(call TargetExit) @$(call TargetExit)

View File

@ -103,8 +103,8 @@ jaxws-only: start-make
@$(call TargetExit) @$(call TargetExit)
ifeq ($(BUILD_HOTSPOT),true) ifeq ($(BUILD_HOTSPOT),true)
hotspot: hotspot-only hotspot: hotspot-only
hotspot-only: start-make hotspot-only: start-make
@$(call TargetEnter) @$(call TargetEnter)
@($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk) @($(CD) $(SRC_ROOT)/common/makefiles && $(BUILD_LOG_WRAPPER) $(MAKE) $(MAKE_ARGS) -f HotspotWrapper.gmk)
@$(call TargetExit) @$(call TargetExit)
@ -149,9 +149,9 @@ profiles-only: start-make
@$(call TargetExit) @$(call TargetExit)
profiles-oscheck: profiles-oscheck:
ifneq ($(OPENJDK_TARGET_OS), linux) ifneq ($(OPENJDK_TARGET_OS), linux)
@echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1 @echo "Error: The Java SE 8 Compact Profiles are only implemented for Linux at this time" && exit 1
endif endif
install: images install-only install: images install-only
install-only: start-make install-only: start-make
@ -203,7 +203,7 @@ dist-clean: clean
@($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers) @($(CD) $(OUTPUT_ROOT) && $(RM) -r *spec.gmk config.* configure-arguments Makefile compare.sh spec.sh tmp javacservers)
@$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \ @$(if $(filter $(CONF_NAME),$(notdir $(OUTPUT_ROOT))), \
if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \ if test "x`$(LS) $(OUTPUT_ROOT)`" != x; then \
$(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ;\ $(ECHO) "Warning: Not removing non-empty configuration directory for '$(CONF_NAME)'" ; \
else \ else \
($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \ ($(CD) $(SRC_ROOT) && $(ECHO) "Removing configuration directory for '$(CONF_NAME)'" && $(RM) -r $(OUTPUT_ROOT)) \
fi \ fi \

View File

@ -306,8 +306,8 @@ REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \
# Emit the repo:tip pairs to $@ # Emit the repo:tip pairs to $@
define GetSourceTips define GetSourceTips
$(CD) $(SRC_ROOT) ; \ $(CD) $(SRC_ROOT) ; \
for i in $(REPO_LIST) IGNORE ; do \ for i in $(REPO_LIST) IGNORE ; do \
if [ "$${i}" = "IGNORE" ] ; then \ if [ "$${i}" = "IGNORE" ] ; then \
continue; \ continue; \
elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \ elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \
@ -317,14 +317,14 @@ for i in $(REPO_LIST) IGNORE ; do \
$(PRINTF) " %s:%s" \ $(PRINTF) " %s:%s" \
"$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \ "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \
fi; \ fi; \
done >> $@ done >> $@
$(PRINTF) "\n" >> $@ $(PRINTF) "\n" >> $@
endef endef
# Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk # Create the HGTIP_FILENAME file. Called from jdk/make/closed/bundles.gmk
define CreateHgTip define CreateHgTip
$(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME);\ $(HG) tip --repository $1 --template '{node|short}\n' > $1/$(HGTIP_FILENAME); \
$(ECHO) $1/$(HGTIP_FILENAME) $(ECHO) $1/$(HGTIP_FILENAME)
endef endef
define SetupLogging define SetupLogging
@ -375,31 +375,31 @@ define MakeDir
endef endef
ifeq ($(OPENJDK_TARGET_OS),solaris) ifeq ($(OPENJDK_TARGET_OS),solaris)
# On Solaris, if the target is a symlink and exists, cp won't overwrite. # On Solaris, if the target is a symlink and exists, cp won't overwrite.
# Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the # Cp has to operate in recursive mode to allow for -P flag, to preserve soft links. If the
# name of the target file differs from the source file, rename after copy. # name of the target file differs from the source file, rename after copy.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) '$@' $(RM) '$@'
$(CP) -f -r -P '$<' '$(@D)' $(CP) -f -r -P '$<' '$(@D)'
if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi if [ "$(@F)" != "$(<F)" ]; then $(MV) '$(@D)/$(<F)' '$@'; fi
endef endef
else ifeq ($(OPENJDK_TARGET_OS),macosx) else ifeq ($(OPENJDK_TARGET_OS),macosx)
# On mac, extended attributes sometimes creep into the source files, which may later # On mac, extended attributes sometimes creep into the source files, which may later
# cause the creation of ._* files which confuses testing. Clear these with xattr if # cause the creation of ._* files which confuses testing. Clear these with xattr if
# set. Some files get their write permissions removed after being copied to the # set. Some files get their write permissions removed after being copied to the
# output dir. When these are copied again to images, xattr would fail. By only clearing # output dir. When these are copied again to images, xattr would fail. By only clearing
# attributes when they are present, failing on this is avoided. # attributes when they are present, failing on this is avoided.
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -fRP '$<' '$@' $(CP) -fRP '$<' '$@'
if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi if [ -n "`$(XATTR) -l '$@'`" ]; then $(XATTR) -c '$@'; fi
endef endef
else else
define install-file define install-file
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(CP) -fP '$<' '$@' $(CP) -fP '$<' '$@'
endef endef
endif endif
# Convenience functions for working around make's limitations with $(filter ). # Convenience functions for working around make's limitations with $(filter ).
@ -421,13 +421,13 @@ not-containing = $(foreach v,$2,$(if $(findstring $1,$v),,$v))
# #
# Param 1 - Dir to find in # Param 1 - Dir to find in
ifeq ($(OPENJDK_BUILD_OS),windows) ifeq ($(OPENJDK_BUILD_OS),windows)
define FillCacheFind define FillCacheFind
FIND_CACHE_DIR += $1 FIND_CACHE_DIR += $1
FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l)) FIND_CACHE := $$(sort $$(FIND_CACHE) $$(shell $(FIND) $1 -type f -o -type l))
endef endef
else else
define FillCacheFind define FillCacheFind
endef endef
endif endif
# Mimics find by looking in the cache if all of the directories have been cached. # Mimics find by looking in the cache if all of the directories have been cached.
@ -437,8 +437,8 @@ endif
# The extra - is needed when FIND_CACHE_DIR is empty but should be harmless. # The extra - is needed when FIND_CACHE_DIR is empty but should be harmless.
# Param 1 - Dirs to find in # Param 1 - Dirs to find in
define CacheFind define CacheFind
$(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1),\ $(if $(filter-out $(addsuffix %,- $(FIND_CACHE_DIR)),$1), \
$(shell $(FIND) $1 -type f -o -type l),\ $(shell $(FIND) $1 -type f -o -type l), \
$(filter $(addsuffix %,$1),$(FIND_CACHE))) $(filter $(addsuffix %,$1),$(FIND_CACHE)))
endef endef

View File

@ -369,9 +369,9 @@ define SetupNativeCompilation
endif endif
# Now call add_native_source for each source file we are going to compile. # Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS),\ $$(foreach p,$$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR),\ $$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
$$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC),\ $$($1_CFLAGS) $$($1_EXTRA_CFLAGS),$$($1_CC), \
$$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS)))) $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS),$(CXX),$$($1_ASFLAGS))))
# On windows we need to create a resource file # On windows we need to create a resource file

View File

@ -79,14 +79,14 @@ define SetupRMICompilation
$$($1_DEP_FILE): $$($1_CLASS_FILES) $$($1_DEP_FILE): $$($1_CLASS_FILES)
$(MKDIR) -p $$($1_STUB_CLASSES_DIR) $(MKDIR) -p $$($1_STUB_CLASSES_DIR)
if [ "x$$($1_ARGS)" != "x" ]; then \ if [ "x$$($1_ARGS)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi; fi;
if [ "x$$($1_ARGS2)" != "x" ]; then \ if [ "x$$($1_ARGS2)" != "x" ]; then \
$(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) &&\ $(ECHO) $(LOG_INFO) Running rmic $$($1_ARGS2) for $$($1_DOLLAR_SAFE_CLASSES) && \
$(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \ $(RMIC) $$($1_ARGS2) -classpath "$$($1_CLASSES_DIR)" \
-d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES);\ -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \
fi; fi;

View File

@ -72,7 +72,7 @@ $(info Building on platform $(me))
all compile : $(platforms) all compile : $(platforms)
ifeq (,$(SKIP_ME)) ifeq (,$(SKIP_ME))
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me))) $(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
endif endif
OUTPUT_ROOT = $(abspath ../../../build/devkit) OUTPUT_ROOT = $(abspath ../../../build/devkit)
@ -99,10 +99,10 @@ today := $(shell date +%Y%m%d)
define Mktar define Mktar
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz $(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
$$($(1)_tar) : PLATFORM = $(1) $$($(1)_tar) : PLATFORM = $(1)
TARFILES += $$($(1)_tar) TARFILES += $$($(1)_tar)
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1)) $$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
endef endef
$(foreach p,$(platforms),$(eval $(call Mktar,$(p)))) $(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
@ -119,5 +119,3 @@ clean :
FORCE : FORCE :
.PHONY : $(configs) $(platforms) .PHONY : $(configs) $(platforms)

View File

@ -136,11 +136,11 @@ libs := $(SYSROOT)/libs_patched
# Generate downloading + unpacking of sources. # Generate downloading + unpacking of sources.
define Download define Download
$(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1)))))) $(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
$(1)_CFG = $$($(1)_DIR)/configure $(1)_CFG = $$($(1)_DIR)/configure
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1))) $(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
$$($(1)_CFG) : $$($(1)_FILE) $$($(1)_CFG) : $$($(1)_FILE)
mkdir -p $$(SRCDIR) mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$< tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \ $$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
@ -149,7 +149,7 @@ $$($(1)_CFG) : $$($(1)_FILE)
) )
touch $$@ touch $$@
$$($(1)_FILE) : $$($(1)_FILE) :
wget -P $(DOWNLOAD) $$($(1)) wget -P $(DOWNLOAD) $$($(1))
endef endef
@ -161,9 +161,9 @@ $(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
# Note. For building linux you should install rpm2cpio. # Note. For building linux you should install rpm2cpio.
define unrpm define unrpm
$(SYSROOT)/$(notdir $(1)).unpacked \ $(SYSROOT)/$(notdir $(1)).unpacked \
: $(1) : $(1)
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked $$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
endef endef
%.unpacked : %.unpacked :
@ -227,9 +227,9 @@ INSTALLCMD = install
declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump declare_tools = CC$(1)=$(2)gcc LD$(1)=$(2)ld AR$(1)=$(2)ar AS$(1)=$(2)as RANLIB$(1)=$(2)ranlib CXX$(1)=$(2)g++ OBJDUMP$(1)=$(2)objdump
ifeq ($(HOST),$(BUILD)) ifeq ($(HOST),$(BUILD))
ifeq ($(HOST),$(TARGET)) ifeq ($(HOST),$(TARGET))
TOOLS = $(call declare_tools,_FOR_TARGET,) TOOLS = $(call declare_tools,_FOR_TARGET,)
endif endif
endif endif
TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-) TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
@ -241,14 +241,14 @@ TOOLS ?= $(call declare_tools,_FOR_TARGET,$(TARGET)-)
# If multilib, the second should be 32-bit, and we resolve # If multilib, the second should be 32-bit, and we resolve
# CFLAG_<name> to most likely -m32. # CFLAG_<name> to most likely -m32.
define mk_bfd define mk_bfd
$$(info Libs for $(1)) $$(info Libs for $(1))
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
: CFLAGS += $$(CFLAGS_$(1)) : CFLAGS += $$(CFLAGS_$(1))
$$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \ $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile \
: LIBDIRS = --libdir=$(TARGETDIR)/$(1) : LIBDIRS = --libdir=$(TARGETDIR)/$(1)
bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done bfdlib += $$(TARGETDIR)/$$(binutils_ver)-$(subst /,-,$(1)).done
bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile bfdmakes += $$(BUILDDIR)/$$(binutils_ver)-$(subst /,-,$(1))/Makefile
endef endef
# Create one set of bfds etc for each multilib arch # Create one set of bfds etc for each multilib arch
@ -271,12 +271,12 @@ $(bfdmakes) : TOOLS = $(call declare_tools,_FOR_TARGET,$(TARGET)-) $(call declar
########################################################################################## ##########################################################################################
$(gcc) \ $(gcc) \
$(binutils) \ $(binutils) \
$(gmp) \ $(gmp) \
$(mpfr) \ $(mpfr) \
$(mpc) \ $(mpc) \
$(bfdmakes) \ $(bfdmakes) \
$(ccache) : ENVS += $(TOOLS) $(ccache) : ENVS += $(TOOLS)
# libdir to work around hateful bfd stuff installing into wrong dirs... # libdir to work around hateful bfd stuff installing into wrong dirs...
# ensure we have 64 bit bfd support in the HOST library. I.e our # ensure we have 64 bit bfd support in the HOST library. I.e our
@ -354,7 +354,7 @@ $(BUILDDIR)/$(mpc_ver)/Makefile \
# Only valid if glibc target -> linux # Only valid if glibc target -> linux
# proper destructor handling for c++ # proper destructor handling for c++
ifneq (,$(findstring linux,$(TARGET))) ifneq (,$(findstring linux,$(TARGET)))
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit $(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --enable-__cxa_atexit
endif endif
# Want: # Want:
@ -411,10 +411,10 @@ gccpatch = $(TARGETDIR)/gcc-patched
########################################################################################## ##########################################################################################
# For some reason cpp is not created as a target-compiler # For some reason cpp is not created as a target-compiler
ifeq ($(HOST),$(TARGET)) ifeq ($(HOST),$(TARGET))
$(gccpatch) : $(gcc) link_libs $(gccpatch) : $(gcc) link_libs
@echo -n 'Creating compiler symlinks...' @echo -n 'Creating compiler symlinks...'
@for f in cpp; do \ @for f in cpp; do \
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ];\ if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
then \ then \
cd $(PREFIX)/bin && \ cd $(PREFIX)/bin && \
ln -s $$f $(TARGET)-$$f ; \ ln -s $$f $(TARGET)-$$f ; \
@ -423,11 +423,11 @@ $(gccpatch) : $(gcc) link_libs
@touch $@ @touch $@
@echo 'done' @echo 'done'
########################################################################################## ##########################################################################################
# Ugly at best. Seems that when we compile host->host compiler, that are NOT # Ugly at best. Seems that when we compile host->host compiler, that are NOT
# the BUILD compiler, the result will not try searching for libs in package root. # the BUILD compiler, the result will not try searching for libs in package root.
# "Solve" this by create links from the target libdirs to where they are. # "Solve" this by create links from the target libdirs to where they are.
link_libs: link_libs:
@echo -n 'Creating library symlinks...' @echo -n 'Creating library symlinks...'
@$(foreach l,$(LIBDIRS), \ @$(foreach l,$(LIBDIRS), \
for f in `cd $(PREFIX)/$(l) && ls`; do \ for f in `cd $(PREFIX)/$(l) && ls`; do \
@ -439,7 +439,7 @@ link_libs:
done;) done;)
@echo 'done' @echo 'done'
else else
$(gccpatch) : $(gccpatch) :
@echo 'done' @echo 'done'
endif endif

View File

@ -152,17 +152,17 @@ RELEASEDOCS_SOURCEPATH = \
$(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS))) $(subst $(SPACE),$(PATH_SEP),$(strip $(ALL_SOURCE_DIRS)))
define prep-target define prep-target
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
$(RM) $@ $(RM) $@
endef endef
# Prep for javadoc creation, assumes $@ is an index.html file # Prep for javadoc creation, assumes $@ is an index.html file
define prep-javadoc define prep-javadoc
@if [ -f "$@" -a "$?" != "" ] ; then \ @if [ -f "$@" -a "$?" != "" ] ; then \
$(ECHO) "# Dependencies have changed: $?"; \ $(ECHO) "# Dependencies have changed: $?"; \
fi fi
$(RM) -r $(@D) $(RM) -r $(@D)
$(MKDIR) -p $(@D) $(MKDIR) -p $(@D)
endef endef
# A cache of the directories in ALL_SOURCE_DIRS # A cache of the directories in ALL_SOURCE_DIRS
@ -171,19 +171,19 @@ DIRECTORY_CACHE = $(DOCSTMPDIR)/directory.cache
# Given a list of packages, return a list of files or dirs to be dependent on # Given a list of packages, return a list of files or dirs to be dependent on
# (Currently only returning a list of directories) # (Currently only returning a list of directories)
define PackageDependencies # packages define PackageDependencies # packages
$(shell \ $(shell \
if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \ if [ "$1" != "" -a -f $(DIRECTORY_CACHE) ] ; then \
for p in $1 ; do \ for p in $1 ; do \
pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
$(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \ $(CAT) $(DIRECTORY_CACHE) | $(GREP) "/$${pd}/" ; \
done; \ done; \
fi \ fi \
) )
endef endef
# Given a list of packages, add packages that exist to $@, print summary # Given a list of packages, add packages that exist to $@, print summary
define PackageFilter # packages define PackageFilter # packages
@if [ "$1" != "" ] ; then \ @if [ "$1" != "" ] ; then \
for p in $1 ; do \ for p in $1 ; do \
pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \ pd=`$(ECHO) $${p} | $(SED) -e 's@[.]@/@g'`; \
found="false"; \ found="false"; \
@ -198,12 +198,12 @@ define PackageFilter # packages
$(ECHO) "WARNING: Package not found: $${p}"; \ $(ECHO) "WARNING: Package not found: $${p}"; \
fi; \ fi; \
done; \ done; \
fi fi
endef endef
# Print out a summary of the javadoc command about to be run # Print out a summary of the javadoc command about to be run
define JavadocSummary # optionsfile packagesfile define JavadocSummary # optionsfile packagesfile
@$(ECHO) "# Summary for $@";\ @$(ECHO) "# Summary for $@"; \
$(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \ $(ECHO) "# Options (`$(BASENAME) $1`):"; $(SED) -e 's@^@# @' $1; \
$(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2 $(ECHO) "# Packages (`$(BASENAME) $2`):";$(SED) -e 's@^@# @' $2
endef endef
@ -241,13 +241,13 @@ endef
# Common echo of option # Common echo of option
define OptionOnly # opt define OptionOnly # opt
$(PRINTF) "%s\n" "$1" $(PRINTF) "%s\n" "$1"
endef endef
define OptionPair # opt arg define OptionPair # opt arg
$(PRINTF) "%s '%s'\n" "$1" '$2' $(PRINTF) "%s '%s'\n" "$1" '$2'
endef endef
define OptionTrip # opt arg arg define OptionTrip # opt arg arg
$(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3' $(PRINTF) "%s '%s' '%s'\n" "$1" '$2' '$3'
endef endef
# Core api bottom argument (with special sauce) # Core api bottom argument (with special sauce)
@ -295,6 +295,7 @@ contained herein are not final and are subject to change. \
The information is being made available to you solely for purpose of \ The information is being made available to you solely for purpose of \
evaluation. \ evaluation. \
</div> </div> </div> </div>
endif endif
################################################################# #################################################################
@ -405,13 +406,13 @@ $(COREAPI_OPTIONS_FILE): $(COREAPI_OVERVIEW)
$(call OptionOnly,-splitIndex) ; \ $(call OptionOnly,-splitIndex) ; \
$(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \ $(call OptionPair,-overview,$(COREAPI_OVERVIEW)) ; \
$(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(COREAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ;\ $(call OptionPair,-windowtitle,$(COREAPI_WINDOWTITLE) $(DRAFT_WINTITLE)) ; \
$(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(COREAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(COREAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
) >> $@ ) >> $@
ifdef COREAPI_TOP_EARLYACCESS ifdef COREAPI_TOP_EARLYACCESS
@$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@ @$(call OptionPair,-top,$(COREAPI_TOP_EARLYACCESS)) >> $@
endif endif
# Create a file with the package names in it # Create a file with the package names in it
$(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS)) $(COREAPI_PACKAGES_FILE): $(DIRECTORY_CACHE) $(call PackageDependencies,$(CORE_PKGS))
@ -460,7 +461,7 @@ $(DOCLETAPI_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-breakiterator) ; \ $(call OptionOnly,-breakiterator) ; \
$(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(DOCLETAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(DOCLETAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(DOCLETAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(DOCLETAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \ $(call OptionTrip,-group,$(DOCLETAPI_GROUPNAME),$(DOCLETAPI_REGEXP)); \
@ -567,7 +568,7 @@ $(DOMAPI_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-splitIndex) ; \ $(call OptionOnly,-splitIndex) ; \
$(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(DOMAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(DOMAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(DOMAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(DOMAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \ $(call OptionTrip,-group,$(DOMAPI_GROUPNAME),$(DOMAPI_REGEXP)); \
@ -820,7 +821,7 @@ $(SMARTCARDIO_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(SMARTCARDIO_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(SMARTCARDIO_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \ $(call OptionPair,-header,$(SMARTCARDIO_HEADER)$(DRAFT_HEADER)); \
$(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \ $(call OptionPair,-bottom,$(SMARTCARDIO_BOTTOM)$(DRAFT_BOTTOM)); \
$(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(SMARTCARDIO2COREAPI),$(COREAPI_DOCSDIR)/); \
@ -870,7 +871,7 @@ $(HTTPSERVER_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(HTTPSERVER_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(HTTPSERVER_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \ $(call OptionPair,-header,$(HTTPSERVER_HEADER)$(DRAFT_HEADER)); \
$(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \ $(call OptionPair,-bottom,$(HTTPSERVER_BOTTOM)$(DRAFT_BOTTOM)); \
$(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(HTTPSERVER2COREAPI),$(COREAPI_DOCSDIR)/); \
@ -981,7 +982,7 @@ $(ATTACH_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(ATTACH_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(ATTACH_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(ATTACH_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(ATTACH_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(ATTACH2COREAPI),$(COREAPI_DOCSDIR)/); \
@ -1031,7 +1032,7 @@ $(JCONSOLE_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(JCONSOLE_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(JCONSOLE_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(JCONSOLE_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(JCONSOLE_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(JCONSOLE2COREAPI),$(COREAPI_DOCSDIR)/); \
@ -1082,7 +1083,7 @@ $(TREEAPI_OPTIONS_FILE):
$(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \ $(call OptionPair,-sourcepath,$(RELEASEDOCS_SOURCEPATH)) ; \
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(TREEAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(TREEAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(TREEAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-tag,$(TAG_JLS)) ; \ $(call OptionPair,-tag,$(TAG_JLS)) ; \
$(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(TREEAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
@ -1134,7 +1135,7 @@ $(SCTPAPI_OPTIONS_FILE):
$(call OptionPair,-encoding,ascii) ; \ $(call OptionPair,-encoding,ascii) ; \
$(call OptionOnly,-nodeprecatedlist) ; \ $(call OptionOnly,-nodeprecatedlist) ; \
$(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \ $(call OptionPair,-doctitle,$(SCTPAPI_DOCTITLE)) ; \
$(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE));\ $(call OptionPair,-windowtitle,$(SCTPAPI_WINDOWTITLE) $(DRAFT_WINTITLE)); \
$(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER)) ; \ $(call OptionPair,-header,$(SCTPAPI_HEADER)$(DRAFT_HEADER)) ; \
$(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \ $(call OptionPair,-bottom,$(SCTPAPI_BOTTOM)$(DRAFT_BOTTOM)) ; \
$(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \ $(call OptionTrip,-linkoffline,$(SCTPAPI2COREAPI),$(COREAPI_DOCSDIR)/); \

View File

@ -88,7 +88,7 @@ SMARTCARDIO_PKGS = javax.smartcardio
SCTPAPI_PKGS = com.sun.nio.sctp SCTPAPI_PKGS = com.sun.nio.sctp
ifeq ($(PLATFORM), macosx) ifeq ($(PLATFORM), macosx)
APPLE_EXT_PKGS = com.apple.concurrent \ APPLE_EXT_PKGS = com.apple.concurrent \
com.apple.eawt \ com.apple.eawt \
com.apple.eawt.event \ com.apple.eawt.event \
com.apple.eio com.apple.eio