2012-10-26 21:29:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2023-11-27 14:52:42 +00:00
|
|
|
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
2012-10-26 21:29:57 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
|
2014-02-24 12:29:26 +00:00
|
|
|
if test "x$1" != xCHECKME; then
|
2017-10-16 06:43:42 +00:00
|
|
|
echo "ERROR: Calling this wrapper script directly is not supported."
|
2014-02-24 12:29:26 +00:00
|
|
|
echo "Use the 'configure' script in the top-level directory instead."
|
2017-10-16 06:43:42 +00:00
|
|
|
exit 1
|
2012-10-26 21:29:57 +00:00
|
|
|
fi
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2017-10-16 06:43:42 +00:00
|
|
|
# The next argument is the absolute top-level directory path.
|
|
|
|
# The TOPDIR variable is passed on to configure.ac.
|
|
|
|
TOPDIR="$2"
|
|
|
|
# Remove these two arguments to get to the user supplied arguments
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
|
2015-01-15 14:43:28 +00:00
|
|
|
if test "x$BASH" = x; then
|
|
|
|
echo "Error: This script must be run using bash." 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-11-27 14:52:42 +00:00
|
|
|
|
|
|
|
if [[ "$TOPDIR" =~ .*[[:space:]]+.* ]]; then
|
|
|
|
echo "Error: Build path containing space character is not supported" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-02-11 08:18:49 +00:00
|
|
|
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
|
2015-01-15 14:43:28 +00:00
|
|
|
export CONFIG_SHELL=$BASH
|
2015-02-11 08:18:49 +00:00
|
|
|
export _as_can_reexec=no
|
2015-01-15 14:43:28 +00:00
|
|
|
|
2019-10-11 07:43:18 +00:00
|
|
|
# Make sure all shell commands are executed with the C locale
|
|
|
|
export LC_ALL=C
|
|
|
|
|
2017-10-05 09:02:18 +00:00
|
|
|
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
2018-02-05 08:15:32 +00:00
|
|
|
custom_hook=$CUSTOM_CONFIG_DIR/custom-hook.m4
|
|
|
|
if test ! -e $custom_hook; then
|
2020-11-12 06:29:13 +00:00
|
|
|
echo "CUSTOM_CONFIG_DIR ($CUSTOM_CONFIG_DIR) not pointing to a proper custom config dir."
|
2017-10-05 09:02:18 +00:00
|
|
|
echo "Error: Cannot continue" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2018-02-12 15:36:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
CURRENT_DIR=`pwd`
|
|
|
|
if test "x$CURRENT_DIR" = "x$TOPDIR"; then
|
|
|
|
# We are running configure from the src root.
|
|
|
|
# Create '.configure-support' under $TOPDIR/build
|
|
|
|
build_support_dir="$TOPDIR/build/.configure-support"
|
|
|
|
elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
|
|
|
|
# We are running configure from the custom root.
|
|
|
|
# Create '.configure-support' under $CUSTOM_ROOT/build
|
|
|
|
build_support_dir="$CUSTOM_ROOT/build/.configure-support"
|
2018-02-05 08:15:32 +00:00
|
|
|
else
|
2018-02-12 15:36:15 +00:00
|
|
|
# We are running configure from outside of the src dir.
|
|
|
|
# Create 'build_support_dir' in the current directory.
|
|
|
|
build_support_dir="$CURRENT_DIR/configure-support"
|
2012-09-18 18:29:16 +00:00
|
|
|
fi
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
conf_script_dir="$TOPDIR/make/autoconf"
|
|
|
|
generated_script="$build_support_dir/generated-configure.sh"
|
|
|
|
|
2012-07-03 23:11:12 +00:00
|
|
|
###
|
2018-02-05 08:15:32 +00:00
|
|
|
### Use autoconf to create a runnable configure script, if needed
|
2012-07-03 23:11:12 +00:00
|
|
|
###
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
autoconf_missing_help() {
|
2020-08-05 09:59:10 +00:00
|
|
|
APT_GET="`type -p apt-get 2> /dev/null`"
|
|
|
|
YUM="`type -p yum 2> /dev/null`"
|
|
|
|
BREW="`type -p brew 2> /dev/null`"
|
|
|
|
ZYPPER="`type -p zypper 2> /dev/null`"
|
|
|
|
CYGWIN="`type -p cygpath 2> /dev/null`"
|
2020-11-12 06:29:13 +00:00
|
|
|
UNAMEOUT="`uname 2> /dev/null`"
|
2018-02-05 08:15:32 +00:00
|
|
|
|
2019-03-05 08:55:00 +00:00
|
|
|
if test "x$ZYPPER" != x; then
|
|
|
|
PKGHANDLER_COMMAND="sudo zypper install autoconf"
|
|
|
|
elif test "x$APT_GET" != x; then
|
2018-02-05 08:15:32 +00:00
|
|
|
PKGHANDLER_COMMAND="sudo apt-get install autoconf"
|
|
|
|
elif test "x$YUM" != x; then
|
|
|
|
PKGHANDLER_COMMAND="sudo yum install autoconf"
|
|
|
|
elif test "x$BREW" != x; then
|
|
|
|
PKGHANDLER_COMMAND="brew install autoconf"
|
2020-11-12 06:29:13 +00:00
|
|
|
elif test "x$UNAMEOUT" == xAIX; then
|
|
|
|
echo "You might be able to fix this by installing autoconf from the 'AIX Toolbox for Linux Applications' (or compile it from the sources)."
|
2018-02-05 08:15:32 +00:00
|
|
|
elif test "x$CYGWIN" != x; then
|
|
|
|
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P autoconf )"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$PKGHANDLER_COMMAND" != x; then
|
|
|
|
echo "You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
2012-04-10 15:18:28 +00:00
|
|
|
fi
|
2012-10-26 21:29:57 +00:00
|
|
|
}
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
generate_configure_script() {
|
|
|
|
if test "x$AUTOCONF" != x; then
|
|
|
|
if test ! -x "$AUTOCONF"; then
|
|
|
|
echo
|
|
|
|
echo "The specified AUTOCONF variable does not point to a valid autoconf executable:"
|
|
|
|
echo "AUTOCONF=$AUTOCONF"
|
|
|
|
echo "Error: Cannot continue" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
2020-08-05 09:59:10 +00:00
|
|
|
AUTOCONF="`type -p autoconf 2> /dev/null`"
|
2018-02-05 08:15:32 +00:00
|
|
|
if test "x$AUTOCONF" = x; then
|
|
|
|
echo
|
2020-11-12 06:29:13 +00:00
|
|
|
echo "Autoconf is not found on the PATH ($PATH), and AUTOCONF is not set."
|
2018-02-05 08:15:32 +00:00
|
|
|
echo "You need autoconf to be able to generate a runnable configure script."
|
|
|
|
autoconf_missing_help
|
|
|
|
echo "Error: Cannot find autoconf" 1>&2
|
|
|
|
exit 1
|
2012-07-03 23:11:12 +00:00
|
|
|
fi
|
2018-02-05 08:15:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
autoconf_version=`$AUTOCONF --version | head -1`
|
|
|
|
echo "Using autoconf at ${AUTOCONF} [$autoconf_version]"
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2017-10-05 09:02:18 +00:00
|
|
|
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
2018-02-05 08:15:32 +00:00
|
|
|
# Generate configure script with custom hooks compiled in.
|
|
|
|
custom_patcher='sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
|
2018-08-30 06:15:10 +00:00
|
|
|
custom_script_dir_include="-I$CUSTOM_CONFIG_DIR"
|
2018-02-05 08:15:32 +00:00
|
|
|
else
|
|
|
|
custom_patcher='cat'
|
2018-08-30 06:15:10 +00:00
|
|
|
custom_script_dir_include=""
|
2018-02-05 08:15:32 +00:00
|
|
|
fi
|
|
|
|
|
2018-02-12 15:36:15 +00:00
|
|
|
mkdir -p $build_support_dir
|
2018-02-05 08:15:32 +00:00
|
|
|
# Call autoconf but replace the "magic" variable in configure.ac if requested.
|
2018-08-30 06:15:10 +00:00
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
cat $conf_script_dir/configure.ac | eval $custom_patcher | \
|
2018-08-30 06:15:10 +00:00
|
|
|
${AUTOCONF} -W all $custom_script_dir_include -I$conf_script_dir - \
|
|
|
|
> $generated_script
|
2018-02-05 08:15:32 +00:00
|
|
|
rm -rf autom4te.cache
|
|
|
|
|
|
|
|
# Sanity check
|
|
|
|
if test ! -s $generated_script; then
|
|
|
|
echo "Error: Failed to generate runnable configure script" 1>&2
|
|
|
|
rm -f $generated_script
|
|
|
|
exit 1
|
2012-10-26 21:29:57 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
test_generated_up_to_date() {
|
2018-02-08 18:28:50 +00:00
|
|
|
conf_source_files="$conf_script_dir/configure.ac $conf_script_dir/*.m4"
|
|
|
|
if test "x$CUSTOM_CONFIG_DIR" != x; then
|
|
|
|
conf_custom_source_files="$CUSTOM_CONFIG_DIR/*.m4"
|
|
|
|
else
|
|
|
|
conf_custom_source_files=""
|
|
|
|
fi
|
2018-02-05 08:15:32 +00:00
|
|
|
|
2018-02-08 18:28:50 +00:00
|
|
|
for file in $conf_source_files $conf_custom_source_files ; do
|
|
|
|
if test $file -nt $generated_script; then
|
|
|
|
return 0
|
2012-10-26 21:29:57 +00:00
|
|
|
fi
|
2018-02-08 18:28:50 +00:00
|
|
|
done
|
2018-02-05 08:15:32 +00:00
|
|
|
return 1
|
2012-10-26 21:29:57 +00:00
|
|
|
}
|
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
run_autoconf=false
|
|
|
|
if test "x$1" = xautogen; then
|
|
|
|
# User called us as "configure autogen", so force regeneration
|
|
|
|
run_autoconf=true
|
|
|
|
shift
|
|
|
|
fi
|
2012-10-26 21:29:57 +00:00
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
if test ! -s $generated_script; then
|
|
|
|
# Generated script is missing, so we need to create it
|
|
|
|
echo "Runnable configure script is not present"
|
|
|
|
run_autoconf=true
|
|
|
|
else
|
|
|
|
# File is present, but is it up to date?
|
|
|
|
if test_generated_up_to_date; then
|
|
|
|
echo "Runnable configure script is not up to date"
|
|
|
|
run_autoconf=true
|
2012-04-10 15:18:28 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-02-05 08:15:32 +00:00
|
|
|
if test "x$run_autoconf" = xtrue; then
|
2018-02-12 15:36:15 +00:00
|
|
|
echo "Generating runnable configure script at $generated_script"
|
2018-02-05 08:15:32 +00:00
|
|
|
generate_configure_script
|
|
|
|
fi
|
|
|
|
|
2013-10-10 12:58:19 +00:00
|
|
|
# Autoconf calls the configure script recursively sometimes.
|
2012-09-18 18:29:16 +00:00
|
|
|
# Don't start logging twice in that case
|
2012-10-26 21:29:57 +00:00
|
|
|
if test "x$conf_debug_configure" = xtrue; then
|
2012-09-18 18:29:16 +00:00
|
|
|
conf_debug_configure=recursive
|
|
|
|
fi
|
2014-02-13 22:30:08 +00:00
|
|
|
|
2012-07-03 23:11:12 +00:00
|
|
|
###
|
|
|
|
### Process command-line arguments
|
|
|
|
###
|
2014-02-13 22:30:08 +00:00
|
|
|
|
|
|
|
# Returns a shell-escaped version of the argument given.
|
|
|
|
function shell_quote() {
|
|
|
|
if [[ -n "$1" ]]; then
|
|
|
|
# Uses only shell-safe characters? No quoting needed.
|
|
|
|
# '=' is a zsh meta-character, but only in word-initial position.
|
2014-03-04 09:22:25 +00:00
|
|
|
if echo "$1" | grep '^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\.:,%/+=_-]\{1,\}$' > /dev/null \
|
|
|
|
&& ! echo "$1" | grep '^=' > /dev/null; then
|
2014-02-13 22:30:08 +00:00
|
|
|
quoted="$1"
|
|
|
|
else
|
2014-03-04 09:22:25 +00:00
|
|
|
if echo "$1" | grep "[\'!]" > /dev/null; then
|
2014-02-13 22:30:08 +00:00
|
|
|
# csh does history expansion within single quotes, but not
|
|
|
|
# when backslash-escaped!
|
|
|
|
local quoted_quote="'\\''" quoted_exclam="'\\!'"
|
|
|
|
word="${1//\'/${quoted_quote}}"
|
|
|
|
word="${1//\!/${quoted_exclam}}"
|
|
|
|
fi
|
|
|
|
quoted="'$1'"
|
|
|
|
fi
|
|
|
|
echo "$quoted"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
conf_processed_arguments=()
|
2014-02-13 22:30:08 +00:00
|
|
|
conf_quoted_arguments=()
|
2012-07-03 23:11:12 +00:00
|
|
|
conf_openjdk_target=
|
2012-04-10 15:18:28 +00:00
|
|
|
|
2012-07-03 23:11:12 +00:00
|
|
|
for conf_option
|
2012-04-10 15:18:28 +00:00
|
|
|
do
|
2014-02-13 22:30:08 +00:00
|
|
|
|
|
|
|
# Process (and remove) our own extensions that will not be passed to autoconf
|
2012-07-03 23:11:12 +00:00
|
|
|
case $conf_option in
|
2013-10-10 12:58:19 +00:00
|
|
|
--openjdk-target=*)
|
|
|
|
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
|
2014-01-29 10:21:54 +00:00
|
|
|
;;
|
2013-10-10 12:58:19 +00:00
|
|
|
--debug-configure)
|
|
|
|
if test "x$conf_debug_configure" != xrecursive; then
|
|
|
|
conf_debug_configure=true
|
|
|
|
export conf_debug_configure
|
|
|
|
fi
|
2014-01-29 10:21:54 +00:00
|
|
|
;;
|
2014-02-13 22:30:08 +00:00
|
|
|
*)
|
|
|
|
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Store all variables overridden on the command line
|
|
|
|
case $conf_option in
|
2014-01-29 10:21:54 +00:00
|
|
|
[^-]*=*)
|
|
|
|
# Add name of variable to CONFIGURE_OVERRIDDEN_VARIABLES list inside !...!.
|
|
|
|
conf_env_var=`expr "x$conf_option" : 'x\([^=]*\)='`
|
|
|
|
CONFIGURE_OVERRIDDEN_VARIABLES="$CONFIGURE_OVERRIDDEN_VARIABLES!$conf_env_var!"
|
2014-02-13 22:30:08 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Save the arguments, intelligently quoted for CONFIGURE_COMMAND_LINE.
|
|
|
|
case $conf_option in
|
|
|
|
*=*)
|
|
|
|
conf_option_name=`expr "x$conf_option" : 'x\([^=]*\)='`
|
|
|
|
conf_option_name=$(shell_quote "$conf_option_name")
|
|
|
|
conf_option_value=`expr "x$conf_option" : 'x[^=]*=\(.*\)'`
|
|
|
|
conf_option_value=$(shell_quote "$conf_option_value")
|
|
|
|
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$conf_option_name=$conf_option_value")
|
2014-01-29 10:21:54 +00:00
|
|
|
;;
|
2013-10-10 12:58:19 +00:00
|
|
|
*)
|
2014-02-13 22:30:08 +00:00
|
|
|
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$(shell_quote "$conf_option")")
|
2014-01-29 10:21:54 +00:00
|
|
|
;;
|
2012-04-10 15:18:28 +00:00
|
|
|
esac
|
|
|
|
|
2014-02-13 22:30:08 +00:00
|
|
|
# Check for certain autoconf options that require extra action
|
2012-07-03 23:11:12 +00:00
|
|
|
case $conf_option in
|
2013-10-10 12:58:19 +00:00
|
|
|
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
2022-03-04 12:42:07 +00:00
|
|
|
conf_build_set=true ;;
|
2013-10-10 12:58:19 +00:00
|
|
|
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
2022-03-04 12:42:07 +00:00
|
|
|
conf_incompatible_crosscompile="$conf_incompatible_crosscompile $conf_option" ;;
|
2013-10-10 12:58:19 +00:00
|
|
|
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
2022-03-04 12:42:07 +00:00
|
|
|
conf_incompatible_crosscompile="$conf_incompatible_crosscompile $conf_option" ;;
|
2013-10-10 12:58:19 +00:00
|
|
|
-help | --help | --hel | --he | -h)
|
|
|
|
conf_print_help=true ;;
|
2012-04-10 15:18:28 +00:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2014-02-13 22:30:08 +00:00
|
|
|
# Save the quoted command line
|
|
|
|
CONFIGURE_COMMAND_LINE="${conf_quoted_arguments[@]}"
|
|
|
|
|
2022-03-04 12:42:07 +00:00
|
|
|
if test "x$conf_incompatible_crosscompile" != "x"; then
|
2012-10-26 21:29:57 +00:00
|
|
|
if test "x$conf_openjdk_target" != "x"; then
|
2022-03-04 12:42:07 +00:00
|
|
|
echo "Error: --openjdk-target was specified together with"
|
|
|
|
echo "incompatible autoconf cross-compilation flags."
|
|
|
|
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_incompatible_crosscompile."
|
|
|
|
echo "It is recommended that you only use --openjdk-target."
|
2012-07-03 23:11:12 +00:00
|
|
|
exit 1
|
2012-04-10 15:18:28 +00:00
|
|
|
else
|
2022-03-04 12:42:07 +00:00
|
|
|
echo "Warning: You are using misleading autoconf cross-compilation flag(s)."
|
|
|
|
echo "This is not encouraged as use of such flags during building can"
|
|
|
|
echo "quickly become confusing."
|
|
|
|
echo "It is highly recommended that you use --openjdk-target instead."
|
2012-07-03 23:11:12 +00:00
|
|
|
echo ""
|
2012-04-10 15:18:28 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
if test "x$conf_openjdk_target" != "x"; then
|
2022-03-04 12:42:07 +00:00
|
|
|
conf_processed_arguments=("--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
|
|
|
|
|
|
|
|
# If --build has been explicitly set don't override that flag with our own
|
|
|
|
if test "x$conf_build_set" != xtrue; then
|
|
|
|
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
|
|
|
|
conf_processed_arguments=("--build=$conf_build_platform" "${conf_processed_arguments[@]}")
|
|
|
|
fi
|
2012-04-10 15:18:28 +00:00
|
|
|
fi
|
|
|
|
|
2012-07-03 23:11:12 +00:00
|
|
|
# Make configure exit with error on invalid options as default.
|
|
|
|
# Can be overridden by --disable-option-checking, since we prepend our argument
|
|
|
|
# and later options override earlier.
|
2012-10-26 21:29:57 +00:00
|
|
|
conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arguments[@]}")
|
2012-06-08 03:25:06 +00:00
|
|
|
|
2012-07-03 23:11:12 +00:00
|
|
|
###
|
|
|
|
### Call the configure script
|
|
|
|
###
|
2012-10-26 21:29:57 +00:00
|
|
|
if test "x$conf_debug_configure" != x; then
|
2012-09-18 18:29:16 +00:00
|
|
|
# Turn on shell debug output if requested (initial or recursive)
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
|
2015-05-11 11:45:39 +00:00
|
|
|
# Now transfer control to the script generated by autoconf. This is where the
|
|
|
|
# main work is done.
|
2015-12-09 10:44:40 +00:00
|
|
|
RCDIR=`mktemp -dt jdk-build-configure.tmp.XXXXXX` || exit $?
|
|
|
|
trap "rm -rf \"$RCDIR\"" EXIT
|
2015-05-11 11:45:39 +00:00
|
|
|
conf_logfile=./configure.log
|
2018-02-05 08:15:32 +00:00
|
|
|
(exec 3>&1 ; ((. $generated_script "${conf_processed_arguments[@]}" 2>&1 1>&3 ) \
|
2015-12-09 10:44:40 +00:00
|
|
|
; echo $? > "$RCDIR/rc" ) \
|
|
|
|
| tee -a $conf_logfile 1>&2 ; exec 3>&-) | tee -a $conf_logfile
|
2012-06-08 03:25:06 +00:00
|
|
|
|
2015-12-09 10:44:40 +00:00
|
|
|
conf_result_code=`cat "$RCDIR/rc"`
|
2012-07-03 23:11:12 +00:00
|
|
|
###
|
|
|
|
### Post-processing
|
|
|
|
###
|
2012-06-08 03:25:06 +00:00
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
if test $conf_result_code -eq 0; then
|
|
|
|
if test "x$conf_print_help" = xtrue; then
|
|
|
|
cat <<EOT
|
|
|
|
|
|
|
|
Additional (non-autoconf) OpenJDK Options:
|
|
|
|
--openjdk-target=TARGET cross-compile with TARGET as target platform
|
|
|
|
(i.e. the one you will run the resulting binary on).
|
|
|
|
Equivalent to --host=TARGET --target=TARGET
|
2022-03-04 12:42:07 +00:00
|
|
|
--build=<current platform>, or the platform you
|
|
|
|
have provided if you have explicitly passed
|
|
|
|
--build to configure
|
2012-10-26 21:29:57 +00:00
|
|
|
--debug-configure Run the configure script with additional debug
|
|
|
|
logging enabled.
|
|
|
|
|
2014-02-24 11:16:58 +00:00
|
|
|
EOT
|
|
|
|
|
2016-04-08 11:14:23 +00:00
|
|
|
# Print additional help, e.g. a list of toolchains and JVM features.
|
2016-02-12 10:07:35 +00:00
|
|
|
# This must be done by the autoconf script.
|
2018-02-05 08:15:32 +00:00
|
|
|
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
2014-02-24 11:16:58 +00:00
|
|
|
|
|
|
|
cat <<EOT
|
|
|
|
|
2012-10-26 21:29:57 +00:00
|
|
|
Please be aware that, when cross-compiling, the OpenJDK configure script will
|
|
|
|
generally use 'target' where autoconf traditionally uses 'host'.
|
2014-01-29 10:21:54 +00:00
|
|
|
|
|
|
|
Also note that variables must be passed on the command line. Variables in the
|
|
|
|
environment will generally be ignored, unlike traditional autoconf scripts.
|
2012-10-26 21:29:57 +00:00
|
|
|
EOT
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo configure exiting with result code $conf_result_code
|
|
|
|
fi
|
|
|
|
|
2012-09-18 18:29:16 +00:00
|
|
|
exit $conf_result_code
|