提交 95823c39 编写于 作者: K katleman

Merge

...@@ -37,16 +37,16 @@ TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a require ...@@ -37,16 +37,16 @@ TEST_FOR_NON_GNUMAKE:sh=echo You are not using GNU make/gmake, this is a require
# Assume we have GNU make, but check version. # Assume we have GNU make, but check version.
ifeq (,$(findstring 3.81,$(MAKE_VERSION))) ifeq (,$(findstring 3.81,$(MAKE_VERSION)))
ifeq (,$(findstring 3.82,$(MAKE_VERSION))) ifeq (,$(findstring 3.82,$(MAKE_VERSION)))
$(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.) $(error This version of GNU Make is too low ($(MAKE_VERSION)). Check your path, or upgrade to 3.81 or newer.)
endif endif
endif endif
# Locate this Makefile # Locate this Makefile
ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),) ifeq ($(filter /%,$(lastword $(MAKEFILE_LIST))),)
makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST)) makefile_path:=$(CURDIR)/$(lastword $(MAKEFILE_LIST))
else else
makefile_path:=$(lastword $(MAKEFILE_LIST)) makefile_path:=$(lastword $(MAKEFILE_LIST))
endif endif
root_dir:=$(dir $(makefile_path)) root_dir:=$(dir $(makefile_path))
...@@ -58,27 +58,27 @@ $(eval $(call ParseConfAndSpec)) ...@@ -58,27 +58,27 @@ $(eval $(call ParseConfAndSpec))
# Now determine if we have zero, one or several configurations to build. # Now determine if we have zero, one or several configurations to build.
ifeq ($(SPEC),) ifeq ($(SPEC),)
# Since we got past ParseConfAndSpec, we must be building a global target. Do nothing. # Since we got past ParseConfAndSpec, we must be building a global target. Do nothing.
else else
ifeq ($(words $(SPEC)),1) ifeq ($(words $(SPEC)),1)
# We are building a single configuration. This is the normal case. Execute the Main.gmk file. # We are building a single configuration. This is the normal case. Execute the Main.gmk file.
include $(root_dir)/common/makefiles/Main.gmk include $(root_dir)/common/makefiles/Main.gmk
else else
# We are building multiple configurations. # We are building multiple configurations.
# First, find out the valid targets # First, find out the valid targets
# Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find # Run the makefile with an arbitrary SPEC using -p -q (quiet dry-run and dump rules) to find
# available PHONY targets. Use this list as valid targets to pass on to the repeated calls. # available PHONY targets. Use this list as valid targets to pass on to the repeated calls.
all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \ all_phony_targets=$(filter-out $(global_targets) bundles-only, $(strip $(shell \
$(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \ $(MAKE) -p -q -f common/makefiles/Main.gmk FRC SPEC=$(firstword $(SPEC)) | \
grep ^.PHONY: | head -n 1 | cut -d " " -f 2-))) grep ^.PHONY: | head -n 1 | cut -d " " -f 2-)))
$(all_phony_targets): $(all_phony_targets):
@$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \ @$(foreach spec,$(SPEC),($(MAKE) -f NewMakefile.gmk SPEC=$(spec) \
$(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true $(VERBOSE) VERBOSE=$(VERBOSE) LOG_LEVEL=$(LOG_LEVEL) $@) &&) true
.PHONY: $(all_phony_targets) .PHONY: $(all_phony_targets)
endif endif
endif endif
# Include this after a potential spec file has been included so that the bundles target # Include this after a potential spec file has been included so that the bundles target
......
...@@ -62,7 +62,7 @@ if test -e $custom_hook; then ...@@ -62,7 +62,7 @@ if test -e $custom_hook; then
# We have custom sources available; also generate configure script # We have custom sources available; also generate configure script
# with custom hooks compiled in. # with custom hooks compiled in.
cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \ cat $script_dir/configure.ac | sed -e "s|@DATE_WHEN_GENERATED@|$TIMESTAMP|" | \
sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|" | ${AUTOCONF} -W all -I$script_dir - > $custom_script_dir/generated-configure.sh
rm -rf autom4te.cache rm -rf autom4te.cache
else else
echo No custom hook found: $custom_hook echo No custom hook found: $custom_hook
......
此差异已折叠。
...@@ -145,7 +145,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS], ...@@ -145,7 +145,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
# Not in mixed or Windows style, start by that. # Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path` new_path=`cmd //c echo $path`
fi fi
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path]) BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
if test "x$path" != "x$new_path"; then if test "x$path" != "x$new_path"; then
...@@ -175,8 +175,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN], ...@@ -175,8 +175,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# bat and cmd files are not always considered executable in cygwin causing which # bat and cmd files are not always considered executable in cygwin causing which
# to not find them # to not find them
if test "x$new_path" = x \ if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then && test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"` new_path=`$CYGPATH -u "$path"`
fi fi
if test "x$new_path" = x; then if test "x$new_path" = x; then
...@@ -191,8 +191,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN], ...@@ -191,8 +191,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# bat and cmd files are not always considered executable in cygwin causing which # bat and cmd files are not always considered executable in cygwin causing which
# to not find them # to not find them
if test "x$new_path" = x \ if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \ && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then && test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"` new_path=`$CYGPATH -u "$path"`
fi fi
if test "x$new_path" = x; then if test "x$new_path" = x; then
...@@ -218,9 +218,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN], ...@@ -218,9 +218,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
# Short path failed, file does not exist as specified. # Short path failed, file does not exist as specified.
# Try adding .exe or .cmd # Try adding .exe or .cmd
if test -f "${new_path}.exe"; then if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe" input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd" input_to_shortpath="${new_path}.cmd"
else else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.]) AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found]) AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
...@@ -254,7 +254,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS], ...@@ -254,7 +254,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
# Now try to locate executable using which # Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null` new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then if test "x$new_path" = x; then
# Oops. Which didn't find the executable. # Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect, # The splitting of arguments from the executable at a space might have been incorrect,
...@@ -264,9 +264,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS], ...@@ -264,9 +264,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
arguments="EOL" arguments="EOL"
new_path="$path" new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path) BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
new_path=`$WHICH "$new_path" 2> /dev/null` new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error. # It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.]) AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
...@@ -302,7 +302,7 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], ...@@ -302,7 +302,7 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
[ [
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m` SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
if test $SRC_ROOT_LENGTH -gt 100; then if test $SRC_ROOT_LENGTH -gt 100; then
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported]) AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
fi fi
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
...@@ -311,14 +311,14 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], ...@@ -311,14 +311,14 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_MSG_RESULT([$CYGWIN_VERSION]) AC_MSG_RESULT([$CYGWIN_VERSION])
WINDOWS_ENV_VENDOR='cygwin' WINDOWS_ENV_VENDOR='cygwin'
WINDOWS_ENV_VERSION="$CYGWIN_VERSION" WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.` CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
if test "x$CYGWIN_VERSION_OK" = x; then if test "x$CYGWIN_VERSION_OK" = x; then
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.]) AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
AC_MSG_ERROR([Cannot continue]) AC_MSG_ERROR([Cannot continue])
fi fi
if test "x$CYGPATH" = x; then if test "x$CYGPATH" = x; then
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
fi fi
AC_MSG_CHECKING([cygwin root directory as unix-style path]) AC_MSG_CHECKING([cygwin root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
...@@ -329,13 +329,13 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], ...@@ -329,13 +329,13 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH" WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/` test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then if test "x$test_cygdrive_prefix" = x; then
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.]) AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
fi fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
AC_MSG_CHECKING([msys release]) AC_MSG_CHECKING([msys release])
MSYS_VERSION=`$UNAME -r` MSYS_VERSION=`$UNAME -r`
AC_MSG_RESULT([$MSYS_VERSION]) AC_MSG_RESULT([$MSYS_VERSION])
WINDOWS_ENV_VENDOR='msys' WINDOWS_ENV_VENDOR='msys'
WINDOWS_ENV_VERSION="$MSYS_VERSION" WINDOWS_ENV_VERSION="$MSYS_VERSION"
...@@ -367,12 +367,12 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], ...@@ -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"
...@@ -389,7 +389,7 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then ...@@ -389,7 +389,7 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then
# @ was chosen as separator to minimize risk of other tools messing around with it # @ was chosen as separator to minimize risk of other tools messing around with it
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq` all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'` fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list" FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
fi fi
rm -f $OUTPUT_ROOT/fixpath* rm -f $OUTPUT_ROOT/fixpath*
...@@ -397,24 +397,24 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then ...@@ -397,24 +397,24 @@ if test "x$OPENJDK_BUILD_OS" = xwindows; then
$CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1 $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
cd $CURDIR cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath.exe; then if test ! -x $OUTPUT_ROOT/fixpath.exe; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath1.log cat $OUTPUT_ROOT/fixpath1.log
AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe]) AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
fi fi
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if fixpath.exe works]) AC_MSG_CHECKING([if fixpath.exe works])
cd $OUTPUT_ROOT cd $OUTPUT_ROOT
$FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1 $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
cd $CURDIR cd $CURDIR
if test ! -x $OUTPUT_ROOT/fixpath2.exe; then if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
cat $OUTPUT_ROOT/fixpath2.log cat $OUTPUT_ROOT/fixpath2.log
AC_MSG_ERROR([fixpath did not work!]) AC_MSG_ERROR([fixpath did not work!])
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)
]) ])
...@@ -44,7 +44,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK], ...@@ -44,7 +44,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring]) AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)]) AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no BOOT_JDK_FOUND=no
else else
# Do we have an rt.jar? (On MacOSX it is called classes.jar) # Do we have an rt.jar? (On MacOSX it is called classes.jar)
if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring]) AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring])
...@@ -79,70 +79,70 @@ AC_DEFUN([BOOTJDK_DO_CHECK], ...@@ -79,70 +79,70 @@ 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?
AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS], AC_DEFUN([BOOTJDK_CHECK_BUILDDEPS],
[ [
BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no]) BDEPS_CHECK_MODULE(BOOT_JDK, bootjdk, xxx, [BOOT_JDK_FOUND=maybe], [BOOT_JDK_FOUND=no])
]) ])
# Test: Is $JAVA_HOME set? # Test: Is $JAVA_HOME set?
AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME], AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
[ [
if test "x$JAVA_HOME" != x; then if test "x$JAVA_HOME" != x; then
JAVA_HOME_PROCESSED="$JAVA_HOME" JAVA_HOME_PROCESSED="$JAVA_HOME"
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED) BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
if test ! -d "$JAVA_HOME_PROCESSED"; then if test ! -d "$JAVA_HOME_PROCESSED"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!]) AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
else else
# Aha, the user has set a JAVA_HOME # Aha, the user has set a JAVA_HOME
# let us use that as the Boot JDK. # let us use that as the Boot JDK.
BOOT_JDK="$JAVA_HOME_PROCESSED" BOOT_JDK="$JAVA_HOME_PROCESSED"
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME]) AC_MSG_NOTICE([Found potential Boot JDK using JAVA_HOME])
fi
fi fi
fi
]) ])
# 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?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK], AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[ [
AC_PATH_PROG(JAVAC_CHECK, javac) AC_PATH_PROG(JAVAC_CHECK, javac)
AC_PATH_PROG(JAVA_CHECK, java) AC_PATH_PROG(JAVA_CHECK, java)
BINARY="$JAVAC_CHECK" BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK" BINARY="$JAVA_CHECK"
fi fi
if test "x$BINARY" != x; then if test "x$BINARY" != x; then
# So there is a java(c) binary, it might be part of a JDK. # So there is a java(c) binary, it might be part of a JDK.
# Lets find the JDK/JRE directory by following symbolic links. # Lets find the JDK/JRE directory by following symbolic links.
# Linux/GNU systems often have links from /usr/bin/java to # Linux/GNU systems often have links from /usr/bin/java to
# /etc/alternatives/java to the real JDK binary. # /etc/alternatives/java to the real JDK binary.
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY) BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
BOOT_JDK=`dirname "$BINARY"` BOOT_JDK=`dirname "$BINARY"`
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd` BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
# Looks like we found ourselves an JDK # Looks like we found ourselves an JDK
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH]) AC_MSG_NOTICE([Found potential Boot JDK using java(c) in PATH])
fi
fi fi
fi
]) ])
# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX) # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME], AC_DEFUN([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME],
[ [
if test -x /usr/libexec/java_home; then if test -x /usr/libexec/java_home; then
BOOT_JDK=`/usr/libexec/java_home` BOOT_JDK=`/usr/libexec/java_home`
BOOT_JDK_FOUND=maybe BOOT_JDK_FOUND=maybe
AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home]) AC_MSG_NOTICE([Found potential Boot JDK using /usr/libexec/java_home])
fi fi
]) ])
# Look for a jdk in the given path. If there are multiple, try to select the newest. # Look for a jdk in the given path. If there are multiple, try to select the newest.
...@@ -204,123 +204,123 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK], ...@@ -204,123 +204,123 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
AC_MSG_CHECKING([for $2 in Boot JDK]) AC_MSG_CHECKING([for $2 in Boot JDK])
$1=$BOOT_JDK/bin/$2 $1=$BOOT_JDK/bin/$2
if test ! -x [$]$1; then if test ! -x [$]$1; then
AC_MSG_RESULT(not found) AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk]) AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK]) AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi fi
AC_MSG_RESULT(ok) AC_MSG_RESULT(ok)
]) ])
############################################################################### ###############################################################################
# #
# We need a Boot JDK to bootstrap the build. # We need a Boot JDK to bootstrap the build.
# #
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.
if test "x$BUILD_NUM_BITS" = x32; then if test "x$BUILD_NUM_BITS" = x32; then
STACK_SIZE=768 STACK_SIZE=768
else else
# Running Javac on a JVM on a 64-bit machine, the stack takes more space # Running Javac on a JVM on a 64-bit machine, the stack takes more space
# since 64-bit pointers are pushed on the stach. Apparently, we need # since 64-bit pointers are pushed on the stach. Apparently, we need
# to increase the stack space when javacing the JDK.... # to increase the stack space when javacing the JDK....
STACK_SIZE=1536 STACK_SIZE=1536
fi fi
# Minimum amount of heap memory. # Minimum amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
# Why does macosx need more heap? Its the huge JDK batch. # Why does macosx need more heap? Its the huge JDK batch.
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
else else
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA]) ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
fi fi
# When is adding -client something that speeds up the JVM? # When is adding -client something that speeds up the JVM?
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
...@@ -329,7 +329,7 @@ if test "x$with_boot_jdk_jvmargs" = x; then ...@@ -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)
]) ])
...@@ -36,7 +36,7 @@ else ...@@ -36,7 +36,7 @@ else
JAVA_EXEC_POS=1 JAVA_EXEC_POS=1
endif endif
ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) ifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA)))
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
endif endif
......
...@@ -58,6 +58,6 @@ if test $? = 0; then ...@@ -58,6 +58,6 @@ if test $? = 0; then
OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'` OUT=$REAL_CPU`echo $OUT | sed -e 's/[^-]*//'`
;; ;;
esac esac
fi fi
echo $OUT echo $OUT
...@@ -25,78 +25,77 @@ ...@@ -25,78 +25,77 @@
AC_DEFUN([BPERF_CHECK_CORES], AC_DEFUN([BPERF_CHECK_CORES],
[ [
AC_MSG_CHECKING([for number of cores]) AC_MSG_CHECKING([for number of cores])
NUM_CORES=1 NUM_CORES=1
FOUND_CORES=no FOUND_CORES=no
if test -f /proc/cpuinfo; then
# Looks like a Linux (or cygwin) system
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
FOUND_CORES=yes
elif test -x /usr/sbin/psrinfo; then
# Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
FOUND_CORES=yes
fi
if test "x$FOUND_CORES" = xyes; then if test -f /proc/cpuinfo; then
AC_MSG_RESULT([$NUM_CORES]) # Looks like a Linux (or cygwin) system
else NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
AC_MSG_RESULT([could not detect number of cores, defaulting to 1]) FOUND_CORES=yes
AC_MSG_WARN([This will disable all parallelism from build!]) elif test -x /usr/sbin/psrinfo; then
fi # Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
FOUND_CORES=yes
fi
if test "x$FOUND_CORES" = xyes; then
AC_MSG_RESULT([$NUM_CORES])
else
AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
AC_MSG_WARN([This will disable all parallelism from build!])
fi
]) ])
AC_DEFUN([BPERF_CHECK_MEMORY_SIZE], AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
[ [
AC_MSG_CHECKING([for memory size]) AC_MSG_CHECKING([for memory size])
# Default to 1024 MB # Default to 1024 MB
MEMORY_SIZE=1024 MEMORY_SIZE=1024
FOUND_MEM=no FOUND_MEM=no
if test -f /proc/meminfo; then
# Looks like a Linux (or cygwin) system
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
FOUND_MEM=yes
elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
if test "x$FOUND_MEM" = xyes; then if test -f /proc/meminfo; then
AC_MSG_RESULT([$MEMORY_SIZE MB]) # Looks like a Linux (or cygwin) system
else MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB]) MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
AC_MSG_WARN([This might seriously impact build performance!]) FOUND_MEM=yes
fi elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes
elif test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
fi
if test "x$FOUND_MEM" = xyes; then
AC_MSG_RESULT([$MEMORY_SIZE MB])
else
AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
AC_MSG_WARN([This might seriously impact build performance!])
fi
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES], AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
[ [
# How many cores do we have on this build system? # How many cores do we have on this build system?
AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores], AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
[number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])]) [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
if test "x$with_num_cores" = x; then if test "x$with_num_cores" = x; then
# The number of cores were not specified, try to probe them. # The number of cores were not specified, try to probe them.
BPERF_CHECK_CORES BPERF_CHECK_CORES
...@@ -110,7 +109,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY], ...@@ -110,7 +109,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
[ [
# How much memory do we have on this build system? # How much memory do we have on this build system?
AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size], AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
[memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])]) [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
if test "x$with_memory_size" = x; then if test "x$with_memory_size" = x; then
# The memory size was not specified, try to probe it. # The memory size was not specified, try to probe it.
BPERF_CHECK_MEMORY_SIZE BPERF_CHECK_MEMORY_SIZE
...@@ -122,10 +121,10 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY], ...@@ -122,10 +121,10 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_MEMORY],
AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS], AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
[ [
# Provide a decent default number of parallel jobs for make depending on # Provide a decent default number of parallel jobs for make depending on
# number of cores, amount of memory and machine architecture. # number of cores, amount of memory and machine architecture.
AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs], AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs],
[number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])]) [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
if test "x$with_jobs" = x; then if test "x$with_jobs" = x; then
# Number of jobs was not specified, calculate. # Number of jobs was not specified, calculate.
AC_MSG_CHECKING([for appropriate number of jobs to run in parallel]) AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
...@@ -157,179 +156,178 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS], ...@@ -157,179 +156,178 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
AC_DEFUN([BPERF_SETUP_CCACHE], AC_DEFUN([BPERF_SETUP_CCACHE],
[ [
AC_ARG_ENABLE([ccache], AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache], [AS_HELP_STRING([--disable-ccache],
[disable using ccache to speed up recompilations @<:@enabled@:>@])], [disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes]) [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then if test "x$ENABLE_CCACHE" = xyes; then
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
AC_PATH_PROG(CCACHE, ccache) AC_PATH_PROG(CCACHE, ccache)
PATH="$OLD_PATH" PATH="$OLD_PATH"
else else
AC_MSG_CHECKING([for ccache]) AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled]) AC_MSG_RESULT([explicitly disabled])
CCACHE= CCACHE=
fi fi
AC_SUBST(CCACHE) AC_SUBST(CCACHE)
AC_ARG_WITH([ccache-dir], AC_ARG_WITH([ccache-dir],
[AS_HELP_STRING([--with-ccache-dir], [AS_HELP_STRING([--with-ccache-dir],
[where to store ccache files @<:@~/.ccache@:>@])]) [where to store ccache files @<:@~/.ccache@:>@])])
if test "x$with_ccache_dir" != x; then if test "x$with_ccache_dir" != x; then
# When using a non home ccache directory, assume the use is to share ccache files # When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask. # with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002" SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
fi fi
CCACHE_FOUND="" CCACHE_FOUND=""
if test "x$CCACHE" != x; then if test "x$CCACHE" != x; then
BPERF_SETUP_CCACHE_USAGE BPERF_SETUP_CCACHE_USAGE
fi fi
]) ])
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE], AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
[ [
if test "x$CCACHE" != x; then if test "x$CCACHE" != x; then
CCACHE_FOUND="true" CCACHE_FOUND="true"
# Only use ccache if it is 3.1.4 or later, which supports # Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers. # precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers]) AC_MSG_CHECKING([if ccache supports precompiled headers])
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null` HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
if test "x$HAS_GOOD_CCACHE" = x; then if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache]) AC_MSG_RESULT([no, disabling ccache])
CCACHE= CCACHE=
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers]) AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
PUSHED_FLAGS="$CXXFLAGS" PUSHED_FLAGS="$CXXFLAGS"
CXXFLAGS="-fpch-preprocess $CXXFLAGS" CXXFLAGS="-fpch-preprocess $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
CXXFLAGS="$PUSHED_FLAGS" CXXFLAGS="$PUSHED_FLAGS"
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
else else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers]) AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE= CCACHE=
fi fi
fi
fi fi
fi
if test "x$CCACHE" != x; then if test "x$CCACHE" != x; then
CCACHE_SLOPPINESS=time_macros CCACHE_SLOPPINESS=time_macros
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE" CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
CCACHE_FLAGS=-fpch-preprocess CCACHE_FLAGS=-fpch-preprocess
if test "x$SET_CCACHE_DIR" != x; then if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1 mkdir -p $CCACHE_DIR > /dev/null 2>&1
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
fi
fi fi
fi
]) ])
AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS], AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
[ [
###############################################################################
#
# Can the C/C++ compiler use precompiled headers?
#
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1 ###############################################################################
if test "x$ENABLE_PRECOMPH" = xno; then #
# Can the C/C++ compiler use precompiled headers?
#
AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
[ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
USE_PRECOMPILED_HEADER=1
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])
echo "int alfa();" > conftest.h echo "int alfa();" > conftest.h
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
if test ! -f conftest.hpp.gch; then if test ! -f conftest.hpp.gch; then
USE_PRECOMPILED_HEADER=0 USE_PRECOMPILED_HEADER=0
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
else else
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
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
JVM_ARG_OK=false JVM_ARG_OK=false
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
if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
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)
]) ])
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME} # If no rewrite was found, then rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
# The needed cups builddeps are platform independent header files. # The needed cups builddeps are platform independent header files.
# I.e. they need not be part of the devkit. # I.e. they need not be part of the devkit.
builddep_cups=lib/cups_1_3_9.zip builddep_cups=lib/cups_1_3_9.zip
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10 REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
DEVTOOLS=/java/devtools DEVTOOLS=/java/devtools
builddep_cups=${DEVTOOLS}/linux/cups/include builddep_cups=${DEVTOOLS}/linux/cups/include
......
...@@ -25,223 +25,223 @@ ...@@ -25,223 +25,223 @@
AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS], AC_DEFUN_ONCE([BDEPS_SCAN_FOR_BUILDDEPS],
[ [
define(LIST_OF_BUILD_DEPENDENCIES,) define(LIST_OF_BUILD_DEPENDENCIES,)
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
if test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_conf" != x; then
AC_MSG_CHECKING([for supplied builddeps configuration file]) AC_MSG_CHECKING([for supplied builddeps configuration file])
builddepsfile=$with_builddeps_conf builddepsfile=$with_builddeps_conf
if test -s $builddepsfile; then if test -s $builddepsfile; then
. $builddepsfile . $builddepsfile
AC_MSG_RESULT([loaded!]) AC_MSG_RESULT([loaded!])
else else
AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!]) AC_MSG_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
fi fi
else else
AC_MSG_CHECKING([for builddeps.conf files in sources...]) AC_MSG_CHECKING([for builddeps.conf files in sources...])
builddepsfile=`mktemp` builddepsfile=`mktemp`
touch $builddepsfile touch $builddepsfile
# Put all found confs into a single file. # Put all found confs into a single file.
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
# Source the file to acquire the variables # Source the file to acquire the variables
if test -s $builddepsfile; then if test -s $builddepsfile; then
. $builddepsfile . $builddepsfile
AC_MSG_RESULT([found at least one!]) AC_MSG_RESULT([found at least one!])
else else
AC_MSG_ERROR([Could not find any builddeps.conf at all!]) AC_MSG_ERROR([Could not find any builddeps.conf at all!])
fi fi
fi fi
# Create build and target names that use _ instead of "-" and ".". # Create build and target names that use _ instead of "-" and ".".
# This is necessary to use them in variable names. # This is necessary to use them in variable names.
build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'` target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
# Extract rewrite information for build and target # Extract rewrite information for build and target
eval rewritten_build=\${REWRITE_${build_var}} eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then if test "x$rewritten_build" = x; then
rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME} rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
echo Build stays the same $rewritten_build echo Build stays the same $rewritten_build
else else
echo Rewriting build for builddeps into $rewritten_build echo Rewriting build for builddeps into $rewritten_build
fi
eval rewritten_target=\${REWRITE_${target_var}}
if test "x$rewritten_target" = x; then
rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
echo Target stays the same $rewritten_target
else
echo Rewriting target for builddeps into $rewritten_target
fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
fi fi
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip]) eval rewritten_target=\${REWRITE_${target_var}}
if test "x$BDEPS_UNZIP" = x7z; then if test "x$rewritten_target" = x; then
BDEPS_UNZIP="7z x" rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
echo Target stays the same $rewritten_target
else
echo Rewriting target for builddeps into $rewritten_target
fi fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
fi
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
if test "x$BDEPS_UNZIP" = x7z; then
BDEPS_UNZIP="7z x"
fi
AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp]) AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
]) ])
AC_DEFUN([BDEPS_FTPGET], AC_DEFUN([BDEPS_FTPGET],
[ [
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip # $1 is the ftp://abuilddeps.server.com/libs/cups.zip
# $2 is the local file name for the downloaded file. # $2 is the local file name for the downloaded file.
VALID_TOOL=no VALID_TOOL=no
if test "x$BDEPS_FTP" = xwget; then if test "x$BDEPS_FTP" = xwget; then
VALID_TOOL=yes VALID_TOOL=yes
wget -O $2 $1 wget -O $2 $1
fi fi
if test "x$BDEPS_FTP" = xlftp; then if test "x$BDEPS_FTP" = xlftp; then
VALID_TOOL=yes VALID_TOOL=yes
lftp -c "get $1 -o $2" lftp -c "get $1 -o $2"
fi fi
if test "x$BDEPS_FTP" = xftp; then if test "x$BDEPS_FTP" = xftp; then
VALID_TOOL=yes VALID_TOOL=yes
FTPSERVER=`echo $1 | cut -f 3 -d '/'` FTPSERVER=`echo $1 | cut -f 3 -d '/'`
FTPPATH=`echo $1 | cut -f 4- -d '/'` FTPPATH=`echo $1 | cut -f 4- -d '/'`
FTPUSERPWD=${FTPSERVER%%@*} FTPUSERPWD=${FTPSERVER%%@*}
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
FTPUSER=${userpwd%%:*} FTPUSER=${userpwd%%:*}
FTPPWD=${userpwd#*@} FTPPWD=${userpwd#*@}
FTPSERVER=${FTPSERVER#*@} FTPSERVER=${FTPSERVER#*@}
else else
FTPUSER=ftp FTPUSER=ftp
FTPPWD=ftp FTPPWD=ftp
fi
# the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works,
# passive mode is better!
(\
echo "user $FTPUSER $FTPPWD" ;\
echo "pass" ;\
echo "bin" ;\
echo "get $FTPPATH $2" ;\
) | ftp -in $FTPSERVER
fi
if test "x$VALID_TOOL" != xyes; then
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
fi fi
# the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works,
# passive mode is better!
( \
echo "user $FTPUSER $FTPPWD" ; \
echo "pass" ; \
echo "bin" ; \
echo "get $FTPPATH $2" ; \
) | ftp -in $FTPSERVER
fi
if test "x$VALID_TOOL" != xyes; then
AC_MSG_ERROR([I do not know how to use the tool: $BDEPS_FTP])
fi
]) ])
AC_DEFUN([BDEPS_CHECK_MODULE], AC_DEFUN([BDEPS_CHECK_MODULE],
[ [
define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n']) define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
# Source the builddeps file again, to make sure it uses the latest variables! # Source the builddeps file again, to make sure it uses the latest variables!
. $builddepsfile . $builddepsfile
# Look for a target and build machine specific resource! # Look for a target and build machine specific resource!
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
if test "x$resource" = x; then if test "x$resource" = x; then
# Ok, lets instead look for a target specific resource # Ok, lets instead look for a target specific resource
eval resource=\${builddep_$2_TARGET_${rewritten_target_var}} eval resource=\${builddep_$2_TARGET_${rewritten_target_var}}
fi fi
if test "x$resource" = x; then if test "x$resource" = x; then
# Ok, lets instead look for a build specific resource # Ok, lets instead look for a build specific resource
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}} eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
fi fi
if test "x$resource" = x; then if test "x$resource" = x; then
# Ok, lets instead look for a generic resource # Ok, lets instead look for a generic resource
# (The $2 comes from M4 and not the shell, thus no need for eval here.) # (The $2 comes from M4 and not the shell, thus no need for eval here.)
resource=${builddep_$2} resource=${builddep_$2}
fi
if test "x$resource" != x; then
AC_MSG_NOTICE([Using builddeps $resource for $2])
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
fi
# Source the builddeps file again, because in the previous command, the depdir
# was updated to point at the current build dependency install directory.
. $builddepsfile
# Now extract variables from the builddeps.conf files.
theroot=${builddep_$2_ROOT}
thecflags=${builddep_$2_CFLAGS}
thelibs=${builddep_$2_LIBS}
if test "x$depdir" = x; then
AC_MSG_ERROR([Could not download build dependency $2])
fi
$1=$depdir
if test "x$theroot" != x; then
$1="$theroot"
fi
if test "x$thecflags" != x; then
$1_CFLAGS="$thecflags"
fi
if test "x$thelibs" != x; then
$1_LIBS="$thelibs"
fi
m4_default([$4], [:])
m4_ifvaln([$5], [else $5])
fi
m4_ifvaln([$5], [else $5])
fi fi
if test "x$resource" != x; then
AC_MSG_NOTICE([Using builddeps $resource for $2])
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
fi
# Source the builddeps file again, because in the previous command, the depdir
# was updated to point at the current build dependency install directory.
. $builddepsfile
# Now extract variables from the builddeps.conf files.
theroot=${builddep_$2_ROOT}
thecflags=${builddep_$2_CFLAGS}
thelibs=${builddep_$2_LIBS}
if test "x$depdir" = x; then
AC_MSG_ERROR([Could not download build dependency $2])
fi
$1=$depdir
if test "x$theroot" != x; then
$1="$theroot"
fi
if test "x$thecflags" != x; then
$1_CFLAGS="$thecflags"
fi
if test "x$thelibs" != x; then
$1_LIBS="$thelibs"
fi
m4_default([$4], [:])
m4_ifvaln([$5], [else $5])
fi
m4_ifvaln([$5], [else $5])
fi
]) ])
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%%.*}
extension=${filename#*.} extension=${filename#*.}
installdir=$4/$filebase installdir=$4/$filebase
if test ! -f $installdir/$filename.unpacked; then if test ! -f $installdir/$filename.unpacked; then
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir]) AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
if test ! -d $installdir; then if test ! -d $installdir; then
mkdir -p $installdir mkdir -p $installdir
fi fi
if test ! -d $installdir; then if test ! -d $installdir; then
AC_MSG_ERROR([Could not create directory $installdir]) AC_MSG_ERROR([Could not create directory $installdir])
fi fi
tmpfile=`mktemp $installdir/$1.XXXXXXXXX` tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
touch $tmpfile touch $tmpfile
if test ! -f $tmpfile; then if test ! -f $tmpfile; then
AC_MSG_ERROR([Could not create files in directory $installdir]) AC_MSG_ERROR([Could not create files in directory $installdir])
fi
BDEPS_FTPGET([$3/$2] , [$tmpfile])
mv $tmpfile $installdir/$filename
if test ! -s $installdir/$filename; then
AC_MSG_ERROR([Could not download $3/$2])
fi
case "$extension" in
zip) echo "Unzipping $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
;;
tar.gz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
tgz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
;;
esac
fi fi
if test -f $installdir/$filename.unpacked; then BDEPS_FTPGET([$3/$2] , [$tmpfile])
$5=$installdir mv $tmpfile $installdir/$filename
if test ! -s $installdir/$filename; then
AC_MSG_ERROR([Could not download $3/$2])
fi fi
case "$extension" in
zip) echo "Unzipping $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
;;
tar.gz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
tgz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
*) AC_MSG_ERROR([Cannot handle build depency archive with extension $extension])
;;
esac
fi
if test -f $installdir/$filename.unpacked; then
$5=$installdir
fi
]) ])
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])])
]) ])
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# questions. # questions.
# #
# This script is processed by configure before it's usable. It is run from # This script is processed by configure before it's usable. It is run from
# the root of the build directory. # the root of the build directory.
...@@ -67,14 +67,14 @@ UNZIP="@UNZIP@" ...@@ -67,14 +67,14 @@ UNZIP="@UNZIP@"
SRC_ROOT="@SRC_ROOT@" SRC_ROOT="@SRC_ROOT@"
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
PATH="@VS_PATH@" PATH="@VS_PATH@"
fi fi
# Now locate the main script and run it. # Now locate the main script and run it.
REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh" REAL_COMPARE_SCRIPT="$SRC_ROOT/common/bin/compare.sh"
if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then if [ ! -e "$REAL_COMPARE_SCRIPT" ]; then
echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT" echo "Error: Cannot locate compare script, it should have been in $REAL_COMPARE_SCRIPT"
exit 1 exit 1
fi fi
. "$REAL_COMPARE_SCRIPT" "$@" . "$REAL_COMPARE_SCRIPT" "$@"
...@@ -46,4 +46,4 @@ ...@@ -46,4 +46,4 @@
#define HAVE_LIBGIF #define HAVE_LIBGIF
#define HAVE_LIBZ #define HAVE_LIBZ
#define HAVE_LIBM #define HAVE_LIBM
#define HAVE_ALTZONE #define HAVE_ALTZONE
...@@ -88,7 +88,6 @@ check_hg_updates() { ...@@ -88,7 +88,6 @@ check_hg_updates() {
check_autoconf_timestamps check_autoconf_timestamps
fi fi
fi fi
fi fi
} }
...@@ -106,7 +105,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then ...@@ -106,7 +105,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
fi fi
fi fi
# Autoconf calls the configure script recursively sometimes. # Autoconf calls the configure script recursively sometimes.
# Don't start logging twice in that case # Don't start logging twice in that case
if test "x$conf_debug_configure" = xtrue; then if test "x$conf_debug_configure" = xtrue; then
conf_debug_configure=recursive conf_debug_configure=recursive
...@@ -120,28 +119,28 @@ conf_openjdk_target= ...@@ -120,28 +119,28 @@ conf_openjdk_target=
for conf_option for conf_option
do do
case $conf_option in case $conf_option in
--openjdk-target=*) --openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'` conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
continue ;; continue ;;
--debug-configure) --debug-configure)
if test "x$conf_debug_configure" != xrecursive; then if test "x$conf_debug_configure" != xrecursive; then
conf_debug_configure=true conf_debug_configure=true
export conf_debug_configure export conf_debug_configure
fi fi
continue ;; continue ;;
*) *)
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;; conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option") ;;
esac esac
case $conf_option in case $conf_option in
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*) -build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) -target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*) -host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;; conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
-help | --help | --hel | --he | -h) -help | --help | --hel | --he | -h)
conf_print_help=true ;; conf_print_help=true ;;
esac esac
done done
...@@ -179,7 +178,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then ...@@ -179,7 +178,7 @@ if test -e $conf_custom_script_dir/generated-configure.sh; then
else else
echo Running generated-configure.sh echo Running generated-configure.sh
conf_script_to_run=$conf_script_dir/generated-configure.sh conf_script_to_run=$conf_script_dir/generated-configure.sh
fi fi
if test "x$conf_debug_configure" != x; then if test "x$conf_debug_configure" != x; then
# Turn on shell debug output if requested (initial or recursive) # Turn on shell debug output if requested (initial or recursive)
......
...@@ -236,7 +236,7 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status" ...@@ -236,7 +236,7 @@ CONFIG_STATUS="$OUTPUT_ROOT/config.status"
# Create the actual output files. Now the main work of configure is done. # Create the actual output files. Now the main work of configure is done.
AC_OUTPUT AC_OUTPUT
# Try to move the config.log file to the output directory. # Try to move the config.log file to the output directory.
if test -e ./config.log; then if test -e ./config.log; then
$MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
fi fi
......
...@@ -25,194 +25,194 @@ ...@@ -25,194 +25,194 @@
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP], AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[ [
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd) AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
]) ])
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
[ [
# Print a helpful message on how to acquire the necessary build dependency. # Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetyp2, cups, pulse, alsa etc # $1 is the help tag: freetyp2, cups, pulse, alsa etc
MISSING_DEPENDENCY=$1 MISSING_DEPENDENCY=$1
PKGHANDLER_COMMAND= PKGHANDLER_COMMAND=
case $PKGHANDLER in case $PKGHANDLER in
apt-get) apt-get)
apt_help $MISSING_DEPENDENCY ;; apt_help $MISSING_DEPENDENCY ;;
yum) yum)
yum_help $MISSING_DEPENDENCY ;; yum_help $MISSING_DEPENDENCY ;;
port) port)
port_help $MISSING_DEPENDENCY ;; port_help $MISSING_DEPENDENCY ;;
pkgutil) pkgutil)
pkgutil_help $MISSING_DEPENDENCY ;; pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd) pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;; pkgadd_help $MISSING_DEPENDENCY ;;
* ) * )
break ;; break ;;
esac esac
if test "x$PKGHANDLER_COMMAND" != x; then if test "x$PKGHANDLER_COMMAND" != x; then
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
fi fi
]) ])
cygwin_help() { cygwin_help() {
case $1 in case $1 in
unzip) unzip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
zip) zip)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
make) make)
PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;; PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
* ) * )
break ;; break ;;
esac esac
} }
apt_help() { apt_help() {
case $1 in case $1 in
devkit) devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;; PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
openjdk) openjdk)
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;; PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
alsa) alsa)
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
cups) cups)
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
freetype2) freetype2)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
pulse) pulse)
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
x11) x11)
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;; PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
ccache) ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;; PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* ) * )
break ;; break ;;
esac esac
} }
yum_help() { yum_help() {
case $1 in case $1 in
devkit) devkit)
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;; PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
openjdk) openjdk)
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;; PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
alsa) alsa)
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
cups) cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype2) freetype2)
PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
pulse) pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11) x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;; PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
ccache) ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;; PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* ) * )
break ;; break ;;
esac esac
} }
port_help() { port_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
pkgutil_help() { pkgutil_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
pkgadd_help() { pkgadd_help() {
PKGHANDLER_COMMAND="" PKGHANDLER_COMMAND=""
} }
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
]) ])
...@@ -111,12 +111,12 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ ...@@ -111,12 +111,12 @@ EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols # Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
# creation. # creation.
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
FULL_DEBUG_SYMBOLS=1 FULL_DEBUG_SYMBOLS=1
# Ensure hotspot uses the objcopy that configure located # Ensure hotspot uses the objcopy that configure located
ALT_OBJCOPY:=$(OBJCOPY) ALT_OBJCOPY:=$(OBJCOPY)
else else
FULL_DEBUG_SYMBOLS=0 FULL_DEBUG_SYMBOLS=0
endif endif
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
# (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf) # (called @OPENJDK_BUILD_AUTOCONF_NAME@ by autoconf)
# using 'configure @CONFIGURE_COMMAND_LINE@' # using 'configure @CONFIGURE_COMMAND_LINE@'
# When calling macros, the spaces between arguments are # When calling macros, the spaces between arguments are
# often semantically important! Sometimes we need to subst # often semantically important! Sometimes we need to subst
# spaces and commas, therefore we need the following macros. # spaces and commas, therefore we need the following macros.
X:= X:=
SPACE:=$(X) $(X) SPACE:=$(X) $(X)
...@@ -56,17 +56,17 @@ MAKE:=@MAKE@ ...@@ -56,17 +56,17 @@ MAKE:=@MAKE@
# Pass along the verbosity and log level settings. # Pass along the verbosity and log level settings.
ifeq (,$(findstring VERBOSE=,$(MAKE))) ifeq (,$(findstring VERBOSE=,$(MAKE)))
MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)" MAKE:=$(MAKE) $(VERBOSE) VERBOSE="$(VERBOSE)" LOG_LEVEL="$(LOG_LEVEL)"
endif endif
# No implicit variables or rules! # No implicit variables or rules!
ifeq (,$(findstring -R,$(MAKE))) ifeq (,$(findstring -R,$(MAKE)))
MAKE:=$(MAKE) -R MAKE:=$(MAKE) -R
endif endif
# Specify where the common include directory for makefiles is. # Specify where the common include directory for makefiles is.
ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE))) ifeq (,$(findstring -I @SRC_ROOT@/common/makefiles,$(MAKE)))
MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles MAKE:=$(MAKE) -I @SRC_ROOT@/common/makefiles
endif endif
# The "human readable" name of this configuration # The "human readable" name of this configuration
...@@ -175,7 +175,7 @@ else ...@@ -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)
...@@ -287,7 +287,7 @@ CACERTS_FILE=@CACERTS_FILE@ ...@@ -287,7 +287,7 @@ CACERTS_FILE=@CACERTS_FILE@
# Enable unlimited crypto policy # Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
# Necessary additional compiler flags to compile X11 # Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@ X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@ X_LIBS:=@X_LIBS@
OPENWIN_HOME:=@OPENWIN_HOME@ OPENWIN_HOME:=@OPENWIN_HOME@
...@@ -388,7 +388,7 @@ LIPO:=@LIPO@ ...@@ -388,7 +388,7 @@ LIPO:=@LIPO@
# Command to create a shared library # Command to create a shared library
SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@ SHARED_LIBRARY_FLAGS:=@SHARED_LIBRARY_FLAGS@
# Options to linker to specify a mapfile. # Options to linker to specify a mapfile.
# (Note absence of := assignment, because we do not want to evaluate the macro body here) # (Note absence of := assignment, because we do not want to evaluate the macro body here)
SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@ SET_SHARED_LIBRARY_MAPFILE=@SET_SHARED_LIBRARY_MAPFILE@
...@@ -461,7 +461,7 @@ NEW_JAVADOC = $(BOOTSTRAP_JAVAC_ARGS) com.sun.tools.javadoc.Main ...@@ -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
...@@ -541,9 +541,9 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@ ...@@ -541,9 +541,9 @@ BUILD_LOG_PREVIOUS:=@BUILD_LOG_PREVIOUS@
# we have solved how to prevent the log wrapper to wait # we have solved how to prevent the log wrapper to wait
# for the background sjavac server process. # for the background sjavac server process.
ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi) ifeq (@ENABLE_SJAVAC@X@OPENJDK_BUILD_OS_API@,yesXwinapi)
BUILD_LOG_WRAPPER:= BUILD_LOG_WRAPPER:=
else else
BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@ BUILD_LOG_WRAPPER:=@BUILD_LOG_WRAPPER@
endif endif
# Build setup # Build setup
...@@ -563,12 +563,12 @@ MSVCR_DLL:=@MSVCR_DLL@ ...@@ -563,12 +563,12 @@ MSVCR_DLL:=@MSVCR_DLL@
# of the next macro to get rid of superfluous files. # of the next macro to get rid of superfluous files.
ADD_SRCS=$1 ADD_SRCS=$1
ifneq (,$(ADD_SRC_ROOT)) ifneq (,$(ADD_SRC_ROOT))
# Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT # Append wildcard rule to pickup any matching source roots found below ADD_SRC_ROOT
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1)) ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(ADD_SRC_ROOT),$1))
endif endif
ifneq (,$(OVERRIDE_SRC_ROOT)) ifneq (,$(OVERRIDE_SRC_ROOT))
# Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT # Append wildcard rule to pickup any matching source roots found below OVERRIDE_SRC_ROOT
ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1)) ADD_SRCS+=$(wildcard $(subst $(SRC_ROOT),$(OVERRIDE_SRC_ROOT),$1))
endif endif
# OVR_SRCS creates a filter expression to filter out sources in # OVR_SRCS creates a filter expression to filter out sources in
...@@ -578,9 +578,9 @@ endif ...@@ -578,9 +578,9 @@ endif
# We cannot do the scan in configure, since that would force us to rerun configure when # We cannot do the scan in configure, since that would force us to rerun configure when
# we add overridden sources. # we add overridden sources.
ifneq (,$(OVERRIDE_SRC_ROOT)) ifneq (,$(OVERRIDE_SRC_ROOT))
OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f))))) OVR_SRCS:=$(addsuffix %,$(subst $(OVERRIDE_SRC_ROOT),$(SRC_ROOT),$(sort $(dir $(shell $(FIND) $(OVERRIDE_SRC_ROOT) -type f)))))
else else
OVR_SRCS:= OVR_SRCS:=
endif endif
#################################################### ####################################################
...@@ -589,7 +589,7 @@ endif ...@@ -589,7 +589,7 @@ endif
# #
# Common prefix for all installed files. Defaults to /usr/local, # Common prefix for all installed files. Defaults to /usr/local,
# but /opt/myjdk is another common version. # but /opt/myjdk is another common version.
INSTALL_PREFIX=@prefix@ INSTALL_PREFIX=@prefix@
# Directories containing architecture-dependent files should be relative to exec_prefix # Directories containing architecture-dependent files should be relative to exec_prefix
...@@ -619,7 +619,7 @@ INSTALL_INCLUDEDIR=@libdir@ ...@@ -619,7 +619,7 @@ INSTALL_INCLUDEDIR=@libdir@
# Executables that other programs run. # Executables that other programs run.
INSTALL_LIBEXECDIR=@libexecdir@ INSTALL_LIBEXECDIR=@libexecdir@
# Locale-dependent but architecture-independent data, such as message catalogs. # Locale-dependent but architecture-independent data, such as message catalogs.
INSTALL_LOCALEDIR=@localedir@ INSTALL_LOCALEDIR=@localedir@
# Modifiable single-machine data # Modifiable single-machine data
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册