提交 9f2cb897 编写于 作者: L lana

Merge

......@@ -283,6 +283,7 @@ AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool
# $3: code snippet to call if variable was used to find tool
AC_DEFUN([BASIC_SETUP_TOOL],
[
# Publish this variable in the help.
......@@ -340,6 +341,7 @@ AC_DEFUN([BASIC_SETUP_TOOL],
fi
fi
fi
$3
fi
])
......@@ -848,17 +850,8 @@ AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
# Goes looking for a usable version of GNU make.
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
[
# We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
if test "x$MAKE" != x; then
# User has supplied a make, test it.
if test ! -f "$MAKE"; then
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
fi
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
if test "x$FOUND_MAKE" = x; then
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
fi
else
BASIC_SETUP_TOOL([MAKE],
[
# Try our hardest to locate a correct version of GNU make
AC_PATH_PROGS(CHECK_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
......@@ -886,7 +879,13 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
if test "x$FOUND_MAKE" = x; then
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
fi
fi
],[
# If MAKE was set by user, verify the version
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
if test "x$FOUND_MAKE" = x; then
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
fi
])
MAKE=$FOUND_MAKE
AC_SUBST(MAKE)
......
......@@ -72,49 +72,50 @@ AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
# that configure can use them while detecting compilers.
# TOOLCHAIN_TYPE is available here.
AC_DEFUN_ONCE([FLAGS_SETUP_SYSROOT_FLAGS],
# Param 1 - Optional prefix to all variables. (e.g BUILD_)
AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
[
if test "x$SYSROOT" != "x"; then
if test "x[$]$1SYSROOT" != "x"; then
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Solaris Studio does not have a concept of sysroot. Instead we must
# make sure the default include and lib dirs are appended to each
# compile and link command line.
SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
$1SYSROOT_CFLAGS="-I[$]$1SYSROOT/usr/include"
$1SYSROOT_LDFLAGS="-L[$]$1SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-L[$]$1SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-L[$]$1SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
fi
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
SYSROOT_CFLAGS="--sysroot=$SYSROOT"
SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
SYSROOT_CFLAGS="-isysroot $SYSROOT"
SYSROOT_LDFLAGS="-isysroot $SYSROOT"
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
fi
# Propagate the sysroot args to hotspot
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
$1LEGACY_EXTRA_CFLAGS="[$]$1LEGACY_EXTRA_CFLAGS [$]$1SYSROOT_CFLAGS"
$1LEGACY_EXTRA_CXXFLAGS="[$]$1LEGACY_EXTRA_CXXFLAGS [$]$1SYSROOT_CFLAGS"
$1LEGACY_EXTRA_LDFLAGS="[$]$1LEGACY_EXTRA_LDFLAGS [$]$1SYSROOT_LDFLAGS"
# The global CFLAGS and LDFLAGS variables need these for configure to function
CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
$1CFLAGS="[$]$1CFLAGS [$]$1SYSROOT_CFLAGS"
$1CPPFLAGS="[$]$1CPPFLAGS [$]$1SYSROOT_CFLAGS"
$1CXXFLAGS="[$]$1CXXFLAGS [$]$1SYSROOT_CFLAGS"
$1LDFLAGS="[$]$1LDFLAGS [$]$1SYSROOT_LDFLAGS"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# We also need -iframework<path>/System/Library/Frameworks
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -iframework [$]$1SYSROOT/System/Library/Frameworks"
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -F [$]$1SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
fi
AC_SUBST(SYSROOT_CFLAGS)
AC_SUBST(SYSROOT_LDFLAGS)
AC_SUBST($1SYSROOT_CFLAGS)
AC_SUBST($1SYSROOT_LDFLAGS)
])
AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
......@@ -785,7 +786,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
fi
# Customize LDFLAGS for executables
......@@ -808,7 +809,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
LDFLAGS_JDKLIB_SUFFIX=""
JDKLIB_LIBS=""
else
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS} \
-L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
......@@ -827,27 +828,25 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
fi
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
JDKLIB_LIBS="-ljava -ljvm"
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
JDKLIB_LIBS="$JDKLIB_LIBS -lc"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
fi
fi
AC_SUBST(LDFLAGS_JDKLIB)
AC_SUBST(LDFLAGS_JDKEXE)
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
AC_SUBST(JDKLIB_LIBS)
AC_SUBST(JDKEXE_LIBS)
AC_SUBST(LDFLAGS_CXX_JDK)
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
AC_SUBST(LDFLAGS_TESTLIB)
AC_SUBST(LDFLAGS_TESTEXE)
AC_SUBST(LDFLAGS_TESTLIB_SUFFIX)
AC_SUBST(LDFLAGS_TESTEXE_SUFFIX)
])
# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
......
......@@ -688,13 +688,11 @@ DISABLE_WARNING_PREFIX
WARNINGS_AS_ERRORS
COMPILER_SUPPORTS_TARGET_BITS_FLAG
ZERO_ARCHFLAG
LDFLAGS_TESTEXE_SUFFIX
LDFLAGS_TESTLIB_SUFFIX
LDFLAGS_TESTEXE
LDFLAGS_TESTLIB
LDFLAGS_CXX_JDK
LDFLAGS_JDKEXE_SUFFIX
LDFLAGS_JDKLIB_SUFFIX
JDKEXE_LIBS
JDKLIB_LIBS
LDFLAGS_JDKEXE
LDFLAGS_JDKLIB
CXXFLAGS_TESTEXE
......@@ -743,11 +741,11 @@ HOTSPOT_LD
HOTSPOT_CXX
HOTSPOT_RC
HOTSPOT_MT
BUILD_SYSROOT_LDFLAGS
BUILD_SYSROOT_CFLAGS
BUILD_LD
BUILD_CXX
BUILD_CC
BUILD_SYSROOT_LDFLAGS
BUILD_SYSROOT_CFLAGS
ac_ct_OBJDUMP
OBJDUMP
ac_ct_OBJCOPY
......@@ -873,11 +871,11 @@ UNZIP
FIND_DELETE
OUTPUT_SYNC
OUTPUT_SYNC_SUPPORTED
MAKE
CHECK_TOOLSDIR_MAKE
CHECK_TOOLSDIR_GMAKE
CHECK_MAKE
CHECK_GMAKE
MAKE
PKGHANDLER
CONFIGURESUPPORT_OUTPUTDIR
OUTPUT_ROOT
......@@ -1082,6 +1080,7 @@ with_extra_cflags
with_extra_cxxflags
with_extra_ldflags
with_toolchain_version
with_build_devkit
with_jtreg
enable_warnings_as_errors
enable_debug_symbols
......@@ -1173,6 +1172,7 @@ READLINK
DF
CPIO
NICE
MAKE
UNZIP
ZIP
LDD
......@@ -1212,7 +1212,6 @@ OBJCOPY
OBJDUMP
BUILD_CC
BUILD_CXX
BUILD_LD
JTREGEXE
XMKMF
FREETYPE_CFLAGS
......@@ -1945,6 +1944,7 @@ Optional Packages:
the version of the toolchain to look for, use
'--help' to show possible values [platform
dependent]
--with-build-devkit Devkit to use for the build platform toolchain
--with-jtreg Regression Test Harness [probed]
--with-stdc++lib=<static>,<dynamic>,<default>
force linking of the C++ runtime on Linux to either
......@@ -2055,6 +2055,7 @@ Some influential environment variables:
DF Override default value for DF
CPIO Override default value for CPIO
NICE Override default value for NICE
MAKE Override default value for MAKE
UNZIP Override default value for UNZIP
ZIP Override default value for ZIP
LDD Override default value for LDD
......@@ -2095,7 +2096,6 @@ Some influential environment variables:
OBJDUMP Override default value for OBJDUMP
BUILD_CC Override default value for BUILD_CC
BUILD_CXX Override default value for BUILD_CXX
BUILD_LD Override default value for BUILD_LD
JTREGEXE Override default value for JTREGEXE
XMKMF Path to xmkmf, Makefile generator for X Window System
FREETYPE_CFLAGS
......@@ -3435,6 +3435,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# use that value, otherwise search for the tool using the supplied code snippet.
# $1: variable to set
# $2: code snippet to call to look for the tool
# $3: code snippet to call if variable was used to find tool
# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
......@@ -3744,6 +3745,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
# that configure can use them while detecting compilers.
# TOOLCHAIN_TYPE is available here.
# Param 1 - Optional prefix to all variables. (e.g BUILD_)
......@@ -4595,7 +4597,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1445964676
DATE_WHEN_GENERATED=1446135203
###############################################################################
#
......@@ -4838,6 +4840,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -5041,6 +5044,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -5244,6 +5248,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -5447,6 +5452,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -5650,6 +5656,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -5853,6 +5860,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -6056,6 +6064,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -6259,6 +6268,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -6462,6 +6472,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -6665,6 +6676,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -6868,6 +6880,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -7071,6 +7084,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -7274,6 +7288,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -7477,6 +7492,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -7680,6 +7696,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -7883,6 +7900,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -8086,6 +8104,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -8289,6 +8308,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -8492,6 +8512,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -8695,6 +8716,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -8898,6 +8920,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -9101,6 +9124,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -9304,6 +9328,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -9507,6 +9532,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -9710,6 +9736,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -9913,6 +9940,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -10116,6 +10144,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -10319,6 +10348,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -10522,6 +10552,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -10725,6 +10756,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -10928,6 +10960,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -11131,6 +11164,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -11334,6 +11368,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -11537,6 +11572,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -11740,6 +11776,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -11943,6 +11980,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -12146,6 +12184,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -12344,6 +12383,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -12581,6 +12621,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -12826,6 +12867,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -13071,6 +13113,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -13320,6 +13363,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -13530,6 +13574,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -13726,6 +13771,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -13922,6 +13968,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -14118,6 +14165,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -14314,6 +14362,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -16477,353 +16526,13 @@ done
# Setup tools that requires more complex handling, or that is not needed by the configure script.
# We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
if test "x$MAKE" != x; then
# User has supplied a make, test it.
if test ! -f "$MAKE"; then
as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
fi
MAKE_CANDIDATE=""$MAKE""
DESCRIPTION="user supplied MAKE=$MAKE"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
# Publish this variable in the help.
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
if [ -z "${MAKE+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
if test "x$FOUND_MAKE" = x; then
as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
fi
else
# Try our hardest to locate a correct version of GNU make
for ac_prog in gmake
do
......@@ -18371,8 +18080,1998 @@ $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
if test "x$FOUND_MAKE" = x; then
as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
fi
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !MAKE! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xMAKE" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
# Try our hardest to locate a correct version of GNU make
for ac_prog in gmake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_GMAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_GMAKE in
[\\/]* | ?:[\\/]*)
ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
if test -n "$CHECK_GMAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
$as_echo "$CHECK_GMAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CHECK_GMAKE" && break
done
MAKE_CANDIDATE=""$CHECK_GMAKE""
DESCRIPTION="gmake in PATH"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
if test "x$FOUND_MAKE" = x; then
for ac_prog in make
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_MAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_MAKE in
[\\/]* | ?:[\\/]*)
ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
CHECK_MAKE=$ac_cv_path_CHECK_MAKE
if test -n "$CHECK_MAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
$as_echo "$CHECK_MAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CHECK_MAKE" && break
done
MAKE_CANDIDATE=""$CHECK_MAKE""
DESCRIPTION="make in PATH"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
fi
if test "x$FOUND_MAKE" = x; then
if test "x$TOOLCHAIN_PATH" != x; then
# We have a toolchain path, check that as well before giving up.
OLD_PATH=$PATH
PATH=$TOOLCHAIN_PATH:$PATH
for ac_prog in gmake
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_TOOLSDIR_GMAKE in
[\\/]* | ?:[\\/]*)
ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
if test -n "$CHECK_TOOLSDIR_GMAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CHECK_TOOLSDIR_GMAKE" && break
done
MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
DESCRIPTION="gmake in tools-dir"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
if test "x$FOUND_MAKE" = x; then
for ac_prog in make
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $CHECK_TOOLSDIR_MAKE in
[\\/]* | ?:[\\/]*)
ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
if test -n "$CHECK_TOOLSDIR_MAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$CHECK_TOOLSDIR_MAKE" && break
done
MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
DESCRIPTION="make in tools-dir"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
fi
PATH=$OLD_PATH
fi
fi
if test "x$FOUND_MAKE" = x; then
as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
fi
else
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
$as_echo_n "checking for MAKE... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
else
# Check if the provided tool contains a complete path.
tool_specified="$MAKE"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_MAKE+:} false; then :
$as_echo_n "(cached) " >&6
else
case $MAKE in
[\\/]* | ?:[\\/]*)
ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
MAKE=$ac_cv_path_MAKE
if test -n "$MAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
$as_echo "$MAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$MAKE" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
$as_echo_n "checking for MAKE... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
# If MAKE was set by user, verify the version
MAKE_CANDIDATE=""$MAKE""
DESCRIPTION="user supplied MAKE=$MAKE"
# On Cygwin, we require a newer version of make than on other platforms
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_VERSION_EXPR="-e 4\."
MAKE_REQUIRED_VERSION="4.0"
else
MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
MAKE_REQUIRED_VERSION="3.81"
fi
if test "x$MAKE_CANDIDATE" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
if test "x$IS_GNU_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
else
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
if test "x$IS_MODERN_MAKE" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
else
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
else
as_fn_error $? "Unknown Windows environment" "$LINENO" 5
fi
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
else
# Not relevant for non-Windows
IS_MAKE_CORRECT_ENV=true
fi
if test "x$IS_MAKE_CORRECT_ENV" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
else
FOUND_MAKE=$MAKE_CANDIDATE
# Only process if variable expands to non-empty
if test "x$FOUND_MAKE" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
# Output is in $new_path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$FOUND_MAKE"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
fi
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$complete" != "x$new_complete"; then
FOUND_MAKE="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
fi
fi
fi
fi
fi
fi
if test "x$FOUND_MAKE" = x; then
as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
fi
fi
MAKE=$FOUND_MAKE
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
......@@ -18638,6 +20337,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -18841,6 +20541,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -19046,6 +20747,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -19248,6 +20950,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -19447,6 +21150,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -19643,6 +21347,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -19839,6 +21544,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -20035,6 +21741,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -20231,6 +21938,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -20438,6 +22146,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -20641,6 +22350,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -20843,6 +22553,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -21056,6 +22767,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -26572,6 +28284,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -26709,6 +28422,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -26846,6 +28560,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -26983,6 +28698,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -27120,6 +28836,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -33747,6 +35464,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -34388,6 +36106,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -34874,6 +36593,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -36410,6 +38130,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -36892,6 +38613,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -37374,6 +39096,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -37968,6 +39691,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -38560,6 +40284,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -39159,6 +40884,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -39798,6 +41524,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -40111,291 +41838,49 @@ $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
# path, otherwise we might pick up cross-compilers which don't use standard
# naming.
# FIXME: we should list the discovered compilers as an exclude pattern!
# If we do that, we can do this detection before POST_DETECTION, and still
# find the build compilers in the tools dir, if needed.
OLDPATH="$PATH"
# Publish this variable in the help.
if [ -z "${BUILD_CC+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cl cc gcc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
# Check whether --with-build-devkit was given.
if test "${with_build_devkit+set}" = set; then :
withval=$with_build_devkit;
fi
test -n "$BUILD_CC" && break
done
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !BUILD_CC! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xBUILD_CC" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
for ac_prog in cl cc gcc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$BUILD_CC" && break
done
else
# If it succeeded, then it was overridden by the user. We will use it
# for the tool.
# First remove it from the list of overridden variables, so we can test
# for unknown variables in the end.
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$BUILD_CC" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
if test "x$with_build_devkit" = "xyes"; then
as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
elif test -n "$with_build_devkit"; then
if test ! -d "$with_build_devkit"; then
as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
else
# Check if the provided tool contains a complete path.
tool_specified="$BUILD_CC"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$BUILD_CC" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
# Only process if variable expands to non-empty
if test "x$BUILD_CC" != x; then
if test "x$with_build_devkit" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
path="$with_build_devkit"
new_path=`$CYGPATH -u "$path"`
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path=`$CYGPATH -u "$path"`
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in cygwin causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path=`$CYGPATH -u "$path"`
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
fi
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file presence.
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
# Short path failed, file does not exist as specified.
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
input_path="$input_to_shortpath"
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
......@@ -40418,50 +41903,42 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
if test "x$path" != "x$new_path"; then
with_build_devkit="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
fi
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
# Input might be given as Windows format, start by converting to
# unix format.
path="$with_build_devkit"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
# Now try to locate executable using which
new_path=`$WHICH "$new_path" 2> /dev/null`
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
......@@ -40472,149 +41949,160 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
new_path="$unix_path"
fi
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not always considered executable in MSYS causing which
# to not find them
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$path"
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
if test "x$path" != "x$new_path"; then
with_build_devkit="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
fi
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
else
# We're on a unix platform. Hooray! :)
path="$with_build_devkit"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
fi
with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
fi
fi
# Now new_path has a complete unix path to the binary
if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
# Keep paths in /bin as-is, but remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Do not save /bin paths to all_fixpath_prefixes!
else
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $new_path`
BUILD_DEVKIT_ROOT="$with_build_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
# Process devkit.info so that existing devkit variables are not
# modified by this
$SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
-e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
-e "s/\$host/\$build/g" \
$BUILD_DEVKIT_ROOT/devkit.info \
> $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
. $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
# This potentially sets the following:
# A descriptive name of the devkit
input_path="$new_path"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use [ and ] instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
if test "x$BUILD_DEVKIT_NAME" = x; then
eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
fi
# Output is in $new_path
# Corresponds to --with-extra-path
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
new_path="$unix_path"
if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
fi
# remove trailing .exe if any
new_path="${new_path/%.exe/}"
# Corresponds to --with-toolchain-path
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
fi
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Corresponds to --with-sysroot
# Cannot rely on the command "which" here since it doesn't always work.
is_absolute_path=`$ECHO "$path" | $GREP ^/`
if test -z "$is_absolute_path"; then
# Path to executable is not absolute. Find it.
IFS_save="$IFS"
IFS=:
for p in $PATH; do
if test -f "$p/$path" && test -x "$p/$path"; then
new_path="$p/$path"
break
fi
done
IFS="$IFS_save"
else
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
if test "x$BUILD_DEVKIT_SYSROOT" = x; then
eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
# Skip the Window specific parts
fi
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
$as_echo_n "checking for build platform devkit... " >&6; }
if test "x$BUILD_DEVKIT_NAME" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
if test "x$BUILD_SYSROOT" != "x"; then
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Solaris Studio does not have a concept of sysroot. Instead we must
# make sure the default include and lib dirs are appended to each
# compile and link command line.
BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
fi
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
elif test "x$TOOLCHAIN_TYPE" = xclang; then
BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
fi
# Propagate the sysroot args to hotspot
BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
# The global CFLAGS and LDFLAGS variables need these for configure to function
BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
fi
# Now join together the path and the arguments once again
if test "x$arguments" != xEOL; then
new_complete="$new_path ${arguments% *}"
else
new_complete="$new_path"
fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# We also need -iframework<path>/System/Library/Frameworks
BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
# set this here so it doesn't have to be peppered throughout the forest
BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
fi
if test "x$complete" != "x$new_complete"; then
BUILD_CC="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
fi
PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
fi
fi
fi
# FIXME: we should list the discovered compilers as an exclude pattern!
# If we do that, we can do this detection before POST_DETECTION, and still
# find the build compilers in the tools dir, if needed.
# Publish this variable in the help.
if [ -z "${BUILD_CXX+x}" ]; then
if [ -z "${BUILD_CC+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in cl CC g++
for ac_prog in cl cc gcc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CXX+:} false; then :
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CXX in
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -40624,7 +42112,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -40635,44 +42123,44 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$BUILD_CXX" && break
test -n "$BUILD_CC" && break
done
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !BUILD_CXX! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
# Try to remove the string !BUILD_CC! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xBUILD_CXX" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
if test "xBUILD_CC" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
for ac_prog in cl CC g++
for ac_prog in cl cc gcc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CXX+:} false; then :
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CXX in
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -40682,7 +42170,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -40693,17 +42181,17 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$BUILD_CXX" && break
test -n "$BUILD_CC" && break
done
else
......@@ -40715,31 +42203,31 @@ done
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$BUILD_CXX" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
if test "x$BUILD_CC" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
else
# Check if the provided tool contains a complete path.
tool_specified="$BUILD_CXX"
tool_specified="$BUILD_CC"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_CXX+:} false; then :
if ${ac_cv_path_BUILD_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_CXX in
case $BUILD_CC in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -40749,7 +42237,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -40760,47 +42248,54 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
BUILD_CC=$ac_cv_path_BUILD_CC
if test -n "$BUILD_CC"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
$as_echo "$BUILD_CC" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$BUILD_CXX" = x; then
if test "x$BUILD_CC" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
$as_echo_n "checking for BUILD_CC... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
if test "x$BUILD_CC" = x; then
as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
fi
# Only process if variable expands to non-empty
if test "x$BUILD_CXX" != x; then
if test "x$BUILD_CC" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CXX"
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -40836,14 +42331,14 @@ $as_echo "$tool_specified" >&6; }
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
fi
......@@ -40863,11 +42358,11 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
......@@ -40914,7 +42409,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CXX"
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -40976,14 +42471,14 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
fi
......@@ -41029,7 +42524,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_CXX"
complete="$BUILD_CC"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -41053,14 +42548,14 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
fi
fi
......@@ -41072,31 +42567,32 @@ $as_echo "$as_me: This might be caused by spaces in the path, which is not allow
fi
if test "x$complete" != "x$new_complete"; then
BUILD_CXX="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
BUILD_CC="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
fi
fi
# Publish this variable in the help.
if [ -z "${BUILD_LD+x}" ]; then
if [ -z "${BUILD_CXX+x}" ]; then
# The variable is not set by user, try to locate tool using the code snippet
for ac_prog in ld
for ac_prog in cl CC g++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_LD+:} false; then :
if ${ac_cv_path_BUILD_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_LD in
case $BUILD_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -41106,7 +42602,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -41117,44 +42613,44 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$BUILD_LD" && break
test -n "$BUILD_CXX" && break
done
else
# The variable is set, but is it from the command line or the environment?
# Try to remove the string !BUILD_LD! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
# Try to remove the string !BUILD_CXX! from our list.
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
# If it failed, the variable was not from the command line. Ignore it,
# but warn the user (except for BASH, which is always set by the calling BASH).
if test "xBUILD_LD" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
if test "xBUILD_CXX" != xBASH; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
fi
# Try to locate tool using the code snippet
for ac_prog in ld
for ac_prog in cl CC g++
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_LD+:} false; then :
if ${ac_cv_path_BUILD_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_LD in
case $BUILD_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -41164,7 +42660,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -41175,17 +42671,17 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$BUILD_LD" && break
test -n "$BUILD_CXX" && break
done
else
......@@ -41197,31 +42693,31 @@ done
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
# Check if we try to supply an empty value
if test "x$BUILD_LD" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_LD= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool BUILD_LD= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
$as_echo_n "checking for BUILD_LD... " >&6; }
if test "x$BUILD_CXX" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
$as_echo "disabled" >&6; }
else
# Check if the provided tool contains a complete path.
tool_specified="$BUILD_LD"
tool_specified="$BUILD_CXX"
tool_basename="${tool_specified##*/}"
if test "x$tool_basename" = "x$tool_specified"; then
# A command without a complete path is provided, search $PATH.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
# Extract the first word of "$tool_basename", so it can be a program name with args.
set dummy $tool_basename; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_BUILD_LD+:} false; then :
if ${ac_cv_path_BUILD_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
case $BUILD_LD in
case $BUILD_CXX in
[\\/]* | ?:[\\/]*)
ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
......@@ -41231,7 +42727,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
......@@ -41242,47 +42738,54 @@ IFS=$as_save_IFS
;;
esac
fi
BUILD_LD=$ac_cv_path_BUILD_LD
if test -n "$BUILD_LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
$as_echo "$BUILD_LD" >&6; }
BUILD_CXX=$ac_cv_path_BUILD_CXX
if test -n "$BUILD_CXX"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
$as_echo "$BUILD_CXX" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$BUILD_LD" = x; then
if test "x$BUILD_CXX" = x; then
as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
fi
else
# Otherwise we believe it is a complete path. Use it as it is.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
$as_echo_n "checking for BUILD_LD... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
$as_echo_n "checking for BUILD_CXX... " >&6; }
if test ! -x "$tool_specified"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
$as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
if test "x$BUILD_CXX" = x; then
as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
fi
# Only process if variable expands to non-empty
if test "x$BUILD_LD" != x; then
if test "x$BUILD_CXX" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_LD"
complete="$BUILD_CXX"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -41318,14 +42821,14 @@ $as_echo "$tool_specified" >&6; }
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
fi
fi
......@@ -41345,11 +42848,11 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
fi
else
input_to_shortpath="$new_path"
......@@ -41396,7 +42899,7 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_LD"
complete="$BUILD_CXX"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -41458,14 +42961,14 @@ $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found"
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
fi
fi
......@@ -41511,7 +43014,7 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
# space.
complete="$BUILD_LD"
complete="$BUILD_CXX"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
......@@ -41535,14 +43038,14 @@ $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, wh
fi
if test "x$new_path" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
fi
as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
fi
fi
......@@ -41554,14 +43057,15 @@ $as_echo "$as_me: This might be caused by spaces in the path, which is not allow
fi
if test "x$complete" != "x$new_complete"; then
BUILD_LD="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
BUILD_CXX="$new_complete"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
fi
fi
BUILD_SYSROOT_CFLAGS=""
BUILD_SYSROOT_LDFLAGS=""
BUILD_LD="$BUILD_CC"
PATH="$OLDPATH"
else
# If we are not cross compiling, use the normal target compilers for
# building the build platform executables.
......@@ -42220,6 +43724,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -43568,7 +45073,7 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
fi
# Customize LDFLAGS for executables
......@@ -43591,7 +45096,7 @@ $as_echo "$supports" >&6; }
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
LDFLAGS_JDKLIB_SUFFIX=""
JDKLIB_LIBS=""
else
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS} \
-L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
......@@ -43610,9 +45115,11 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
fi
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
JDKLIB_LIBS="-ljava -ljvm"
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
JDKLIB_LIBS="$JDKLIB_LIBS -lc"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
JDKLIB_LIBS="$JDKLIB_LIBS -liconv"
fi
fi
......@@ -43624,10 +45131,6 @@ $as_echo "$supports" >&6; }
LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
......@@ -46894,7 +48397,7 @@ $as_echo "no" >&6; }
if test "x$NEEDS_LIB_X11" = xfalse; then
if test "x${with_x}" != x; then
if (test "x${with_x}" != x && test "x${with_x}" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
fi
......@@ -47790,9 +49293,10 @@ fi
if test "x$NEEDS_LIB_CUPS" = xfalse; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
(test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
fi
CUPS_CFLAGS=
else
......@@ -47922,11 +49426,14 @@ fi
FREETYPE_BUNDLE_LIB_PATH=
if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
fi
if test "x$enable_freetype_bundling" != x; then
if (test "x$with_freetype" != x && test "x$with_freetype" != xno) || \
(test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
(test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
(test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
fi
if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
fi
......@@ -51926,9 +53433,11 @@ fi
if test "x$NEEDS_LIB_ALSA" = xfalse; then
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
(test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
(test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
fi
ALSA_CFLAGS=
ALSA_LIBS=
......@@ -52105,9 +53614,11 @@ fi
if test "x$NEEDS_LIB_FFI" = xfalse; then
if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi is ignored" >&5
$as_echo "$as_me: WARNING: libffi not used, so --with-libffi is ignored" >&2;}
if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
(test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
(test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
fi
LIBFFI_CFLAGS=
LIBFFI_LIBS=
......@@ -53808,6 +55319,7 @@ $as_echo "$tool_specified" >&6; }
fi
fi
fi
fi
......@@ -37,8 +37,10 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
[specify directory for the alsa library])])
if test "x$NEEDS_LIB_ALSA" = xfalse; then
if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
(test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
(test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
AC_MSG_WARN([[alsa not used, so --with-alsa[-*] is ignored]])
fi
ALSA_CFLAGS=
ALSA_LIBS=
......
......@@ -35,8 +35,9 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
[specify directory for the cups include files])])
if test "x$NEEDS_LIB_CUPS" = xfalse; then
if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
AC_MSG_WARN([cups not used, so --with-cups is ignored])
if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
(test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
AC_MSG_WARN([[cups not used, so --with-cups[-*] is ignored]])
fi
CUPS_CFLAGS=
else
......
......@@ -37,8 +37,10 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
[specify directory for the libffi library])])
if test "x$NEEDS_LIB_FFI" = xfalse; then
if test "x${with_libffi}" != x || test "x${with_libffi_include}" != x || test "x${with_libffi_lib}" != x; then
AC_MSG_WARN([libffi not used, so --with-libffi is ignored])
if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
(test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
(test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
AC_MSG_WARN([[libffi not used, so --with-libffi[-*] is ignored]])
fi
LIBFFI_CFLAGS=
LIBFFI_LIBS=
......
......@@ -202,10 +202,13 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
FREETYPE_BUNDLE_LIB_PATH=
if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
if (test "x$with_freetype" != x && test "x$with_freetype" != xno) || \
(test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
(test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
(test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
AC_MSG_WARN([[freetype not used, so --with-freetype[-*] is ignored]])
fi
if test "x$enable_freetype_bundling" != x; then
if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored])
fi
else
......
......@@ -29,7 +29,7 @@
AC_DEFUN_ONCE([LIB_SETUP_X11],
[
if test "x$NEEDS_LIB_X11" = xfalse; then
if test "x${with_x}" != x; then
if (test "x${with_x}" != x && test "x${with_x}" != xno); then
AC_MSG_WARN([X11 is not used, so --with-x is ignored])
fi
X_CFLAGS=
......
......@@ -340,11 +340,11 @@ USING_BROKEN_SUSE_LD:=@USING_BROKEN_SUSE_LD@
# LDFLAGS used to link the jdk native libraries (C-code)
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
LDFLAGS_JDKLIB_SUFFIX:=@LDFLAGS_JDKLIB_SUFFIX@
JDKLIB_LIBS:=@JDKLIB_LIBS@
# LDFLAGS used to link the jdk native launchers (C-code)
LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@
LDFLAGS_JDKEXE_SUFFIX:=@LDFLAGS_JDKEXE_SUFFIX@
JDKEXE_LIBS:=@JDKEXE_LIBS@
# LDFLAGS specific to C++ linking.
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
......@@ -360,9 +360,7 @@ CXXFLAGS_TESTLIB:=@CXXFLAGS_TESTLIB@
CFLAGS_TESTEXE:=@CFLAGS_TESTEXE@
CXXFLAGS_TESTEXE:=@CXXFLAGS_TESTEXE@
LDFLAGS_TESTLIB:=@LDFLAGS_TESTLIB@
LDFLAGS_TESTLIB_SUFFIX:=@LDFLAGS_TESTLIB_SUFFIX@
LDFLAGS_TESTEXE:=@LDFLAGS_TESTEXE@
LDFLAGS_TESTEXE_SUFFIX:=@LDFLAGS_TESTEXE_SUFFIX@
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
......
......@@ -647,17 +647,68 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
# path, otherwise we might pick up cross-compilers which don't use standard
# naming.
OLDPATH="$PATH"
AC_ARG_WITH(build-devkit, [AS_HELP_STRING([--with-build-devkit],
[Devkit to use for the build platform toolchain])])
if test "x$with_build_devkit" = "xyes"; then
AC_MSG_ERROR([--with-build-devkit must have a value])
elif test -n "$with_build_devkit"; then
if test ! -d "$with_build_devkit"; then
AC_MSG_ERROR([--with-build-devkit points to non existing dir: $with_build_devkit])
else
BASIC_FIXUP_PATH([with_build_devkit])
BUILD_DEVKIT_ROOT="$with_build_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
# Process devkit.info so that existing devkit variables are not
# modified by this
$SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
-e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
-e "s/\$host/\$build/g" \
$BUILD_DEVKIT_ROOT/devkit.info \
> $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
. $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
# This potentially sets the following:
# A descriptive name of the devkit
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_NAME])
# Corresponds to --with-extra-path
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_EXTRA_PATH])
# Corresponds to --with-toolchain-path
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_TOOLCHAIN_PATH])
# Corresponds to --with-sysroot
BASIC_EVAL_DEVKIT_VARIABLE([BUILD_DEVKIT_SYSROOT])
# Skip the Window specific parts
fi
AC_MSG_CHECKING([for build platform devkit])
if test "x$BUILD_DEVKIT_NAME" != x; then
AC_MSG_RESULT([$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT])
else
AC_MSG_RESULT([$BUILD_DEVKIT_ROOT])
fi
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
FLAGS_SETUP_SYSROOT_FLAGS([BUILD_])
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
fi
PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
fi
fi
# FIXME: we should list the discovered compilers as an exclude pattern!
# If we do that, we can do this detection before POST_DETECTION, and still
# find the build compilers in the tools dir, if needed.
BASIC_PATH_PROGS(BUILD_CC, [cl cc gcc])
BASIC_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
BASIC_PATH_PROGS(BUILD_CXX, [cl CC g++])
BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
BASIC_PATH_PROGS(BUILD_LD, ld)
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
BUILD_SYSROOT_CFLAGS=""
BUILD_SYSROOT_LDFLAGS=""
BUILD_LD="$BUILD_CC"
PATH="$OLDPATH"
else
# If we are not cross compiling, use the normal target compilers for
# building the build platform executables.
......
......@@ -321,7 +321,7 @@ _sequence-do = \
################################################################################
MAX_PARAMS := 30
MAX_PARAMS := 35
PARAM_SEQUENCE := $(call sequence, 2, $(MAX_PARAMS))
# Template for creating a macro taking named parameters. To use it, assign the
......
......@@ -250,8 +250,7 @@ endef
# CFLAGS the compiler flags to be used, used both for C and C++.
# CXXFLAGS the compiler flags to be used for c++, if set overrides CFLAGS.
# LDFLAGS the linker flags to be used, used both for C and C++.
# LDFLAGS_SUFFIX the linker flags to be added last on the commandline
# typically the libraries linked to.
# LIBS the libraries to link to
# ARFLAGS the archiver flags to be used
# OBJECT_DIR the directory where we store the object files
# LIBRARY the resulting library file
......@@ -610,9 +609,9 @@ define SetupNativeCompilationBody
endif
# Pickup extra OPENJDK_TARGET_OS_TYPE and/or OPENJDK_TARGET_OS dependent variables
# for LDFLAGS and LDFLAGS_SUFFIX
# for LDFLAGS and LIBS
$1_EXTRA_LDFLAGS:=$$($1_LDFLAGS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_$(OPENJDK_TARGET_OS))
$1_EXTRA_LDFLAGS_SUFFIX:=$$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LDFLAGS_SUFFIX_$(OPENJDK_TARGET_OS))
$1_EXTRA_LIBS:=$$($1_LIBS_$(OPENJDK_TARGET_OS_TYPE)) $$($1_LIBS_$(OPENJDK_TARGET_OS))
ifneq (,$$($1_REAL_MAPFILE))
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
......@@ -689,10 +688,10 @@ define SetupNativeCompilationBody
$1_EXTRA_LDFLAGS += "-implib:$$($1_OBJECT_DIR)/$$($1_LIBRARY).lib"
endif
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
$1_EXTRA_LIBS += $(GLOBAL_LIBS)
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_CREATE_DEBUGINFO_CMDS) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_CREATE_DEBUGINFO_CMDS) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
......@@ -704,7 +703,7 @@ define SetupNativeCompilationBody
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(LD_OUT_OPTION)$$@ \
$$($1_EXPECTED_OBJS) $$($1_RES) \
$$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX)) ; \
$$($1_LIBS) $$($1_EXTRA_LIBS)) ; \
$$($1_CREATE_DEBUGINFO_CMDS)
$$($1_STRIP_CMD)
# Touch target to make sure it has a later time stamp than the debug
......@@ -716,8 +715,8 @@ define SetupNativeCompilationBody
endif
ifneq (,$$($1_STATIC_LIBRARY))
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LDFLAGS_SUFFIX) \
$$($1_EXTRA_LDFLAGS_SUFFIX)
$1_VARDEPS := $$($1_AR) $$($1_ARFLAGS) $$($1_LIBS) \
$$($1_EXTRA_LIBS)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
$$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps)
......@@ -726,15 +725,15 @@ define SetupNativeCompilationBody
$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
$$($1_RES) $$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX))
$$($1_RES) $$($1_LIBS) $$($1_EXTRA_LIBS))
endif
ifneq (,$$($1_PROGRAM))
# A executable binary has been specified, setup the target for it.
$1_EXTRA_LDFLAGS_SUFFIX += $(GLOBAL_LDFLAGS_SUFFIX)
$1_EXTRA_LIBS += $(GLOBAL_LIBS)
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \
$$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX) $$($1_MT) \
$$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \
$$($1_CODESIGN) $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \
$$($1_STRIP_CMD)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \
......@@ -747,7 +746,7 @@ define SetupNativeCompilationBody
$$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \
$(EXE_OUT_OPTION)$$($1_TARGET) \
$$($1_EXPECTED_OBJS) $$($1_RES) \
$$($1_LDFLAGS_SUFFIX) $$($1_EXTRA_LDFLAGS_SUFFIX))
$$($1_LIBS) $$($1_EXTRA_LIBS))
ifeq ($(OPENJDK_TARGET_OS), windows)
ifneq ($$($1_MANIFEST), )
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_PROGRAM).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
......
......@@ -93,6 +93,7 @@ jprt.build.configure.args= \
--with-output-sync=recurse \
--with-boot-jdk=$ALT_BOOTDIR \
--with-jobs=$ALT_PARALLEL_COMPILE_JOBS \
MAKE=$JPRT_MAKE \
${my.additional.build.configure.args.${jprt.test.set}} \
${my.custom.build.configure.args}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册