< prev index next >

common/autoconf/generated-configure.sh

Print this page




 644 LIBCXX
 645 LLVM_LIBS
 646 LLVM_LDFLAGS
 647 LLVM_CFLAGS
 648 LLVM_CONFIG
 649 LIBFFI_LIBS
 650 LIBFFI_CFLAGS
 651 STATIC_CXX_SETTING
 652 LIBDL
 653 LIBM
 654 LIBZIP_CAN_USE_MMAP
 655 USE_EXTERNAL_LIBZ
 656 USE_EXTERNAL_LIBGIF
 657 USE_EXTERNAL_LIBJPEG
 658 ALSA_LIBS
 659 ALSA_CFLAGS
 660 FREETYPE_BUNDLE_LIB_PATH
 661 FREETYPE_LIBS
 662 FREETYPE_CFLAGS
 663 CUPS_CFLAGS
 664 OPENWIN_HOME
 665 X_EXTRA_LIBS
 666 X_LIBS
 667 X_PRE_LIBS
 668 X_CFLAGS
 669 XMKMF
 670 FIXPATH
 671 ZIP_DEBUGINFO_FILES
 672 ENABLE_DEBUG_SYMBOLS
 673 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 674 ZERO_ARCHFLAG
 675 LDFLAGS_CXX_JDK
 676 LDFLAGS_JDKEXE_SUFFIX
 677 LDFLAGS_JDKLIB_SUFFIX
 678 LDFLAGS_JDKEXE
 679 LDFLAGS_JDKLIB
 680 CXXFLAGS_JDKEXE
 681 CXXFLAGS_JDKLIB
 682 CFLAGS_JDKEXE
 683 CFLAGS_JDKLIB
 684 MACOSX_VERSION_MIN


 690 CXXSTD_CXXFLAG
 691 CXX_O_FLAG_NONE
 692 CXX_O_FLAG_NORM
 693 CXX_O_FLAG_HI
 694 CXX_O_FLAG_HIGHEST
 695 C_O_FLAG_NONE
 696 C_O_FLAG_NORM
 697 C_O_FLAG_HI
 698 C_O_FLAG_HIGHEST
 699 CXXFLAGS_DEBUG_SYMBOLS
 700 CFLAGS_DEBUG_SYMBOLS
 701 CXX_FLAG_DEPS
 702 C_FLAG_DEPS
 703 SET_SHARED_LIBRARY_MAPFILE
 704 SET_SHARED_LIBRARY_NAME
 705 SET_SHARED_LIBRARY_ORIGIN
 706 SET_EXECUTABLE_ORIGIN
 707 SHARED_LIBRARY_FLAGS
 708 CXX_FLAG_REORDER
 709 C_FLAG_REORDER


 710 RC_FLAGS
 711 AR_OUT_OPTION
 712 LD_OUT_OPTION
 713 EXE_OUT_OPTION
 714 CC_OUT_OPTION
 715 POST_MCS_CMD
 716 POST_STRIP_CMD
 717 ARFLAGS
 718 COMPILER_TARGET_BITS_FLAG
 719 JT_HOME
 720 JTREGEXE
 721 USING_BROKEN_SUSE_LD
 722 PACKAGE_PATH
 723 LDEXECXX
 724 LDEXE
 725 USE_CLANG
 726 HOTSPOT_LD
 727 HOTSPOT_CXX
 728 HOTSPOT_RC
 729 HOTSPOT_MT


 745 RC
 746 MT
 747 LIPO
 748 ac_ct_OBJC
 749 OBJCFLAGS
 750 OBJC
 751 ac_ct_AR
 752 AR
 753 AS
 754 LDCXX
 755 LD
 756 CXXCPP
 757 CPP
 758 CXX_VERSION_NUMBER
 759 CC_VERSION_NUMBER
 760 ac_ct_CXX
 761 CXXFLAGS
 762 CXX
 763 ac_ct_PROPER_COMPILER_CXX
 764 PROPER_COMPILER_CXX
 765 TOOLS_DIR_CXX
 766 POTENTIAL_CXX
 767 OBJEXT
 768 EXEEXT
 769 ac_ct_CC
 770 CPPFLAGS
 771 LDFLAGS
 772 CFLAGS
 773 CC
 774 ac_ct_PROPER_COMPILER_CC
 775 PROPER_COMPILER_CC
 776 TOOLS_DIR_CC
 777 POTENTIAL_CC
 778 SDKPATH
 779 XCODEBUILD
 780 SET_DEVELOPER_DIR
 781 VS_LIB
 782 VS_INCLUDE
 783 VS_PATH
 784 CYGWIN_LINK
 785 EXE_SUFFIX
 786 OBJ_SUFFIX
 787 STATIC_LIBRARY
 788 SHARED_LIBRARY
 789 STATIC_LIBRARY_SUFFIX
 790 SHARED_LIBRARY_SUFFIX
 791 LIBRARY_PREFIX
 792 TOOLCHAIN_TYPE
 793 BUILD_HOTSPOT
 794 HOTSPOT_DIST
 795 BUILD_OUTPUT
 796 OVERRIDE_SRC_ROOT


 869 DEBUG_CLASSFILES
 870 FASTDEBUG
 871 VARIANT
 872 DEBUG_LEVEL
 873 MACOSX_UNIVERSAL
 874 INCLUDE_SA
 875 JVM_VARIANT_CORE
 876 JVM_VARIANT_ZEROSHARK
 877 JVM_VARIANT_ZERO
 878 JVM_VARIANT_KERNEL
 879 JVM_VARIANT_MINIMAL1
 880 JVM_VARIANT_CLIENT
 881 JVM_VARIANT_SERVER
 882 JVM_VARIANTS
 883 JVM_INTERPRETER
 884 JDK_VARIANT
 885 SET_OPENJDK
 886 BUILD_LOG_WRAPPER
 887 BUILD_LOG_PREVIOUS
 888 BUILD_LOG
 889 SYS_ROOT
 890 TOPDIR
 891 PATH_SEP
 892 ZERO_ARCHDEF
 893 DEFINE_CROSS_COMPILE_ARCH
 894 LP64
 895 OPENJDK_TARGET_OS_EXPORT_DIR
 896 OPENJDK_TARGET_OS_API_DIR
 897 OPENJDK_TARGET_CPU_JLI_CFLAGS
 898 OPENJDK_TARGET_CPU_OSARCH
 899 OPENJDK_TARGET_CPU_ISADIR
 900 OPENJDK_TARGET_CPU_LIBDIR
 901 OPENJDK_TARGET_CPU_LEGACY_LIB
 902 OPENJDK_TARGET_CPU_LEGACY
 903 REQUIRED_OS_VERSION
 904 REQUIRED_OS_NAME
 905 COMPILE_TYPE
 906 OPENJDK_TARGET_CPU_ENDIAN
 907 OPENJDK_TARGET_CPU_BITS
 908 OPENJDK_TARGET_CPU_ARCH
 909 OPENJDK_TARGET_CPU


1004 datarootdir
1005 libexecdir
1006 sbindir
1007 bindir
1008 program_transform_name
1009 prefix
1010 exec_prefix
1011 PACKAGE_URL
1012 PACKAGE_BUGREPORT
1013 PACKAGE_STRING
1014 PACKAGE_VERSION
1015 PACKAGE_TARNAME
1016 PACKAGE_NAME
1017 PATH_SEPARATOR
1018 SHELL'
1019 ac_subst_files=''
1020 ac_user_opts='
1021 enable_option_checking
1022 with_custom_make_dir
1023 with_target_bits
1024 with_sys_root
1025 with_tools_dir
1026 with_xcode_path
1027 with_devkit
1028 enable_openjdk_only
1029 with_jdk_variant
1030 with_jvm_interpreter
1031 with_jvm_variants
1032 enable_debug
1033 with_debug_level







1034 with_conf_name
1035 with_builddeps_conf
1036 with_builddeps_server
1037 with_builddeps_dir
1038 with_builddeps_group
1039 enable_headful
1040 enable_hotspot_test_in_build
1041 with_cacerts_file
1042 enable_unlimited_crypto
1043 with_milestone
1044 with_update_version
1045 with_user_release_suffix
1046 with_build_number
1047 with_copyright_year
1048 with_boot_jdk
1049 with_boot_jdk_jvmargs
1050 with_add_source_root
1051 with_override_source_root
1052 with_adds_and_overrides
1053 with_override_langtools


1820                           Deprecated. Option is kept for backwards
1821                           compatibility and is ignored
1822   --disable-freetype-bundling
1823                           disable bundling of the freetype library with the
1824                           build result [enabled on Windows or when using
1825                           --with-freetype, disabled otherwise]
1826   --enable-sjavac         use sjavac to do fast incremental compiles
1827                           [disabled]
1828   --disable-precompiled-headers
1829                           disable using precompiled headers when compiling C++
1830                           [enabled]
1831   --enable-ccache         enable using ccache to speed up recompilations
1832                           [disabled]
1833 
1834 Optional Packages:
1835   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1836   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1837   --with-custom-make-dir  use this directory for custom build/make files
1838   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1839                           support it), e.g. --with-target-bits=32 [guessed]
1840   --with-sys-root         pass this sys-root to the compilers and tools (for
1841                           cross-compiling)
1842   --with-tools-dir        search this directory for compilers and tools (for
1843                           cross-compiling)
1844   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1845                           10.9 and later)
1846   --with-devkit           use this directory as base for tools-dir and
1847                           sys-root (for cross-compiling)
1848   --with-jdk-variant      JDK variant to build (normal) [normal]
1849   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1850   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1851                           client, minimal1, kernel, zero, zeroshark, core)
1852                           [server]
1853   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1854                           [release]










1855   --with-conf-name        use this as the name of the configuration [generated
1856                           from important configuration options]
1857   --with-builddeps-conf   use this configuration file for the builddeps
1858   --with-builddeps-server download and use build dependencies from this server
1859                           url
1860   --with-builddeps-dir    store downloaded build dependencies here
1861                           [/localhome/builddeps]
1862   --with-builddeps-group  chgrp the downloaded build dependencies to this
1863                           group
1864   --with-cacerts-file     specify alternative cacerts file
1865   --with-milestone        Set milestone value for build [internal]
1866   --with-update-version   Set update version value for build [b00]
1867   --with-user-release-suffix
1868                           Add a custom string to the version string if build
1869                           number isn't set.[username_builddateb00]
1870   --with-build-number     Set build number value for build [b00]
1871   --with-copyright-year   Set copyright year value for build [current year]
1872   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1873   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1874                           invocations of the Boot JDK, overriding the default


3286 # version 2 for more details (a copy is included in the LICENSE file that
3287 # accompanied this code).
3288 #
3289 # You should have received a copy of the GNU General Public License version
3290 # 2 along with this work; if not, write to the Free Software Foundation,
3291 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3292 #
3293 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3294 # or visit www.oracle.com if you need additional information or have any
3295 # questions.
3296 #
3297 
3298 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3299 # If so, then append $1 to $2 \
3300 # Also set JVM_ARG_OK to true/false depending on outcome.
3301 
3302 
3303 # Appends a string to a path variable, only adding the : when needed.
3304 
3305 



3306 # This will make sure the given variable points to a full and proper
3307 # path. This means:
3308 # 1) There will be no spaces in the path. On posix platforms,
3309 #    spaces in the path will result in an error. On Windows,
3310 #    the path will be rewritten using short-style to be space-free.
3311 # 2) The path will be absolute, and it will be in unix-style (on
3312 #     cygwin).
3313 # $1: The name of the variable to fix
3314 
3315 
3316 # This will make sure the given variable points to a executable
3317 # with a full and proper path. This means:
3318 # 1) There will be no spaces in the path. On posix platforms,
3319 #    spaces in the path will result in an error. On Windows,
3320 #    the path will be rewritten using short-style to be space-free.
3321 # 2) The path will be absolute, and it will be in unix-style (on
3322 #     cygwin).
3323 # Any arguments given to the executable is preserved.
3324 # If the input variable does not have a directory specification, then
3325 # it need to be in the PATH.


3368 # $2: executable name (or list of names) to look for
3369 
3370 
3371 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3372 # $1: variable to set
3373 # $2: autoconf macro to call to look for the special tool
3374 
3375 
3376 # Setup the most fundamental tools that relies on not much else to set up,
3377 # but is used by much of the early bootstrap code.
3378 
3379 
3380 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3381 
3382 
3383 
3384 
3385 
3386 
3387 


3388 #%%% Simple tools %%%
3389 
3390 # Check if we have found a usable version of make
3391 # $1: the path to a potential make binary (or empty)
3392 # $2: the description on how we found this
3393 
3394 
3395 # Goes looking for a usable version of GNU make.
3396 
3397 
3398 
3399 
3400 
3401 
3402 # Check if build directory is on local disk. If not possible to determine,
3403 # we prefer to claim it's local.
3404 # Argument 1: directory to test
3405 # Argument 2: what to do if it is on local disk
3406 # Argument 3: what to do otherwise (remote disk or failure)
3407 


4208 # Check if the VS env variables were setup prior to running configure.
4209 # If not, then find vcvarsall.bat and run it automatically, and integrate
4210 # the set env variables into the spec file.
4211 
4212 
4213 
4214 
4215 
4216 
4217 
4218 
4219 
4220 
4221 
4222 # This line needs to be here, verbatim, after all includes and the dummy hook
4223 # definitions. It is replaced with custom functionality when building
4224 # custom sources.
4225 #CUSTOM_AUTOCONF_INCLUDE
4226 
4227 # Do not change or remove the following line, it is needed for consistency checks:
4228 DATE_WHEN_GENERATED=1523526861
4229 
4230 ###############################################################################
4231 #
4232 # Initialization / Boot-strapping
4233 #
4234 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4235 # thus it jumps back and forth, each time gaining something needed later on.
4236 #
4237 ###############################################################################
4238 
4239 # If we are requested to print additional help, do that and then exit.
4240 # This must be the very first call.
4241 
4242   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4243     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4244     $PRINTF "Which are valid to use depends on the build platform.\n"
4245     for toolchain in $VALID_TOOLCHAINS_all; do
4246       # Use indirect variable referencing
4247       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4248       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}


14240       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14241 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14242       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14243     fi
14244 
14245     # Use eval to expand a potential ~
14246     eval path="$path"
14247     if test ! -f "$path" && test ! -d "$path"; then
14248       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14249     fi
14250 
14251     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14252   fi
14253 
14254   # SRC_ROOT is a traditional alias for TOPDIR.
14255   SRC_ROOT=$TOPDIR
14256 
14257   # Locate the directory of this script.
14258   AUTOCONF_DIR=$TOPDIR/common/autoconf
14259 
14260   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14261     # Add extra search paths on solaris for utilities like ar and as etc...
14262     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14263   fi
14264 
14265   # You can force the sys-root if the sys-root encoded into the cross compiler tools
14266   # is not correct.
14267 
14268 # Check whether --with-sys-root was given.
14269 if test "${with_sys_root+set}" = set; then :
14270   withval=$with_sys_root;
14271 fi
14272 
14273 
14274   if test "x$with_sys_root" != x; then
14275     SYS_ROOT=$with_sys_root
14276   else
14277     SYS_ROOT=/
14278   fi
14279 
14280 
14281 
14282 # Check whether --with-tools-dir was given.
14283 if test "${with_tools_dir+set}" = set; then :
14284   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14285 
14286 fi
14287 
14288 
14289   # Xcode version will be validated later
14290 
14291 # Check whether --with-xcode-path was given.
14292 if test "${with_xcode_path+set}" = set; then :
14293   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
14294 
14295 fi
14296 
14297 
14298 
14299 # Check whether --with-devkit was given.
14300 if test "${with_devkit+set}" = set; then :
14301   withval=$with_devkit;
14302         if test "x$with_sys_root" != x; then
14303           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14304         fi
14305 
14306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14307 
14308   # Input might be given as Windows format, start by converting to
14309   # unix format.
14310   path="$with_devkit"
14311   new_path=`$CYGPATH -u "$path"`
14312 
14313   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14314   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14315   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14316   # "foo.exe" is OK but "foo" is an error.
14317   #
14318   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14319   # It is also a way to make sure we got the proper file name for the real test later on.
14320   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14321   if test "x$test_shortpath" = x; then
14322     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14323 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14324     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14325   fi
14326 
14327   # Call helper function which possibly converts this using DOS-style short mode.
14328   # If so, the updated path is stored in $new_path.
14329 
14330   input_path="$new_path"
14331   # Check if we need to convert this using DOS-style short mode. If the path
14332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14333   # take no chances and rewrite it.
14334   # Note: m4 eats our [], so we need to use [ and ] instead.
14335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14336   if test "x$has_forbidden_chars" != x; then
14337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14338     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14339     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14340     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14341       # Going to short mode and back again did indeed matter. Since short mode is
14342       # case insensitive, let's make it lowercase to improve readability.
14343       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14344       # Now convert it back to Unix-stile (cygpath)
14345       input_path=`$CYGPATH -u "$shortmode_path"`
14346       new_path="$input_path"
14347     fi
14348   fi
14349 
14350   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14351   if test "x$test_cygdrive_prefix" = x; then
14352     # As a simple fix, exclude /usr/bin since it's not a real path.
14353     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14354       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14355       # a path prefixed by /cygdrive for fixpath to work.
14356       new_path="$CYGWIN_ROOT_PATH$input_path"
14357     fi
14358   fi
14359 
14360 
14361   if test "x$path" != "x$new_path"; then
14362     with_devkit="$new_path"
14363     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14364 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14365   fi
14366 
14367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14368 
14369   path="$with_devkit"
14370   has_colon=`$ECHO $path | $GREP ^.:`
14371   new_path="$path"
14372   if test "x$has_colon" = x; then
14373     # Not in mixed or Windows style, start by that.
14374     new_path=`cmd //c echo $path`
14375   fi
14376 
14377 
14378   input_path="$new_path"
14379   # Check if we need to convert this using DOS-style short mode. If the path
14380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14381   # take no chances and rewrite it.
14382   # Note: m4 eats our [], so we need to use [ and ] instead.
14383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14384   if test "x$has_forbidden_chars" != x; then
14385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14386     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14387   fi
14388 
14389 
14390   windows_path="$new_path"
14391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14392     unix_path=`$CYGPATH -u "$windows_path"`
14393     new_path="$unix_path"
14394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14396     new_path="$unix_path"
14397   fi
14398 
14399   if test "x$path" != "x$new_path"; then
14400     with_devkit="$new_path"
14401     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14402 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14403   fi
14404 
14405   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14406   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14407 
14408   else
14409     # We're on a posix platform. Hooray! :)
14410     path="$with_devkit"
14411     has_space=`$ECHO "$path" | $GREP " "`
14412     if test "x$has_space" != x; then
14413       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14414 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14415       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14416     fi
14417 
14418     # Use eval to expand a potential ~
14419     eval path="$path"
14420     if test ! -f "$path" && test ! -d "$path"; then
14421       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14422     fi
14423 
14424     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14425   fi
14426 
14427 
14428   if test "x$TOOLS_DIR" = x; then
14429     TOOLS_DIR="$with_devkit/bin"
14430   else
14431     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14432   fi
14433 
14434         if test -d "$with_devkit/$host_alias/libc"; then
14435           SYS_ROOT=$with_devkit/$host_alias/libc
14436         elif test -d "$with_devkit/$host/sys-root"; then
14437           SYS_ROOT=$with_devkit/$host/sys-root
14438         fi
14439 
14440 fi
14441 
14442 
14443 
14444   # Setup default logging of stdout and stderr to build.log in the output root.
14445   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14446   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14447   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14448 
14449 
14450 
14451 
14452 
14453 # Check if it's a pure open build or if custom sources are to be used.
14454 
14455   # Check whether --enable-openjdk-only was given.
14456 if test "${enable_openjdk_only+set}" = set; then :
14457   enableval=$enable_openjdk_only;
14458 else
14459   enable_openjdk_only="no"
14460 fi
14461 
14462 


14776   # On Macosx universal binaries are produced, but they only contain
14777   # 64 bit intel. This invalidates control of which jvms are built
14778   # from configure, but only server is valid anyway. Fix this
14779   # when hotspot makefiles are rewritten.
14780   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14781     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14782   fi
14783 
14784   #####
14785 
14786 
14787 
14788 
14789 
14790 
14791 
14792 
14793 # With basic setup done, call the custom early hook.
14794 
14795 






































































































































































































































































































14796 # To properly create a configuration name, we need to have the OpenJDK target
14797 # and options (variants and debug level) parsed.
14798 
14799 
14800 
14801 # Check whether --with-conf-name was given.
14802 if test "${with_conf_name+set}" = set; then :
14803   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14804 fi
14805 
14806 
14807   # Test from where we are running configure, in or outside of src root.
14808   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14809 $as_echo_n "checking where to store configuration... " >&6; }
14810   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14811       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14812       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14813     # We are running configure from the src root.
14814     # Create a default ./build/target-variant-debuglevel output root.
14815     if test "x${CONF_NAME}" = x; then


16083   if test "x$arguments" != xEOL; then
16084     new_complete="$new_path ${arguments% *}"
16085   else
16086     new_complete="$new_path"
16087   fi
16088 
16089   if test "x$complete" != "x$new_complete"; then
16090     FOUND_MAKE="$new_complete"
16091     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16092 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16093   fi
16094 
16095         fi
16096       fi
16097     fi
16098   fi
16099 
16100     fi
16101 
16102     if test "x$FOUND_MAKE" = x; then
16103       if test "x$TOOLS_DIR" != x; then
16104         # We have a tools-dir, check that as well before giving up.
16105         OLD_PATH=$PATH
16106         PATH=$TOOLS_DIR:$PATH
16107         for ac_prog in gmake
16108 do
16109   # Extract the first word of "$ac_prog", so it can be a program name with args.
16110 set dummy $ac_prog; ac_word=$2
16111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16112 $as_echo_n "checking for $ac_word... " >&6; }
16113 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16114   $as_echo_n "(cached) " >&6
16115 else
16116   case $CHECK_TOOLSDIR_GMAKE in
16117   [\\/]* | ?:[\\/]*)
16118   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16119   ;;
16120   *)
16121   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16122 for as_dir in $PATH
16123 do
16124   IFS=$as_save_IFS
16125   test -z "$as_dir" && as_dir=.
16126     for ac_exec_ext in '' $ac_executable_extensions; do


25906       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
25907       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
25908       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
25909     fi
25910 
25911     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
25912     # setting this here means it doesn't have to be peppered throughout the forest
25913     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
25914     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
25915     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
25916   fi
25917 
25918   # For solaris we really need solaris tools, and not the GNU equivalent.
25919   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
25920   # so add that to path before starting to probe.
25921   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
25922   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25923     PATH="/usr/ccs/bin:$PATH"
25924   fi
25925 
25926   # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
25927   # override all other locations.
25928   if test "x$TOOLS_DIR" != x; then
25929     PATH=$TOOLS_DIR:$PATH
25930   fi
25931 
25932   # If a devkit is found on the builddeps server, then prepend its path to the
25933   # PATH variable. If there are cross compilers available in the devkit, these
25934   # will be found by AC_PROG_CC et al.
25935   DEVKIT=
25936 
25937 
25938   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
25939     # Source the builddeps file again, to make sure it uses the latest variables!
25940     . $builddepsfile
25941     # Look for a target and build machine specific resource!
25942     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
25943     if test "x$resource" = x; then
25944       # Ok, lets instead look for a target specific resource
25945       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
25946     fi
25947     if test "x$resource" = x; then
25948       # Ok, lets instead look for a build specific resource
25949       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
25950     fi
25951     if test "x$resource" = x; then
25952       # Ok, lets instead look for a generic resource
25953       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
25954       resource=${builddep_devkit}
25955     fi
25956     if test "x$resource" != x; then
25957       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
25958 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
25959       # If the resource in the builddeps.conf file is an existing directory,
25960       # for example /java/linux/cups
25961       if test -d ${resource}; then
25962         depdir=${resource}
25963       else
25964 
25965   # devkit is for example mymodule
25966   # $resource is for example libs/general/libmymod_1_2_3.zip
25967   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
25968   # $with_builddeps_dir is for example /localhome/builddeps
25969   # depdir is the name of the variable into which we store the depdir, eg MYMOD
25970   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
25971   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
25972   filename=`basename $resource`
25973   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
25974   filebase=${filename%%.*}
25975   extension=${filename#*.}
25976   installdir=$with_builddeps_dir/$filebase
25977   if test ! -f $installdir/$filename.unpacked; then
25978     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
25979 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
25980     if test ! -d $installdir; then
25981       mkdir -p $installdir
25982     fi
25983     if test ! -d $installdir; then
25984       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
25985     fi
25986     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
25987     touch $tmpfile
25988     if test ! -f $tmpfile; then
25989       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
25990     fi
25991 
25992   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
25993   # $tmpfile is the local file name for the downloaded file.
25994   VALID_TOOL=no
25995   if test "x$BDEPS_FTP" = xwget; then
25996     VALID_TOOL=yes
25997     wget -O $tmpfile $with_builddeps_server/$resource
25998   fi
25999   if test "x$BDEPS_FTP" = xlftp; then
26000     VALID_TOOL=yes
26001     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
26002   fi
26003   if test "x$BDEPS_FTP" = xftp; then
26004     VALID_TOOL=yes
26005     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
26006     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
26007     FTPUSERPWD=${FTPSERVER%%@*}
26008     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
26009       FTPUSER=${userpwd%%:*}
26010       FTPPWD=${userpwd#*@}
26011       FTPSERVER=${FTPSERVER#*@}
26012     else
26013       FTPUSER=ftp
26014       FTPPWD=ftp
26015     fi
26016     # the "pass" command does not work on some
26017     # ftp clients (read ftp.exe) but if it works,
26018     # passive mode is better!
26019     ( \
26020         echo "user $FTPUSER $FTPPWD"        ; \
26021         echo "pass"                         ; \
26022         echo "bin"                          ; \
26023         echo "get $FTPPATH $tmpfile"              ; \
26024     ) | ftp -in $FTPSERVER
26025   fi
26026   if test "x$VALID_TOOL" != xyes; then
26027     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
26028   fi
26029 
26030     mv $tmpfile $installdir/$filename
26031     if test ! -s $installdir/$filename; then
26032       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
26033     fi
26034     case "$extension" in
26035       zip)  echo "Unzipping $installdir/$filename..."
26036         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
26037         ;;
26038       tar.gz) echo "Untaring $installdir/$filename..."
26039         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
26040         ;;
26041       tgz) echo "Untaring $installdir/$filename..."
26042         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
26043         ;;
26044       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
26045         ;;
26046     esac
26047   fi
26048   if test -f $installdir/$filename.unpacked; then
26049     depdir=$installdir
26050   fi
26051 
26052       fi
26053       # Source the builddeps file again, because in the previous command, the depdir
26054       # was updated to point at the current build dependency install directory.
26055       . $builddepsfile
26056       # Now extract variables from the builddeps.conf files.
26057       theroot=${builddep_devkit_ROOT}
26058       thecflags=${builddep_devkit_CFLAGS}
26059       thelibs=${builddep_devkit_LIBS}
26060       if test "x$depdir" = x; then
26061         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
26062       fi
26063       DEVKIT=$depdir
26064       if test "x$theroot" != x; then
26065         DEVKIT="$theroot"
26066       fi
26067       if test "x$thecflags" != x; then
26068         DEVKIT_CFLAGS="$thecflags"
26069       fi
26070       if test "x$thelibs" != x; then
26071         DEVKIT_LIBS="$thelibs"
26072       fi
26073 
26074         # Found devkit
26075         PATH="$DEVKIT/bin:$PATH"
26076         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
26077         if test "x$x_includes" = "xNONE"; then
26078           x_includes="$SYS_ROOT/usr/include/X11"
26079         fi
26080         if test "x$x_libraries" = "xNONE"; then
26081           x_libraries="$SYS_ROOT/usr/lib"
26082         fi
26083 
26084 
26085     fi
26086 
26087   fi
26088 
26089 
26090 
26091   #
26092   # Setup the compilers (CC and CXX)
26093   #
26094 
26095   COMPILER_NAME=C
26096   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26097 
26098   if test "x$CC" != x; then
26099     # User has supplied compiler name already, always let that override.
26100     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26101 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26102     if test "x`basename $CC`" = "x$CC"; then
26103       # A command without a complete path is provided, search $PATH.
26104 
26105       for ac_prog in $CC
26106 do
26107   # Extract the first word of "$ac_prog", so it can be a program name with args.
26108 set dummy $ac_prog; ac_word=$2
26109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5


26152       else
26153         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26154       fi
26155     else
26156       # Otherwise it might already be a complete path
26157       if test ! -x "$CC"; then
26158         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26159       fi
26160     fi
26161   else
26162     # No user supplied value. Locate compiler ourselves.
26163 
26164     # If we are cross compiling, assume cross compilation tools follows the
26165     # cross compilation standard where they are prefixed with the autoconf
26166     # standard name for the target. For example the binary
26167     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
26168     # If we are not cross compiling, then the default compiler name will be
26169     # used.
26170 
26171     CC=
26172     # If TOOLS_DIR is set, check for all compiler names in there first
26173     # before checking the rest of the PATH.
26174     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
26175     # step, this should not be necessary.
26176     if test -n "$TOOLS_DIR"; then
26177       PATH_save="$PATH"
26178       PATH="$TOOLS_DIR"
26179       for ac_prog in $TOOLCHAIN_CC_BINARY
26180 do
26181   # Extract the first word of "$ac_prog", so it can be a program name with args.
26182 set dummy $ac_prog; ac_word=$2
26183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26184 $as_echo_n "checking for $ac_word... " >&6; }
26185 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
26186   $as_echo_n "(cached) " >&6
26187 else
26188   case $TOOLS_DIR_CC in
26189   [\\/]* | ?:[\\/]*)
26190   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
26191   ;;
26192   *)
26193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26194 for as_dir in $PATH
26195 do
26196   IFS=$as_save_IFS
26197   test -z "$as_dir" && as_dir=.
26198     for ac_exec_ext in '' $ac_executable_extensions; do
26199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26200     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
26201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26202     break 2
26203   fi
26204 done
26205   done
26206 IFS=$as_save_IFS
26207 
26208   ;;
26209 esac
26210 fi
26211 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
26212 if test -n "$TOOLS_DIR_CC"; then
26213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
26214 $as_echo "$TOOLS_DIR_CC" >&6; }
26215 else
26216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26217 $as_echo "no" >&6; }
26218 fi
26219 
26220 
26221   test -n "$TOOLS_DIR_CC" && break
26222 done
26223 
26224       CC=$TOOLS_DIR_CC
26225       PATH="$PATH_save"
26226     fi
26227 
26228     # AC_PATH_PROGS can't be run multiple times with the same variable,
26229     # so create a new name for this run.
26230     if test "x$CC" = x; then
26231       for ac_prog in $TOOLCHAIN_CC_BINARY
26232 do
26233   # Extract the first word of "$ac_prog", so it can be a program name with args.
26234 set dummy $ac_prog; ac_word=$2
26235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26236 $as_echo_n "checking for $ac_word... " >&6; }
26237 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26238   $as_echo_n "(cached) " >&6
26239 else
26240   case $POTENTIAL_CC in
26241   [\\/]* | ?:[\\/]*)
26242   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26243   ;;
26244   *)


27860       else
27861         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
27862       fi
27863     else
27864       # Otherwise it might already be a complete path
27865       if test ! -x "$CXX"; then
27866         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
27867       fi
27868     fi
27869   else
27870     # No user supplied value. Locate compiler ourselves.
27871 
27872     # If we are cross compiling, assume cross compilation tools follows the
27873     # cross compilation standard where they are prefixed with the autoconf
27874     # standard name for the target. For example the binary
27875     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27876     # If we are not cross compiling, then the default compiler name will be
27877     # used.
27878 
27879     CXX=
27880     # If TOOLS_DIR is set, check for all compiler names in there first
27881     # before checking the rest of the PATH.
27882     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27883     # step, this should not be necessary.
27884     if test -n "$TOOLS_DIR"; then
27885       PATH_save="$PATH"
27886       PATH="$TOOLS_DIR"
27887       for ac_prog in $TOOLCHAIN_CXX_BINARY
27888 do
27889   # Extract the first word of "$ac_prog", so it can be a program name with args.
27890 set dummy $ac_prog; ac_word=$2
27891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27892 $as_echo_n "checking for $ac_word... " >&6; }
27893 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
27894   $as_echo_n "(cached) " >&6
27895 else
27896   case $TOOLS_DIR_CXX in
27897   [\\/]* | ?:[\\/]*)
27898   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
27899   ;;
27900   *)
27901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27902 for as_dir in $PATH
27903 do
27904   IFS=$as_save_IFS
27905   test -z "$as_dir" && as_dir=.
27906     for ac_exec_ext in '' $ac_executable_extensions; do
27907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27908     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
27909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27910     break 2
27911   fi
27912 done
27913   done
27914 IFS=$as_save_IFS
27915 
27916   ;;
27917 esac
27918 fi
27919 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
27920 if test -n "$TOOLS_DIR_CXX"; then
27921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
27922 $as_echo "$TOOLS_DIR_CXX" >&6; }
27923 else
27924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27925 $as_echo "no" >&6; }
27926 fi
27927 
27928 
27929   test -n "$TOOLS_DIR_CXX" && break
27930 done
27931 
27932       CXX=$TOOLS_DIR_CXX
27933       PATH="$PATH_save"
27934     fi
27935 
27936     # AC_PATH_PROGS can't be run multiple times with the same variable,
27937     # so create a new name for this run.
27938     if test "x$CXX" = x; then
27939       for ac_prog in $TOOLCHAIN_CXX_BINARY
27940 do
27941   # Extract the first word of "$ac_prog", so it can be a program name with args.
27942 set dummy $ac_prog; ac_word=$2
27943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27944 $as_echo_n "checking for $ac_word... " >&6; }
27945 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
27946   $as_echo_n "(cached) " >&6
27947 else
27948   case $POTENTIAL_CXX in
27949   [\\/]* | ?:[\\/]*)
27950   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
27951   ;;
27952   *)


39387     # in a custom configure script, or possibly the command line.
39388     # Let those variables be expanded at make time in spec.gmk.
39389     # The \$ are escaped to the shell, and the $(...) variables
39390     # are evaluated by make.
39391     RC_FLAGS="$RC_FLAGS \
39392         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
39393         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
39394         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
39395         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
39396         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
39397         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
39398         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
39399   fi
39400 
39401 
39402   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39403     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
39404     CCXXFLAGS="$CCXXFLAGS -nologo"
39405   fi
39406 


























39407 
39408 # FIXME: Currently we must test this after toolchain but before flags. Fix!
39409 
39410 # Now we can test some aspects on the target using configure macros.
39411 
39412 
39413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
39414 $as_echo_n "checking for ANSI C header files... " >&6; }
39415 if ${ac_cv_header_stdc+:} false; then :
39416   $as_echo_n "(cached) " >&6
39417 else
39418   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39419 /* end confdefs.h.  */
39420 #include <stdlib.h>
39421 #include <stdarg.h>
39422 #include <string.h>
39423 #include <float.h>
39424 
39425 int
39426 main ()


40240 
40241 
40242 # Check whether --with-extra-cxxflags was given.
40243 if test "${with_extra_cxxflags+set}" = set; then :
40244   withval=$with_extra_cxxflags;
40245 fi
40246 
40247 
40248 
40249 # Check whether --with-extra-ldflags was given.
40250 if test "${with_extra_ldflags+set}" = set; then :
40251   withval=$with_extra_ldflags;
40252 fi
40253 
40254 
40255   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
40256   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
40257   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
40258 
40259   # Hotspot needs these set in their legacy form
40260   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
40261   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
40262   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
40263 
40264 
40265 
40266 
40267 
40268   ###############################################################################
40269   #
40270   # Now setup the CFLAGS and LDFLAGS for the JDK build.
40271   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
40272   #
40273 
40274   # Setup compiler/platform specific flags to CFLAGS_JDK,
40275   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
40276   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40277     # these options are used for both C and C++ compiles
40278     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
40279         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
40280     case $OPENJDK_TARGET_CPU_ARCH in
40281       arm )
40282         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing


40558 
40559   # Setup LP64
40560   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
40561 
40562   # Set some common defines. These works for all compilers, but assume
40563   # -D is universally accepted.
40564 
40565   # Setup endianness
40566   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
40567     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
40568     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
40569     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
40570     #   Note: -Dmacro         is the same as    #define macro 1
40571     #         -Dmacro=        is the same as    #define macro
40572     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40573       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
40574     else
40575       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
40576     fi
40577   else





40578     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
40579   fi

40580 
40581   # Setup target OS define. Use OS target name but in upper case.
40582   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
40583   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
40584 
40585   # Setup target CPU
40586   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
40587 
40588   # Setup debug/release defines
40589   if test "x$DEBUG_LEVEL" = xrelease; then
40590     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
40591     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40592       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
40593     fi
40594   else
40595     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
40596   fi
40597 
40598   # Setup release name
40599   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"


41144 if test "${enable_macosx_runtime_support+set}" = set; then :
41145   enableval=$enable_macosx_runtime_support;
41146 fi
41147 
41148   if test "x$enable_macosx_runtime_support" != x; then
41149     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
41150 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
41151   fi
41152 
41153 
41154 
41155 
41156   ###############################################################################
41157   #
41158   # Check for X Windows
41159   #
41160 
41161   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
41162   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
41163   # --x-libraries for the sysroot, if that seems to be correct.
41164   if test "x$SYS_ROOT" != "x/"; then

41165     if test "x$x_includes" = xNONE; then
41166       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
41167         x_includes="$SYS_ROOT/usr/X11R6/include"
41168       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
41169         x_includes="$SYS_ROOT/usr/include"
41170       fi
41171     fi
41172     if test "x$x_libraries" = xNONE; then
41173       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
41174         x_libraries="$SYS_ROOT/usr/X11R6/lib"
41175       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
41176         x_libraries="$SYS_ROOT/usr/lib64"
41177       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
41178         x_libraries="$SYS_ROOT/usr/lib"

41179       fi
41180     fi
41181   fi
41182 
41183   # Now let autoconf do it's magic
41184   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
41185 $as_echo_n "checking for X... " >&6; }
41186 
41187 
41188 # Check whether --with-x was given.
41189 if test "${with_x+set}" = set; then :
41190   withval=$with_x;
41191 fi
41192 
41193 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
41194 if test "x$with_x" = xno; then
41195   # The user explicitly disabled X.
41196   have_x=disabled
41197 else
41198   case $x_includes,$x_libraries in #(


41888       apt-get)
41889         apt_help     $MISSING_DEPENDENCY ;;
41890       yum)
41891         yum_help     $MISSING_DEPENDENCY ;;
41892       port)
41893         port_help    $MISSING_DEPENDENCY ;;
41894       pkgutil)
41895         pkgutil_help $MISSING_DEPENDENCY ;;
41896       pkgadd)
41897         pkgadd_help  $MISSING_DEPENDENCY ;;
41898     esac
41899 
41900     if test "x$PKGHANDLER_COMMAND" != x; then
41901       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41902     fi
41903   fi
41904 
41905     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
41906   fi
41907 

41908   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41909     OPENWIN_HOME="/usr/openwin"





41910   fi
41911 
41912 
41913 
41914   #
41915   # Weird Sol10 something check...TODO change to try compile
41916   #
41917   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
41918     if test "`uname -r`" = "5.10"; then
41919       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
41920         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
41921       fi
41922     fi
41923   fi
41924 
41925   ac_ext=c
41926 ac_cpp='$CPP $CPPFLAGS'
41927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41930 
41931   OLD_CFLAGS="$CFLAGS"
41932   CFLAGS="$CFLAGS $X_CFLAGS"
41933 


42192 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42193   cat >>confdefs.h <<_ACEOF
42194 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42195 _ACEOF
42196 
42197             CUPS_FOUND=yes
42198             CUPS_CFLAGS=
42199             DEFAULT_CUPS=yes
42200 
42201 
42202 fi
42203 
42204 done
42205 
42206     fi
42207     if test "x$CUPS_FOUND" = xno; then
42208       # Getting nervous now? Lets poke around for standard Solaris third-party
42209       # package installation locations.
42210       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
42211 $as_echo_n "checking for cups headers... " >&6; }
42212       if test -s /opt/sfw/cups/include/cups/cups.h; then
42213         # An SFW package seems to be installed!
42214         CUPS_FOUND=yes
42215         CUPS_CFLAGS="-I/opt/sfw/cups/include"
42216       elif test -s /opt/csw/include/cups/cups.h; then
42217         # A CSW package seems to be installed!
42218         CUPS_FOUND=yes
42219         CUPS_CFLAGS="-I/opt/csw/include"
42220       fi
42221       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
42222 $as_echo "$CUPS_FOUND" >&6; }
42223     fi
42224     if test "x$CUPS_FOUND" = xno; then
42225 
42226   # Print a helpful message on how to acquire the necessary build dependency.
42227   # cups is the help tag: freetype, cups, pulse, alsa etc
42228   MISSING_DEPENDENCY=cups
42229 
42230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42231     cygwin_help $MISSING_DEPENDENCY
42232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42233     msys_help $MISSING_DEPENDENCY
42234   else
42235     PKGHANDLER_COMMAND=
42236 
42237     case $PKGHANDLER in
42238       apt-get)
42239         apt_help     $MISSING_DEPENDENCY ;;


42792     fi
42793     else FOUND_FREETYPE=no
42794 
42795   fi
42796 
42797         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42798         if test "x$FOUND_FREETYPE" = xyes; then
42799           if test "x$BUNDLE_FREETYPE" = xyes; then
42800             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
42801 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
42802             FOUND_FREETYPE=no
42803           else
42804             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42805 $as_echo_n "checking for freetype... " >&6; }
42806             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
42807 $as_echo "yes (using builddeps)" >&6; }
42808           fi
42809         fi
42810       fi
42811 


42812       if test "x$FOUND_FREETYPE" != xyes; then
42813         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
42814         if test "x$PKG_CONFIG" != x; then
42815 
42816 pkg_failed=no
42817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
42818 $as_echo_n "checking for FREETYPE... " >&6; }
42819 
42820 if test -n "$FREETYPE_CFLAGS"; then
42821     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
42822  elif test -n "$PKG_CONFIG"; then
42823     if test -n "$PKG_CONFIG" && \
42824     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42825   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42826   ac_status=$?
42827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42828   test $ac_status = 0; }; then
42829   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
42830 else
42831   pkg_failed=yes


42883             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
42884             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
42885             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
42886             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42887               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
42888             fi
42889             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42890             if test "x$BUNDLE_FREETYPE" = xyes; then
42891               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
42892 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
42893               FOUND_FREETYPE=no
42894             else
42895               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42896 $as_echo_n "checking for freetype... " >&6; }
42897               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
42898 $as_echo "yes (using pkg-config)" >&6; }
42899             fi
42900           fi
42901         fi
42902       fi

42903 
42904       if test "x$FOUND_FREETYPE" != xyes; then
42905         # Check in well-known locations
42906         if test "x$OPENJDK_TARGET_OS" = xwindows; then
42907           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
42908 
42909   windows_path="$FREETYPE_BASE_DIR"
42910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42911     unix_path=`$CYGPATH -u "$windows_path"`
42912     FREETYPE_BASE_DIR="$unix_path"
42913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42915     FREETYPE_BASE_DIR="$unix_path"
42916   fi
42917 
42918 
42919   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
42920   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
42921   METHOD="well-known location"
42922 


43492     fi
43493 
43494     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43495   fi
43496 
43497 
43498     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43499     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43500 $as_echo_n "checking for freetype includes... " >&6; }
43501     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43502 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43503     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43504     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43505 $as_echo_n "checking for freetype libraries... " >&6; }
43506     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43507 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43508   fi
43509 
43510           fi
43511         else
43512           if test "x$SYS_ROOT" = "x/"; then
43513             FREETYPE_ROOT=

































































































































































































































































43514           else
43515             FREETYPE_ROOT="$SYS_ROOT"




























43516           fi
43517           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"



43518 
43519   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43520   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43521   METHOD="well-known location"
43522 
43523   # First check if the files exists.
43524   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43525     # We found an arbitrary include file. That's a good sign.
43526     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43527 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43528     FOUND_FREETYPE=yes
43529 
43530     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43531     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43532       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43533 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43534       FOUND_FREETYPE=no
43535     else
43536       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43537         # On Windows, we will need both .lib and .dll file.


43788     if test ! -f "$path" && test ! -d "$path"; then
43789       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43790     fi
43791 
43792     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43793   fi
43794 
43795 
43796     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43797     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43798 $as_echo_n "checking for freetype includes... " >&6; }
43799     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43800 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43801     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43802     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43803 $as_echo_n "checking for freetype libraries... " >&6; }
43804     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43805 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43806   fi
43807 

43808 
43809           if test "x$FOUND_FREETYPE" != xyes; then
43810             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
43811 
43812   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43813   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43814   METHOD="well-known location"
43815 
43816   # First check if the files exists.
43817   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43818     # We found an arbitrary include file. That's a good sign.
43819     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43820 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43821     FOUND_FREETYPE=yes
43822 
43823     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43824     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43825       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43826 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43827       FOUND_FREETYPE=no
43828     else
43829       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43830         # On Windows, we will need both .lib and .dll file.


44084 
44085     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44086   fi
44087 
44088 
44089     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44091 $as_echo_n "checking for freetype includes... " >&6; }
44092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44093 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44094     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44095     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44096 $as_echo_n "checking for freetype libraries... " >&6; }
44097     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44098 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44099   fi
44100 
44101           fi
44102 
44103           if test "x$FOUND_FREETYPE" != xyes; then
44104             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44105             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44106 
44107   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44108   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
44109   METHOD="well-known location"
44110 
44111   # First check if the files exists.
44112   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44113     # We found an arbitrary include file. That's a good sign.
44114     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44115 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44116     FOUND_FREETYPE=yes
44117 
44118     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44119     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44120       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44121 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44122       FOUND_FREETYPE=no
44123     else
44124       if test "x$OPENJDK_TARGET_OS" = xwindows; then


45560       fi
45561       ALSA=$depdir
45562       if test "x$theroot" != x; then
45563         ALSA="$theroot"
45564       fi
45565       if test "x$thecflags" != x; then
45566         ALSA_CFLAGS="$thecflags"
45567       fi
45568       if test "x$thelibs" != x; then
45569         ALSA_LIBS="$thelibs"
45570       fi
45571       ALSA_FOUND=yes
45572       else ALSA_FOUND=no
45573 
45574     fi
45575     else ALSA_FOUND=no
45576 
45577   fi
45578 
45579     fi


45580     if test "x$ALSA_FOUND" = xno; then
45581 
45582 pkg_failed=no
45583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
45584 $as_echo_n "checking for ALSA... " >&6; }
45585 
45586 if test -n "$ALSA_CFLAGS"; then
45587     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
45588  elif test -n "$PKG_CONFIG"; then
45589     if test -n "$PKG_CONFIG" && \
45590     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45591   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45592   ac_status=$?
45593   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45594   test $ac_status = 0; }; then
45595   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
45596 else
45597   pkg_failed=yes
45598 fi
45599  else


45629                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
45630         else
45631                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
45632         fi
45633         # Put the nasty error message in config.log where it belongs
45634         echo "$ALSA_PKG_ERRORS" >&5
45635 
45636         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45637 $as_echo "no" >&6; }
45638                 ALSA_FOUND=no
45639 elif test $pkg_failed = untried; then
45640         ALSA_FOUND=no
45641 else
45642         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
45643         ALSA_LIBS=$pkg_cv_ALSA_LIBS
45644         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45645 $as_echo "yes" >&6; }
45646         ALSA_FOUND=yes
45647 fi
45648     fi

45649     if test "x$ALSA_FOUND" = xno; then
45650       for ac_header in alsa/asoundlib.h
45651 do :
45652   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
45653 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
45654   cat >>confdefs.h <<_ACEOF
45655 #define HAVE_ALSA_ASOUNDLIB_H 1
45656 _ACEOF
45657 
45658             ALSA_FOUND=yes
45659             ALSA_CFLAGS=-Iignoreme
45660             ALSA_LIBS=-lasound
45661             DEFAULT_ALSA=yes
45662 
45663 else
45664   ALSA_FOUND=no
45665 fi
45666 
45667 done
45668 


46395       fi
46396     done
46397 
46398     unset LLVM_LIBS
46399     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
46400       if echo "${flag}" | grep -q '^-l'; then
46401         if test "${LLVM_LIBS}" != ""; then
46402           LLVM_LIBS="${LLVM_LIBS} "
46403         fi
46404         LLVM_LIBS="${LLVM_LIBS}${flag}"
46405       fi
46406     done
46407 
46408 
46409 
46410 
46411   fi
46412 
46413   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46414   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
46415     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46416   fi
46417 
46418   # TODO better (platform agnostic) test
46419   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
46420     LIBCXX="-lstdc++"
46421   fi
46422 
46423 
46424 
46425 
46426   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46427 
46428 
46429 # Check whether --with-msvcr-dll was given.
46430 if test "${with_msvcr_dll+set}" = set; then :
46431   withval=$with_msvcr_dll;
46432 fi
46433 
46434 
46435   if test "x$with_msvcr_dll" != x; then


47320 
47321 
47322 
47323 
47324 # Setup use of ccache, if available
47325 
47326   # Check whether --enable-ccache was given.
47327 if test "${enable_ccache+set}" = set; then :
47328   enableval=$enable_ccache;
47329 fi
47330 
47331 
47332   CCACHE=
47333   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
47334 $as_echo_n "checking is ccache enabled... " >&6; }
47335   ENABLE_CCACHE=$enable_ccache
47336   if test "x$enable_ccache" = xyes; then
47337     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47338 $as_echo "yes" >&6; }
47339     OLD_PATH="$PATH"
47340     if test "x$TOOLS_DIR" != x; then
47341       PATH=$TOOLS_DIR:$PATH
47342     fi
47343 
47344 
47345 
47346   # Publish this variable in the help.
47347 
47348 
47349   if test "x$CCACHE" = x; then
47350     # The variable is not set by user, try to locate tool using the code snippet
47351     for ac_prog in ccache
47352 do
47353   # Extract the first word of "$ac_prog", so it can be a program name with args.
47354 set dummy $ac_prog; ac_word=$2
47355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47356 $as_echo_n "checking for $ac_word... " >&6; }
47357 if ${ac_cv_path_CCACHE+:} false; then :
47358   $as_echo_n "(cached) " >&6
47359 else
47360   case $CCACHE in
47361   [\\/]* | ?:[\\/]*)




 644 LIBCXX
 645 LLVM_LIBS
 646 LLVM_LDFLAGS
 647 LLVM_CFLAGS
 648 LLVM_CONFIG
 649 LIBFFI_LIBS
 650 LIBFFI_CFLAGS
 651 STATIC_CXX_SETTING
 652 LIBDL
 653 LIBM
 654 LIBZIP_CAN_USE_MMAP
 655 USE_EXTERNAL_LIBZ
 656 USE_EXTERNAL_LIBGIF
 657 USE_EXTERNAL_LIBJPEG
 658 ALSA_LIBS
 659 ALSA_CFLAGS
 660 FREETYPE_BUNDLE_LIB_PATH
 661 FREETYPE_LIBS
 662 FREETYPE_CFLAGS
 663 CUPS_CFLAGS

 664 X_EXTRA_LIBS
 665 X_LIBS
 666 X_PRE_LIBS
 667 X_CFLAGS
 668 XMKMF
 669 FIXPATH
 670 ZIP_DEBUGINFO_FILES
 671 ENABLE_DEBUG_SYMBOLS
 672 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 673 ZERO_ARCHFLAG
 674 LDFLAGS_CXX_JDK
 675 LDFLAGS_JDKEXE_SUFFIX
 676 LDFLAGS_JDKLIB_SUFFIX
 677 LDFLAGS_JDKEXE
 678 LDFLAGS_JDKLIB
 679 CXXFLAGS_JDKEXE
 680 CXXFLAGS_JDKLIB
 681 CFLAGS_JDKEXE
 682 CFLAGS_JDKLIB
 683 MACOSX_VERSION_MIN


 689 CXXSTD_CXXFLAG
 690 CXX_O_FLAG_NONE
 691 CXX_O_FLAG_NORM
 692 CXX_O_FLAG_HI
 693 CXX_O_FLAG_HIGHEST
 694 C_O_FLAG_NONE
 695 C_O_FLAG_NORM
 696 C_O_FLAG_HI
 697 C_O_FLAG_HIGHEST
 698 CXXFLAGS_DEBUG_SYMBOLS
 699 CFLAGS_DEBUG_SYMBOLS
 700 CXX_FLAG_DEPS
 701 C_FLAG_DEPS
 702 SET_SHARED_LIBRARY_MAPFILE
 703 SET_SHARED_LIBRARY_NAME
 704 SET_SHARED_LIBRARY_ORIGIN
 705 SET_EXECUTABLE_ORIGIN
 706 SHARED_LIBRARY_FLAGS
 707 CXX_FLAG_REORDER
 708 C_FLAG_REORDER
 709 SYSROOT_LDFLAGS
 710 SYSROOT_CFLAGS
 711 RC_FLAGS
 712 AR_OUT_OPTION
 713 LD_OUT_OPTION
 714 EXE_OUT_OPTION
 715 CC_OUT_OPTION
 716 POST_MCS_CMD
 717 POST_STRIP_CMD
 718 ARFLAGS
 719 COMPILER_TARGET_BITS_FLAG
 720 JT_HOME
 721 JTREGEXE
 722 USING_BROKEN_SUSE_LD
 723 PACKAGE_PATH
 724 LDEXECXX
 725 LDEXE
 726 USE_CLANG
 727 HOTSPOT_LD
 728 HOTSPOT_CXX
 729 HOTSPOT_RC
 730 HOTSPOT_MT


 746 RC
 747 MT
 748 LIPO
 749 ac_ct_OBJC
 750 OBJCFLAGS
 751 OBJC
 752 ac_ct_AR
 753 AR
 754 AS
 755 LDCXX
 756 LD
 757 CXXCPP
 758 CPP
 759 CXX_VERSION_NUMBER
 760 CC_VERSION_NUMBER
 761 ac_ct_CXX
 762 CXXFLAGS
 763 CXX
 764 ac_ct_PROPER_COMPILER_CXX
 765 PROPER_COMPILER_CXX
 766 TOOLCHAIN_PATH_CXX
 767 POTENTIAL_CXX
 768 OBJEXT
 769 EXEEXT
 770 ac_ct_CC
 771 CPPFLAGS
 772 LDFLAGS
 773 CFLAGS
 774 CC
 775 ac_ct_PROPER_COMPILER_CC
 776 PROPER_COMPILER_CC
 777 TOOLCHAIN_PATH_CC
 778 POTENTIAL_CC
 779 SDKPATH
 780 XCODEBUILD
 781 SET_DEVELOPER_DIR
 782 VS_LIB
 783 VS_INCLUDE
 784 VS_PATH
 785 CYGWIN_LINK
 786 EXE_SUFFIX
 787 OBJ_SUFFIX
 788 STATIC_LIBRARY
 789 SHARED_LIBRARY
 790 STATIC_LIBRARY_SUFFIX
 791 SHARED_LIBRARY_SUFFIX
 792 LIBRARY_PREFIX
 793 TOOLCHAIN_TYPE
 794 BUILD_HOTSPOT
 795 HOTSPOT_DIST
 796 BUILD_OUTPUT
 797 OVERRIDE_SRC_ROOT


 870 DEBUG_CLASSFILES
 871 FASTDEBUG
 872 VARIANT
 873 DEBUG_LEVEL
 874 MACOSX_UNIVERSAL
 875 INCLUDE_SA
 876 JVM_VARIANT_CORE
 877 JVM_VARIANT_ZEROSHARK
 878 JVM_VARIANT_ZERO
 879 JVM_VARIANT_KERNEL
 880 JVM_VARIANT_MINIMAL1
 881 JVM_VARIANT_CLIENT
 882 JVM_VARIANT_SERVER
 883 JVM_VARIANTS
 884 JVM_INTERPRETER
 885 JDK_VARIANT
 886 SET_OPENJDK
 887 BUILD_LOG_WRAPPER
 888 BUILD_LOG_PREVIOUS
 889 BUILD_LOG

 890 TOPDIR
 891 PATH_SEP
 892 ZERO_ARCHDEF
 893 DEFINE_CROSS_COMPILE_ARCH
 894 LP64
 895 OPENJDK_TARGET_OS_EXPORT_DIR
 896 OPENJDK_TARGET_OS_API_DIR
 897 OPENJDK_TARGET_CPU_JLI_CFLAGS
 898 OPENJDK_TARGET_CPU_OSARCH
 899 OPENJDK_TARGET_CPU_ISADIR
 900 OPENJDK_TARGET_CPU_LIBDIR
 901 OPENJDK_TARGET_CPU_LEGACY_LIB
 902 OPENJDK_TARGET_CPU_LEGACY
 903 REQUIRED_OS_VERSION
 904 REQUIRED_OS_NAME
 905 COMPILE_TYPE
 906 OPENJDK_TARGET_CPU_ENDIAN
 907 OPENJDK_TARGET_CPU_BITS
 908 OPENJDK_TARGET_CPU_ARCH
 909 OPENJDK_TARGET_CPU


1004 datarootdir
1005 libexecdir
1006 sbindir
1007 bindir
1008 program_transform_name
1009 prefix
1010 exec_prefix
1011 PACKAGE_URL
1012 PACKAGE_BUGREPORT
1013 PACKAGE_STRING
1014 PACKAGE_VERSION
1015 PACKAGE_TARNAME
1016 PACKAGE_NAME
1017 PATH_SEPARATOR
1018 SHELL'
1019 ac_subst_files=''
1020 ac_user_opts='
1021 enable_option_checking
1022 with_custom_make_dir
1023 with_target_bits




1024 enable_openjdk_only
1025 with_jdk_variant
1026 with_jvm_interpreter
1027 with_jvm_variants
1028 enable_debug
1029 with_debug_level
1030 with_devkit
1031 with_sys_root
1032 with_sysroot
1033 with_tools_dir
1034 with_toolchain_path
1035 with_extra_path
1036 with_xcode_path
1037 with_conf_name
1038 with_builddeps_conf
1039 with_builddeps_server
1040 with_builddeps_dir
1041 with_builddeps_group
1042 enable_headful
1043 enable_hotspot_test_in_build
1044 with_cacerts_file
1045 enable_unlimited_crypto
1046 with_milestone
1047 with_update_version
1048 with_user_release_suffix
1049 with_build_number
1050 with_copyright_year
1051 with_boot_jdk
1052 with_boot_jdk_jvmargs
1053 with_add_source_root
1054 with_override_source_root
1055 with_adds_and_overrides
1056 with_override_langtools


1823                           Deprecated. Option is kept for backwards
1824                           compatibility and is ignored
1825   --disable-freetype-bundling
1826                           disable bundling of the freetype library with the
1827                           build result [enabled on Windows or when using
1828                           --with-freetype, disabled otherwise]
1829   --enable-sjavac         use sjavac to do fast incremental compiles
1830                           [disabled]
1831   --disable-precompiled-headers
1832                           disable using precompiled headers when compiling C++
1833                           [enabled]
1834   --enable-ccache         enable using ccache to speed up recompilations
1835                           [disabled]
1836 
1837 Optional Packages:
1838   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1839   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1840   --with-custom-make-dir  use this directory for custom build/make files
1841   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1842                           support it), e.g. --with-target-bits=32 [guessed]








1843   --with-jdk-variant      JDK variant to build (normal) [normal]
1844   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1845   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1846                           client, minimal1, kernel, zero, zeroshark, core)
1847                           [server]
1848   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1849                           [release]
1850   --with-devkit           use this devkit for compilers, tools and resources
1851   --with-sys-root         alias for --with-sysroot for backwards compatability
1852   --with-sysroot          use this directory as sysroot)
1853   --with-tools-dir        alias for --with-toolchain-path for backwards
1854                           compatibility
1855   --with-toolchain-path   prepend these directories when searching for
1856                           toolchain binaries (compilers etc)
1857   --with-extra-path       prepend these directories to the default path
1858   --with-xcode-path       explicit path to Xcode 4 (generally for building on
1859                           10.9 and later)
1860   --with-conf-name        use this as the name of the configuration [generated
1861                           from important configuration options]
1862   --with-builddeps-conf   use this configuration file for the builddeps
1863   --with-builddeps-server download and use build dependencies from this server
1864                           url
1865   --with-builddeps-dir    store downloaded build dependencies here
1866                           [/localhome/builddeps]
1867   --with-builddeps-group  chgrp the downloaded build dependencies to this
1868                           group
1869   --with-cacerts-file     specify alternative cacerts file
1870   --with-milestone        Set milestone value for build [internal]
1871   --with-update-version   Set update version value for build [b00]
1872   --with-user-release-suffix
1873                           Add a custom string to the version string if build
1874                           number isn't set.[username_builddateb00]
1875   --with-build-number     Set build number value for build [b00]
1876   --with-copyright-year   Set copyright year value for build [current year]
1877   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1878   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1879                           invocations of the Boot JDK, overriding the default


3291 # version 2 for more details (a copy is included in the LICENSE file that
3292 # accompanied this code).
3293 #
3294 # You should have received a copy of the GNU General Public License version
3295 # 2 along with this work; if not, write to the Free Software Foundation,
3296 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3297 #
3298 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3299 # or visit www.oracle.com if you need additional information or have any
3300 # questions.
3301 #
3302 
3303 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3304 # If so, then append $1 to $2 \
3305 # Also set JVM_ARG_OK to true/false depending on outcome.
3306 
3307 
3308 # Appends a string to a path variable, only adding the : when needed.
3309 
3310 
3311 # Prepends a string to a path variable, only adding the : when needed.
3312 
3313 
3314 # This will make sure the given variable points to a full and proper
3315 # path. This means:
3316 # 1) There will be no spaces in the path. On posix platforms,
3317 #    spaces in the path will result in an error. On Windows,
3318 #    the path will be rewritten using short-style to be space-free.
3319 # 2) The path will be absolute, and it will be in unix-style (on
3320 #     cygwin).
3321 # $1: The name of the variable to fix
3322 
3323 
3324 # This will make sure the given variable points to a executable
3325 # with a full and proper path. This means:
3326 # 1) There will be no spaces in the path. On posix platforms,
3327 #    spaces in the path will result in an error. On Windows,
3328 #    the path will be rewritten using short-style to be space-free.
3329 # 2) The path will be absolute, and it will be in unix-style (on
3330 #     cygwin).
3331 # Any arguments given to the executable is preserved.
3332 # If the input variable does not have a directory specification, then
3333 # it need to be in the PATH.


3376 # $2: executable name (or list of names) to look for
3377 
3378 
3379 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3380 # $1: variable to set
3381 # $2: autoconf macro to call to look for the special tool
3382 
3383 
3384 # Setup the most fundamental tools that relies on not much else to set up,
3385 # but is used by much of the early bootstrap code.
3386 
3387 
3388 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3389 
3390 
3391 
3392 
3393 
3394 
3395 
3396 
3397 
3398 #%%% Simple tools %%%
3399 
3400 # Check if we have found a usable version of make
3401 # $1: the path to a potential make binary (or empty)
3402 # $2: the description on how we found this
3403 
3404 
3405 # Goes looking for a usable version of GNU make.
3406 
3407 
3408 
3409 
3410 
3411 
3412 # Check if build directory is on local disk. If not possible to determine,
3413 # we prefer to claim it's local.
3414 # Argument 1: directory to test
3415 # Argument 2: what to do if it is on local disk
3416 # Argument 3: what to do otherwise (remote disk or failure)
3417 


4218 # Check if the VS env variables were setup prior to running configure.
4219 # If not, then find vcvarsall.bat and run it automatically, and integrate
4220 # the set env variables into the spec file.
4221 
4222 
4223 
4224 
4225 
4226 
4227 
4228 
4229 
4230 
4231 
4232 # This line needs to be here, verbatim, after all includes and the dummy hook
4233 # definitions. It is replaced with custom functionality when building
4234 # custom sources.
4235 #CUSTOM_AUTOCONF_INCLUDE
4236 
4237 # Do not change or remove the following line, it is needed for consistency checks:
4238 DATE_WHEN_GENERATED=1523633263
4239 
4240 ###############################################################################
4241 #
4242 # Initialization / Boot-strapping
4243 #
4244 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4245 # thus it jumps back and forth, each time gaining something needed later on.
4246 #
4247 ###############################################################################
4248 
4249 # If we are requested to print additional help, do that and then exit.
4250 # This must be the very first call.
4251 
4252   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4253     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4254     $PRINTF "Which are valid to use depends on the build platform.\n"
4255     for toolchain in $VALID_TOOLCHAINS_all; do
4256       # Use indirect variable referencing
4257       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4258       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}


14250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14251 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14252       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14253     fi
14254 
14255     # Use eval to expand a potential ~
14256     eval path="$path"
14257     if test ! -f "$path" && test ! -d "$path"; then
14258       as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14259     fi
14260 
14261     TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14262   fi
14263 
14264   # SRC_ROOT is a traditional alias for TOPDIR.
14265   SRC_ROOT=$TOPDIR
14266 
14267   # Locate the directory of this script.
14268   AUTOCONF_DIR=$TOPDIR/common/autoconf
14269 























































































































































































14270 
14271   # Setup default logging of stdout and stderr to build.log in the output root.
14272   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14273   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14274   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14275 
14276 
14277 
14278 
14279 
14280 # Check if it's a pure open build or if custom sources are to be used.
14281 
14282   # Check whether --enable-openjdk-only was given.
14283 if test "${enable_openjdk_only+set}" = set; then :
14284   enableval=$enable_openjdk_only;
14285 else
14286   enable_openjdk_only="no"
14287 fi
14288 
14289 


14603   # On Macosx universal binaries are produced, but they only contain
14604   # 64 bit intel. This invalidates control of which jvms are built
14605   # from configure, but only server is valid anyway. Fix this
14606   # when hotspot makefiles are rewritten.
14607   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14608     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14609   fi
14610 
14611   #####
14612 
14613 
14614 
14615 
14616 
14617 
14618 
14619 
14620 # With basic setup done, call the custom early hook.
14621 
14622 
14623 # Check if we have devkits, extra paths or sysroot set.
14624 
14625 
14626 # Check whether --with-devkit was given.
14627 if test "${with_devkit+set}" = set; then :
14628   withval=$with_devkit;
14629 
14630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14631 
14632   # Input might be given as Windows format, start by converting to
14633   # unix format.
14634   path="$with_devkit"
14635   new_path=`$CYGPATH -u "$path"`
14636 
14637   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14638   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14639   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14640   # "foo.exe" is OK but "foo" is an error.
14641   #
14642   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14643   # It is also a way to make sure we got the proper file name for the real test later on.
14644   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14645   if test "x$test_shortpath" = x; then
14646     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14647 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14648     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14649   fi
14650 
14651   # Call helper function which possibly converts this using DOS-style short mode.
14652   # If so, the updated path is stored in $new_path.
14653 
14654   input_path="$new_path"
14655   # Check if we need to convert this using DOS-style short mode. If the path
14656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14657   # take no chances and rewrite it.
14658   # Note: m4 eats our [], so we need to use [ and ] instead.
14659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14660   if test "x$has_forbidden_chars" != x; then
14661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14665       # Going to short mode and back again did indeed matter. Since short mode is
14666       # case insensitive, let's make it lowercase to improve readability.
14667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14668       # Now convert it back to Unix-stile (cygpath)
14669       input_path=`$CYGPATH -u "$shortmode_path"`
14670       new_path="$input_path"
14671     fi
14672   fi
14673 
14674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14675   if test "x$test_cygdrive_prefix" = x; then
14676     # As a simple fix, exclude /usr/bin since it's not a real path.
14677     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14679       # a path prefixed by /cygdrive for fixpath to work.
14680       new_path="$CYGWIN_ROOT_PATH$input_path"
14681     fi
14682   fi
14683 
14684 
14685   if test "x$path" != "x$new_path"; then
14686     with_devkit="$new_path"
14687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14688 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14689   fi
14690 
14691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14692 
14693   path="$with_devkit"
14694   has_colon=`$ECHO $path | $GREP ^.:`
14695   new_path="$path"
14696   if test "x$has_colon" = x; then
14697     # Not in mixed or Windows style, start by that.
14698     new_path=`cmd //c echo $path`
14699   fi
14700 
14701 
14702   input_path="$new_path"
14703   # Check if we need to convert this using DOS-style short mode. If the path
14704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14705   # take no chances and rewrite it.
14706   # Note: m4 eats our [], so we need to use [ and ] instead.
14707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14708   if test "x$has_forbidden_chars" != x; then
14709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14710     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14711   fi
14712 
14713 
14714   windows_path="$new_path"
14715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14716     unix_path=`$CYGPATH -u "$windows_path"`
14717     new_path="$unix_path"
14718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14720     new_path="$unix_path"
14721   fi
14722 
14723   if test "x$path" != "x$new_path"; then
14724     with_devkit="$new_path"
14725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14726 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14727   fi
14728 
14729   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14730   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14731 
14732   else
14733     # We're on a posix platform. Hooray! :)
14734     path="$with_devkit"
14735     has_space=`$ECHO "$path" | $GREP " "`
14736     if test "x$has_space" != x; then
14737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14738 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14739       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14740     fi
14741 
14742     # Use eval to expand a potential ~
14743     eval path="$path"
14744     if test ! -f "$path" && test ! -d "$path"; then
14745       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14746     fi
14747 
14748     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14749   fi
14750 
14751         DEVKIT_ROOT="$with_devkit"
14752         # Check for a meta data info file in the root of the devkit
14753         if test -f "$DEVKIT_ROOT/devkit.info"; then
14754           # This potentially sets the following:
14755           # DEVKIT_NAME: A descriptive name of the devkit
14756           # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14757           # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14758           # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14759           . $DEVKIT_ROOT/devkit.info
14760         fi
14761 
14762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14763 $as_echo_n "checking for devkit... " >&6; }
14764         if test "x$DEVKIT_NAME" != x; then
14765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14766 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14767         else
14768           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14769 $as_echo "$DEVKIT_ROOT" >&6; }
14770         fi
14771 
14772         if test "x$DEVKIT_EXTRA_PATH" != x; then
14773 
14774   if test "x$DEVKIT_EXTRA_PATH" != x; then
14775     if test "x$EXTRA_PATH" = x; then
14776       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14777     else
14778       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14779     fi
14780   fi
14781 
14782         fi
14783 
14784         # Fallback default of just /bin if DEVKIT_PATH is not defined
14785         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14786           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14787         fi
14788 
14789   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14790     if test "x$TOOLCHAIN_PATH" = x; then
14791       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14792     else
14793       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14794     fi
14795   fi
14796 
14797 
14798         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14799         # places for backwards compatiblity.
14800         if test "x$DEVKIT_SYSROOT" != x; then
14801           SYSROOT="$DEVKIT_SYSROOT"
14802         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14803           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14804         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14805           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14806         fi
14807 
14808 
14809 fi
14810 
14811 
14812   # You can force the sysroot if the sysroot encoded into the compiler tools
14813   # is not correct.
14814 
14815 # Check whether --with-sys-root was given.
14816 if test "${with_sys_root+set}" = set; then :
14817   withval=$with_sys_root; SYSROOT=$with_sys_root
14818 
14819 fi
14820 
14821 
14822 
14823 # Check whether --with-sysroot was given.
14824 if test "${with_sysroot+set}" = set; then :
14825   withval=$with_sysroot; SYSROOT=$with_sysroot
14826 
14827 fi
14828 
14829 
14830 
14831 # Check whether --with-tools-dir was given.
14832 if test "${with_tools_dir+set}" = set; then :
14833   withval=$with_tools_dir;
14834   if test "x$with_tools_dir" != x; then
14835     if test "x$TOOLCHAIN_PATH" = x; then
14836       TOOLCHAIN_PATH="$with_tools_dir"
14837     else
14838       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14839     fi
14840   fi
14841 
14842 
14843 fi
14844 
14845 
14846 
14847 # Check whether --with-toolchain-path was given.
14848 if test "${with_toolchain_path+set}" = set; then :
14849   withval=$with_toolchain_path;
14850   if test "x$with_toolchain_path" != x; then
14851     if test "x$TOOLCHAIN_PATH" = x; then
14852       TOOLCHAIN_PATH="$with_toolchain_path"
14853     else
14854       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14855     fi
14856   fi
14857 
14858 
14859 fi
14860 
14861 
14862 
14863 # Check whether --with-extra-path was given.
14864 if test "${with_extra_path+set}" = set; then :
14865   withval=$with_extra_path;
14866   if test "x$with_extra_path" != x; then
14867     if test "x$EXTRA_PATH" = x; then
14868       EXTRA_PATH="$with_extra_path"
14869     else
14870       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14871     fi
14872   fi
14873 
14874 
14875 fi
14876 
14877 
14878   # Prepend the extra path to the global path
14879 
14880   if test "x$EXTRA_PATH" != x; then
14881     if test "x$PATH" = x; then
14882       PATH="$EXTRA_PATH"
14883     else
14884       PATH="$EXTRA_PATH:$PATH"
14885     fi
14886   fi
14887 
14888 
14889   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14890     # Add extra search paths on solaris for utilities like ar and as etc...
14891     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14892   fi
14893 
14894   # Xcode version will be validated later
14895 
14896 # Check whether --with-xcode-path was given.
14897 if test "${with_xcode_path+set}" = set; then :
14898   withval=$with_xcode_path; XCODE_PATH=$with_xcode_path
14899 
14900 fi
14901 
14902 
14903   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14904 $as_echo_n "checking for sysroot... " >&6; }
14905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14906 $as_echo "$SYSROOT" >&6; }
14907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14908 $as_echo_n "checking for toolchain path... " >&6; }
14909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14910 $as_echo "$TOOLCHAIN_PATH" >&6; }
14911   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14912 $as_echo_n "checking for extra path... " >&6; }
14913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14914 $as_echo "$EXTRA_PATH" >&6; }
14915 
14916 
14917 # To properly create a configuration name, we need to have the OpenJDK target
14918 # and options (variants and debug level) parsed.
14919 
14920 
14921 
14922 # Check whether --with-conf-name was given.
14923 if test "${with_conf_name+set}" = set; then :
14924   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14925 fi
14926 
14927 
14928   # Test from where we are running configure, in or outside of src root.
14929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14930 $as_echo_n "checking where to store configuration... " >&6; }
14931   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14932       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14933       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14934     # We are running configure from the src root.
14935     # Create a default ./build/target-variant-debuglevel output root.
14936     if test "x${CONF_NAME}" = x; then


16204   if test "x$arguments" != xEOL; then
16205     new_complete="$new_path ${arguments% *}"
16206   else
16207     new_complete="$new_path"
16208   fi
16209 
16210   if test "x$complete" != "x$new_complete"; then
16211     FOUND_MAKE="$new_complete"
16212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16213 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16214   fi
16215 
16216         fi
16217       fi
16218     fi
16219   fi
16220 
16221     fi
16222 
16223     if test "x$FOUND_MAKE" = x; then
16224       if test "x$TOOLCHAIN_PATH" != x; then
16225         # We have a toolchain path, check that as well before giving up.
16226         OLD_PATH=$PATH
16227         PATH=$TOOLCHAIN_PATH:$PATH
16228         for ac_prog in gmake
16229 do
16230   # Extract the first word of "$ac_prog", so it can be a program name with args.
16231 set dummy $ac_prog; ac_word=$2
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16233 $as_echo_n "checking for $ac_word... " >&6; }
16234 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16235   $as_echo_n "(cached) " >&6
16236 else
16237   case $CHECK_TOOLSDIR_GMAKE in
16238   [\\/]* | ?:[\\/]*)
16239   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16240   ;;
16241   *)
16242   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16243 for as_dir in $PATH
16244 do
16245   IFS=$as_save_IFS
16246   test -z "$as_dir" && as_dir=.
16247     for ac_exec_ext in '' $ac_executable_extensions; do


26027       CFLAGS_JDK="${CFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26028       CXXFLAGS_JDK="${CXXFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26029       LDFLAGS_JDK="${LDFLAGS_JDK} -isysroot \"$SDKPATH\" -iframework\"$SDKPATH/System/Library/Frameworks\""
26030     fi
26031 
26032     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
26033     # setting this here means it doesn't have to be peppered throughout the forest
26034     CFLAGS_JDK="$CFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26035     CXXFLAGS_JDK="$CXXFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26036     LDFLAGS_JDK="$LDFLAGS_JDK -F\"$SDKPATH/System/Library/Frameworks/JavaVM.framework/Frameworks\""
26037   fi
26038 
26039   # For solaris we really need solaris tools, and not the GNU equivalent.
26040   # The build tools on Solaris reside in /usr/ccs (C Compilation System),
26041   # so add that to path before starting to probe.
26042   # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
26043   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
26044     PATH="/usr/ccs/bin:$PATH"
26045   fi
26046 
26047   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
26048   # override all other locations.
26049   if test "x$TOOLCHAIN_PATH" != x; then
26050     PATH=$TOOLCHAIN_PATH:$PATH
26051   fi
26052 






























































































































































26053 
26054   #
26055   # Setup the compilers (CC and CXX)
26056   #
26057 
26058   COMPILER_NAME=C
26059   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
26060 
26061   if test "x$CC" != x; then
26062     # User has supplied compiler name already, always let that override.
26063     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
26064 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
26065     if test "x`basename $CC`" = "x$CC"; then
26066       # A command without a complete path is provided, search $PATH.
26067 
26068       for ac_prog in $CC
26069 do
26070   # Extract the first word of "$ac_prog", so it can be a program name with args.
26071 set dummy $ac_prog; ac_word=$2
26072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5


26115       else
26116         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
26117       fi
26118     else
26119       # Otherwise it might already be a complete path
26120       if test ! -x "$CC"; then
26121         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
26122       fi
26123     fi
26124   else
26125     # No user supplied value. Locate compiler ourselves.
26126 
26127     # If we are cross compiling, assume cross compilation tools follows the
26128     # cross compilation standard where they are prefixed with the autoconf
26129     # standard name for the target. For example the binary
26130     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
26131     # If we are not cross compiling, then the default compiler name will be
26132     # used.
26133 
26134     CC=
26135     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
26136     # before checking the rest of the PATH.
26137     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
26138     # step, this should not be necessary.
26139     if test -n "$TOOLCHAIN_PATH"; then
26140       PATH_save="$PATH"
26141       PATH="$TOOLCHAIN_PATH"
26142       for ac_prog in $SEARCH_LIST
26143 do
26144   # Extract the first word of "$ac_prog", so it can be a program name with args.
26145 set dummy $ac_prog; ac_word=$2
26146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26147 $as_echo_n "checking for $ac_word... " >&6; }
26148 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
26149   $as_echo_n "(cached) " >&6
26150 else
26151   case $TOOLCHAIN_PATH_CC in
26152   [\\/]* | ?:[\\/]*)
26153   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
26154   ;;
26155   *)
26156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26157 for as_dir in $PATH
26158 do
26159   IFS=$as_save_IFS
26160   test -z "$as_dir" && as_dir=.
26161     for ac_exec_ext in '' $ac_executable_extensions; do
26162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26163     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
26164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26165     break 2
26166   fi
26167 done
26168   done
26169 IFS=$as_save_IFS
26170 
26171   ;;
26172 esac
26173 fi
26174 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
26175 if test -n "$TOOLCHAIN_PATH_CC"; then
26176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
26177 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
26178 else
26179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26180 $as_echo "no" >&6; }
26181 fi
26182 
26183 
26184   test -n "$TOOLCHAIN_PATH_CC" && break
26185 done
26186 
26187       CC=$TOOLCHAIN_PATH_CC
26188       PATH="$PATH_save"
26189     fi
26190 
26191     # AC_PATH_PROGS can't be run multiple times with the same variable,
26192     # so create a new name for this run.
26193     if test "x$CC" = x; then
26194       for ac_prog in $TOOLCHAIN_CC_BINARY
26195 do
26196   # Extract the first word of "$ac_prog", so it can be a program name with args.
26197 set dummy $ac_prog; ac_word=$2
26198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26199 $as_echo_n "checking for $ac_word... " >&6; }
26200 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
26201   $as_echo_n "(cached) " >&6
26202 else
26203   case $POTENTIAL_CC in
26204   [\\/]* | ?:[\\/]*)
26205   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
26206   ;;
26207   *)


27823       else
27824         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
27825       fi
27826     else
27827       # Otherwise it might already be a complete path
27828       if test ! -x "$CXX"; then
27829         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
27830       fi
27831     fi
27832   else
27833     # No user supplied value. Locate compiler ourselves.
27834 
27835     # If we are cross compiling, assume cross compilation tools follows the
27836     # cross compilation standard where they are prefixed with the autoconf
27837     # standard name for the target. For example the binary
27838     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27839     # If we are not cross compiling, then the default compiler name will be
27840     # used.
27841 
27842     CXX=
27843     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27844     # before checking the rest of the PATH.
27845     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27846     # step, this should not be necessary.
27847     if test -n "$TOOLCHAIN_PATH"; then
27848       PATH_save="$PATH"
27849       PATH="$TOOLCHAIN_PATH"
27850       for ac_prog in $SEARCH_LIST
27851 do
27852   # Extract the first word of "$ac_prog", so it can be a program name with args.
27853 set dummy $ac_prog; ac_word=$2
27854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27855 $as_echo_n "checking for $ac_word... " >&6; }
27856 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
27857   $as_echo_n "(cached) " >&6
27858 else
27859   case $TOOLCHAIN_PATH_CXX in
27860   [\\/]* | ?:[\\/]*)
27861   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
27862   ;;
27863   *)
27864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27865 for as_dir in $PATH
27866 do
27867   IFS=$as_save_IFS
27868   test -z "$as_dir" && as_dir=.
27869     for ac_exec_ext in '' $ac_executable_extensions; do
27870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27871     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
27872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27873     break 2
27874   fi
27875 done
27876   done
27877 IFS=$as_save_IFS
27878 
27879   ;;
27880 esac
27881 fi
27882 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
27883 if test -n "$TOOLCHAIN_PATH_CXX"; then
27884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
27885 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
27886 else
27887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27888 $as_echo "no" >&6; }
27889 fi
27890 
27891 
27892   test -n "$TOOLCHAIN_PATH_CXX" && break
27893 done
27894 
27895       CXX=$TOOLCHAIN_PATH_CXX
27896       PATH="$PATH_save"
27897     fi
27898 
27899     # AC_PATH_PROGS can't be run multiple times with the same variable,
27900     # so create a new name for this run.
27901     if test "x$CXX" = x; then
27902       for ac_prog in $TOOLCHAIN_CXX_BINARY
27903 do
27904   # Extract the first word of "$ac_prog", so it can be a program name with args.
27905 set dummy $ac_prog; ac_word=$2
27906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27907 $as_echo_n "checking for $ac_word... " >&6; }
27908 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
27909   $as_echo_n "(cached) " >&6
27910 else
27911   case $POTENTIAL_CXX in
27912   [\\/]* | ?:[\\/]*)
27913   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
27914   ;;
27915   *)


39350     # in a custom configure script, or possibly the command line.
39351     # Let those variables be expanded at make time in spec.gmk.
39352     # The \$ are escaped to the shell, and the $(...) variables
39353     # are evaluated by make.
39354     RC_FLAGS="$RC_FLAGS \
39355         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
39356         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
39357         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
39358         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
39359         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
39360         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
39361         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
39362   fi
39363 
39364 
39365   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39366     # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
39367     CCXXFLAGS="$CCXXFLAGS -nologo"
39368   fi
39369 
39370   if test "x$SYSROOT" != "x"; then
39371     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
39372       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39373         # Solaris Studio does not have a concept of sysroot. Instead we must
39374         # make sure the default include and lib dirs are appended to each
39375         # compile and link command line.
39376         SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
39377         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
39378             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
39379             -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
39380       fi
39381     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
39382       SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
39383       SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
39384     elif test "x$TOOLCHAIN_TYPE" = xclang; then
39385       SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
39386       SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
39387     fi
39388     # Propagate the sysroot args to hotspot
39389     LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
39390     LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
39391     LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
39392   fi
39393 
39394 
39395 
39396 
39397 # FIXME: Currently we must test this after toolchain but before flags. Fix!
39398 
39399 # Now we can test some aspects on the target using configure macros.
39400 
39401 
39402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
39403 $as_echo_n "checking for ANSI C header files... " >&6; }
39404 if ${ac_cv_header_stdc+:} false; then :
39405   $as_echo_n "(cached) " >&6
39406 else
39407   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39408 /* end confdefs.h.  */
39409 #include <stdlib.h>
39410 #include <stdarg.h>
39411 #include <string.h>
39412 #include <float.h>
39413 
39414 int
39415 main ()


40229 
40230 
40231 # Check whether --with-extra-cxxflags was given.
40232 if test "${with_extra_cxxflags+set}" = set; then :
40233   withval=$with_extra_cxxflags;
40234 fi
40235 
40236 
40237 
40238 # Check whether --with-extra-ldflags was given.
40239 if test "${with_extra_ldflags+set}" = set; then :
40240   withval=$with_extra_ldflags;
40241 fi
40242 
40243 
40244   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
40245   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
40246   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
40247 
40248   # Hotspot needs these set in their legacy form
40249   LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
40250   LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
40251   LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
40252 
40253 
40254 
40255 
40256 
40257   ###############################################################################
40258   #
40259   # Now setup the CFLAGS and LDFLAGS for the JDK build.
40260   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
40261   #
40262 
40263   # Setup compiler/platform specific flags to CFLAGS_JDK,
40264   # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
40265   if test "x$TOOLCHAIN_TYPE" = xgcc; then
40266     # these options are used for both C and C++ compiles
40267     CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
40268         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
40269     case $OPENJDK_TARGET_CPU_ARCH in
40270       arm )
40271         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing


40547 
40548   # Setup LP64
40549   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
40550 
40551   # Set some common defines. These works for all compilers, but assume
40552   # -D is universally accepted.
40553 
40554   # Setup endianness
40555   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
40556     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
40557     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
40558     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
40559     #   Note: -Dmacro         is the same as    #define macro 1
40560     #         -Dmacro=        is the same as    #define macro
40561     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40562       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
40563     else
40564       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
40565     fi
40566   else
40567     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
40568     # are defined in the system?
40569     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40570       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
40571     else
40572       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
40573     fi
40574   fi
40575 
40576   # Setup target OS define. Use OS target name but in upper case.
40577   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
40578   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
40579 
40580   # Setup target CPU
40581   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
40582 
40583   # Setup debug/release defines
40584   if test "x$DEBUG_LEVEL" = xrelease; then
40585     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
40586     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40587       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
40588     fi
40589   else
40590     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
40591   fi
40592 
40593   # Setup release name
40594   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"


41139 if test "${enable_macosx_runtime_support+set}" = set; then :
41140   enableval=$enable_macosx_runtime_support;
41141 fi
41142 
41143   if test "x$enable_macosx_runtime_support" != x; then
41144     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
41145 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
41146   fi
41147 
41148 
41149 
41150 
41151   ###############################################################################
41152   #
41153   # Check for X Windows
41154   #
41155 
41156   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
41157   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
41158   # --x-libraries for the sysroot, if that seems to be correct.
41159   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
41160     if test "x$SYSROOT" != "x"; then
41161       if test "x$x_includes" = xNONE; then
41162         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
41163           x_includes="$SYSROOT/usr/X11R6/include"
41164         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
41165           x_includes="$SYSROOT/usr/include"
41166         fi
41167       fi
41168       if test "x$x_libraries" = xNONE; then
41169         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
41170           x_libraries="$SYSROOT/usr/X11R6/lib"
41171         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
41172           x_libraries="$SYSROOT/usr/lib64"
41173         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
41174           x_libraries="$SYSROOT/usr/lib"
41175         fi
41176       fi
41177     fi
41178   fi
41179 
41180   # Now let autoconf do it's magic
41181   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
41182 $as_echo_n "checking for X... " >&6; }
41183 
41184 
41185 # Check whether --with-x was given.
41186 if test "${with_x+set}" = set; then :
41187   withval=$with_x;
41188 fi
41189 
41190 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
41191 if test "x$with_x" = xno; then
41192   # The user explicitly disabled X.
41193   have_x=disabled
41194 else
41195   case $x_includes,$x_libraries in #(


41885       apt-get)
41886         apt_help     $MISSING_DEPENDENCY ;;
41887       yum)
41888         yum_help     $MISSING_DEPENDENCY ;;
41889       port)
41890         port_help    $MISSING_DEPENDENCY ;;
41891       pkgutil)
41892         pkgutil_help $MISSING_DEPENDENCY ;;
41893       pkgadd)
41894         pkgadd_help  $MISSING_DEPENDENCY ;;
41895     esac
41896 
41897     if test "x$PKGHANDLER_COMMAND" != x; then
41898       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
41899     fi
41900   fi
41901 
41902     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
41903   fi
41904 
41905 
41906   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41907     OPENWIN_HOME="/usr/openwin"
41908     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
41909     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
41910         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
41911         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
41912         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
41913   fi
41914 


41915   #
41916   # Weird Sol10 something check...TODO change to try compile
41917   #
41918   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
41919     if test "`uname -r`" = "5.10"; then
41920       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
41921         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
41922       fi
41923     fi
41924   fi
41925 
41926   ac_ext=c
41927 ac_cpp='$CPP $CPPFLAGS'
41928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
41931 
41932   OLD_CFLAGS="$CFLAGS"
41933   CFLAGS="$CFLAGS $X_CFLAGS"
41934 


42193 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42194   cat >>confdefs.h <<_ACEOF
42195 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42196 _ACEOF
42197 
42198             CUPS_FOUND=yes
42199             CUPS_CFLAGS=
42200             DEFAULT_CUPS=yes
42201 
42202 
42203 fi
42204 
42205 done
42206 
42207     fi
42208     if test "x$CUPS_FOUND" = xno; then
42209       # Getting nervous now? Lets poke around for standard Solaris third-party
42210       # package installation locations.
42211       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
42212 $as_echo_n "checking for cups headers... " >&6; }
42213       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
42214         # An SFW package seems to be installed!
42215         CUPS_FOUND=yes
42216         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
42217       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
42218         # A CSW package seems to be installed!
42219         CUPS_FOUND=yes
42220         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
42221       fi
42222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
42223 $as_echo "$CUPS_FOUND" >&6; }
42224     fi
42225     if test "x$CUPS_FOUND" = xno; then
42226 
42227   # Print a helpful message on how to acquire the necessary build dependency.
42228   # cups is the help tag: freetype, cups, pulse, alsa etc
42229   MISSING_DEPENDENCY=cups
42230 
42231   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42232     cygwin_help $MISSING_DEPENDENCY
42233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42234     msys_help $MISSING_DEPENDENCY
42235   else
42236     PKGHANDLER_COMMAND=
42237 
42238     case $PKGHANDLER in
42239       apt-get)
42240         apt_help     $MISSING_DEPENDENCY ;;


42793     fi
42794     else FOUND_FREETYPE=no
42795 
42796   fi
42797 
42798         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42799         if test "x$FOUND_FREETYPE" = xyes; then
42800           if test "x$BUNDLE_FREETYPE" = xyes; then
42801             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
42802 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
42803             FOUND_FREETYPE=no
42804           else
42805             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42806 $as_echo_n "checking for freetype... " >&6; }
42807             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
42808 $as_echo "yes (using builddeps)" >&6; }
42809           fi
42810         fi
42811       fi
42812 
42813       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
42814       if test "x$SYSROOT" = x; then
42815         if test "x$FOUND_FREETYPE" != xyes; then
42816           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
42817           if test "x$PKG_CONFIG" != x; then
42818 
42819 pkg_failed=no
42820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
42821 $as_echo_n "checking for FREETYPE... " >&6; }
42822 
42823 if test -n "$FREETYPE_CFLAGS"; then
42824     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
42825  elif test -n "$PKG_CONFIG"; then
42826     if test -n "$PKG_CONFIG" && \
42827     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
42828   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
42829   ac_status=$?
42830   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42831   test $ac_status = 0; }; then
42832   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
42833 else
42834   pkg_failed=yes


42886               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
42887               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
42888               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
42889               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42890                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
42891               fi
42892               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
42893               if test "x$BUNDLE_FREETYPE" = xyes; then
42894                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
42895 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
42896                 FOUND_FREETYPE=no
42897               else
42898                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
42899 $as_echo_n "checking for freetype... " >&6; }
42900                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
42901 $as_echo "yes (using pkg-config)" >&6; }
42902               fi
42903             fi
42904           fi
42905         fi
42906       fi
42907 
42908       if test "x$FOUND_FREETYPE" != xyes; then
42909         # Check in well-known locations
42910         if test "x$OPENJDK_TARGET_OS" = xwindows; then
42911           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
42912 
42913   windows_path="$FREETYPE_BASE_DIR"
42914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42915     unix_path=`$CYGPATH -u "$windows_path"`
42916     FREETYPE_BASE_DIR="$unix_path"
42917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42919     FREETYPE_BASE_DIR="$unix_path"
42920   fi
42921 
42922 
42923   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
42924   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
42925   METHOD="well-known location"
42926 


43496     fi
43497 
43498     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43499   fi
43500 
43501 
43502     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43504 $as_echo_n "checking for freetype includes... " >&6; }
43505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43506 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43507     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43508     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43509 $as_echo_n "checking for freetype libraries... " >&6; }
43510     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43511 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43512   fi
43513 
43514           fi
43515         else
43516           FREETYPE_BASE_DIR="$SYSROOT/usr"
43517 
43518   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43519   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43520   METHOD="well-known location"
43521 
43522   # First check if the files exists.
43523   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43524     # We found an arbitrary include file. That's a good sign.
43525     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43526 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43527     FOUND_FREETYPE=yes
43528 
43529     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43530     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43531       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43532 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43533       FOUND_FREETYPE=no
43534     else
43535       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43536         # On Windows, we will need both .lib and .dll file.
43537         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43538           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43539 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43540           FOUND_FREETYPE=no
43541         fi
43542       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
43543         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43544         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43545       fi
43546     fi
43547   fi
43548 
43549   if test "x$FOUND_FREETYPE" = xyes; then
43550 
43551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43552 
43553   # Input might be given as Windows format, start by converting to
43554   # unix format.
43555   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43556   new_path=`$CYGPATH -u "$path"`
43557 
43558   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43559   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43560   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43561   # "foo.exe" is OK but "foo" is an error.
43562   #
43563   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43564   # It is also a way to make sure we got the proper file name for the real test later on.
43565   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43566   if test "x$test_shortpath" = x; then
43567     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43568 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43569     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43570   fi
43571 
43572   # Call helper function which possibly converts this using DOS-style short mode.
43573   # If so, the updated path is stored in $new_path.
43574 
43575   input_path="$new_path"
43576   # Check if we need to convert this using DOS-style short mode. If the path
43577   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43578   # take no chances and rewrite it.
43579   # Note: m4 eats our [], so we need to use [ and ] instead.
43580   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43581   if test "x$has_forbidden_chars" != x; then
43582     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43583     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43584     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43585     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43586       # Going to short mode and back again did indeed matter. Since short mode is
43587       # case insensitive, let's make it lowercase to improve readability.
43588       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43589       # Now convert it back to Unix-stile (cygpath)
43590       input_path=`$CYGPATH -u "$shortmode_path"`
43591       new_path="$input_path"
43592     fi
43593   fi
43594 
43595   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43596   if test "x$test_cygdrive_prefix" = x; then
43597     # As a simple fix, exclude /usr/bin since it's not a real path.
43598     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43599       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43600       # a path prefixed by /cygdrive for fixpath to work.
43601       new_path="$CYGWIN_ROOT_PATH$input_path"
43602     fi
43603   fi
43604 
43605 
43606   if test "x$path" != "x$new_path"; then
43607     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43608     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43609 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43610   fi
43611 
43612   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43613 
43614   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43615   has_colon=`$ECHO $path | $GREP ^.:`
43616   new_path="$path"
43617   if test "x$has_colon" = x; then
43618     # Not in mixed or Windows style, start by that.
43619     new_path=`cmd //c echo $path`
43620   fi
43621 
43622 
43623   input_path="$new_path"
43624   # Check if we need to convert this using DOS-style short mode. If the path
43625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43626   # take no chances and rewrite it.
43627   # Note: m4 eats our [], so we need to use [ and ] instead.
43628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43629   if test "x$has_forbidden_chars" != x; then
43630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43631     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43632   fi
43633 
43634 
43635   windows_path="$new_path"
43636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43637     unix_path=`$CYGPATH -u "$windows_path"`
43638     new_path="$unix_path"
43639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43641     new_path="$unix_path"
43642   fi
43643 
43644   if test "x$path" != "x$new_path"; then
43645     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43646     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43647 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43648   fi
43649 
43650   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43651   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43652 
43653   else
43654     # We're on a posix platform. Hooray! :)
43655     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43656     has_space=`$ECHO "$path" | $GREP " "`
43657     if test "x$has_space" != x; then
43658       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43659 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43660       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43661     fi
43662 
43663     # Use eval to expand a potential ~
43664     eval path="$path"
43665     if test ! -f "$path" && test ! -d "$path"; then
43666       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43667     fi
43668 
43669     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43670   fi
43671 
43672 
43673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43674 
43675   # Input might be given as Windows format, start by converting to
43676   # unix format.
43677   path="$POTENTIAL_FREETYPE_LIB_PATH"
43678   new_path=`$CYGPATH -u "$path"`
43679 
43680   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43681   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43682   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43683   # "foo.exe" is OK but "foo" is an error.
43684   #
43685   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43686   # It is also a way to make sure we got the proper file name for the real test later on.
43687   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43688   if test "x$test_shortpath" = x; then
43689     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43690 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43691     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43692   fi
43693 
43694   # Call helper function which possibly converts this using DOS-style short mode.
43695   # If so, the updated path is stored in $new_path.
43696 
43697   input_path="$new_path"
43698   # Check if we need to convert this using DOS-style short mode. If the path
43699   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43700   # take no chances and rewrite it.
43701   # Note: m4 eats our [], so we need to use [ and ] instead.
43702   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43703   if test "x$has_forbidden_chars" != x; then
43704     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43705     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43706     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43707     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43708       # Going to short mode and back again did indeed matter. Since short mode is
43709       # case insensitive, let's make it lowercase to improve readability.
43710       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43711       # Now convert it back to Unix-stile (cygpath)
43712       input_path=`$CYGPATH -u "$shortmode_path"`
43713       new_path="$input_path"
43714     fi
43715   fi
43716 
43717   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43718   if test "x$test_cygdrive_prefix" = x; then
43719     # As a simple fix, exclude /usr/bin since it's not a real path.
43720     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43721       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43722       # a path prefixed by /cygdrive for fixpath to work.
43723       new_path="$CYGWIN_ROOT_PATH$input_path"
43724     fi
43725   fi
43726 
43727 
43728   if test "x$path" != "x$new_path"; then
43729     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43731 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43732   fi
43733 
43734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43735 
43736   path="$POTENTIAL_FREETYPE_LIB_PATH"
43737   has_colon=`$ECHO $path | $GREP ^.:`
43738   new_path="$path"
43739   if test "x$has_colon" = x; then
43740     # Not in mixed or Windows style, start by that.
43741     new_path=`cmd //c echo $path`
43742   fi
43743 
43744 
43745   input_path="$new_path"
43746   # Check if we need to convert this using DOS-style short mode. If the path
43747   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43748   # take no chances and rewrite it.
43749   # Note: m4 eats our [], so we need to use [ and ] instead.
43750   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43751   if test "x$has_forbidden_chars" != x; then
43752     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43753     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43754   fi
43755 
43756 
43757   windows_path="$new_path"
43758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43759     unix_path=`$CYGPATH -u "$windows_path"`
43760     new_path="$unix_path"
43761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43763     new_path="$unix_path"
43764   fi
43765 
43766   if test "x$path" != "x$new_path"; then
43767     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43768     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43769 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43770   fi
43771 
43772   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43773   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43774 
43775   else
43776     # We're on a posix platform. Hooray! :)
43777     path="$POTENTIAL_FREETYPE_LIB_PATH"
43778     has_space=`$ECHO "$path" | $GREP " "`
43779     if test "x$has_space" != x; then
43780       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43781 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43782       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43783     fi
43784 
43785     # Use eval to expand a potential ~
43786     eval path="$path"
43787     if test ! -f "$path" && test ! -d "$path"; then
43788       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43789     fi
43790 
43791     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43792   fi
43793 
43794 
43795     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43797 $as_echo_n "checking for freetype includes... " >&6; }
43798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43799 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43800     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43801     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43802 $as_echo_n "checking for freetype libraries... " >&6; }
43803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43804 $as_echo "$FREETYPE_LIB_PATH" >&6; }
43805   fi
43806 
43807 
43808           if test "x$FOUND_FREETYPE" != xyes; then
43809             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
43810 
43811   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43812   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43813   METHOD="well-known location"
43814 
43815   # First check if the files exists.
43816   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43817     # We found an arbitrary include file. That's a good sign.
43818     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43819 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43820     FOUND_FREETYPE=yes
43821 
43822     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43823     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43824       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43825 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43826       FOUND_FREETYPE=no
43827     else
43828       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43829         # On Windows, we will need both .lib and .dll file.


44080     if test ! -f "$path" && test ! -d "$path"; then
44081       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44082     fi
44083 
44084     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44085   fi
44086 
44087 
44088     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44090 $as_echo_n "checking for freetype includes... " >&6; }
44091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44092 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44093     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44095 $as_echo_n "checking for freetype libraries... " >&6; }
44096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44097 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44098   fi
44099 
44100           fi
44101 
44102           if test "x$FOUND_FREETYPE" != xyes; then
44103             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
44104 
44105   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44106   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44107   METHOD="well-known location"
44108 
44109   # First check if the files exists.
44110   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44111     # We found an arbitrary include file. That's a good sign.
44112     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44113 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44114     FOUND_FREETYPE=yes
44115 
44116     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44117     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44118       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44119 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44120       FOUND_FREETYPE=no
44121     else
44122       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44123         # On Windows, we will need both .lib and .dll file.


44377 
44378     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44379   fi
44380 
44381 
44382     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44384 $as_echo_n "checking for freetype includes... " >&6; }
44385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44386 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44387     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44388     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44389 $as_echo_n "checking for freetype libraries... " >&6; }
44390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44391 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44392   fi
44393 
44394           fi
44395 
44396           if test "x$FOUND_FREETYPE" != xyes; then
44397             FREETYPE_BASE_DIR="$SYSROOT/usr"
44398             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44399 
44400   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44401   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
44402   METHOD="well-known location"
44403 
44404   # First check if the files exists.
44405   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44406     # We found an arbitrary include file. That's a good sign.
44407     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44408 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44409     FOUND_FREETYPE=yes
44410 
44411     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44412     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44413       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44414 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44415       FOUND_FREETYPE=no
44416     else
44417       if test "x$OPENJDK_TARGET_OS" = xwindows; then


45853       fi
45854       ALSA=$depdir
45855       if test "x$theroot" != x; then
45856         ALSA="$theroot"
45857       fi
45858       if test "x$thecflags" != x; then
45859         ALSA_CFLAGS="$thecflags"
45860       fi
45861       if test "x$thelibs" != x; then
45862         ALSA_LIBS="$thelibs"
45863       fi
45864       ALSA_FOUND=yes
45865       else ALSA_FOUND=no
45866 
45867     fi
45868     else ALSA_FOUND=no
45869 
45870   fi
45871 
45872     fi
45873     # Do not try pkg-config if we have a sysroot set.
45874     if test "x$SYSROOT" = x; then
45875       if test "x$ALSA_FOUND" = xno; then
45876 
45877 pkg_failed=no
45878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
45879 $as_echo_n "checking for ALSA... " >&6; }
45880 
45881 if test -n "$ALSA_CFLAGS"; then
45882     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
45883  elif test -n "$PKG_CONFIG"; then
45884     if test -n "$PKG_CONFIG" && \
45885     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
45886   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
45887   ac_status=$?
45888   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45889   test $ac_status = 0; }; then
45890   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
45891 else
45892   pkg_failed=yes
45893 fi
45894  else


45924                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
45925         else
45926                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
45927         fi
45928         # Put the nasty error message in config.log where it belongs
45929         echo "$ALSA_PKG_ERRORS" >&5
45930 
45931         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45932 $as_echo "no" >&6; }
45933                 ALSA_FOUND=no
45934 elif test $pkg_failed = untried; then
45935         ALSA_FOUND=no
45936 else
45937         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
45938         ALSA_LIBS=$pkg_cv_ALSA_LIBS
45939         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45940 $as_echo "yes" >&6; }
45941         ALSA_FOUND=yes
45942 fi
45943       fi
45944     fi
45945     if test "x$ALSA_FOUND" = xno; then
45946       for ac_header in alsa/asoundlib.h
45947 do :
45948   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
45949 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
45950   cat >>confdefs.h <<_ACEOF
45951 #define HAVE_ALSA_ASOUNDLIB_H 1
45952 _ACEOF
45953 
45954             ALSA_FOUND=yes
45955             ALSA_CFLAGS=-Iignoreme
45956             ALSA_LIBS=-lasound
45957             DEFAULT_ALSA=yes
45958 
45959 else
45960   ALSA_FOUND=no
45961 fi
45962 
45963 done
45964 


46691       fi
46692     done
46693 
46694     unset LLVM_LIBS
46695     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
46696       if echo "${flag}" | grep -q '^-l'; then
46697         if test "${LLVM_LIBS}" != ""; then
46698           LLVM_LIBS="${LLVM_LIBS} "
46699         fi
46700         LLVM_LIBS="${LLVM_LIBS}${flag}"
46701       fi
46702     done
46703 
46704 
46705 
46706 
46707   fi
46708 
46709   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
46710   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
46711     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
46712   fi
46713 
46714   # TODO better (platform agnostic) test
46715   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
46716     LIBCXX="-lstdc++"
46717   fi
46718 
46719 
46720 
46721 
46722   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
46723 
46724 
46725 # Check whether --with-msvcr-dll was given.
46726 if test "${with_msvcr_dll+set}" = set; then :
46727   withval=$with_msvcr_dll;
46728 fi
46729 
46730 
46731   if test "x$with_msvcr_dll" != x; then


47616 
47617 
47618 
47619 
47620 # Setup use of ccache, if available
47621 
47622   # Check whether --enable-ccache was given.
47623 if test "${enable_ccache+set}" = set; then :
47624   enableval=$enable_ccache;
47625 fi
47626 
47627 
47628   CCACHE=
47629   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
47630 $as_echo_n "checking is ccache enabled... " >&6; }
47631   ENABLE_CCACHE=$enable_ccache
47632   if test "x$enable_ccache" = xyes; then
47633     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47634 $as_echo "yes" >&6; }
47635     OLD_PATH="$PATH"
47636     if test "x$TOOLCHAIN_PATH" != x; then
47637       PATH=$TOOLCHAIN_PATH:$PATH
47638     fi
47639 
47640 
47641 
47642   # Publish this variable in the help.
47643 
47644 
47645   if test "x$CCACHE" = x; then
47646     # The variable is not set by user, try to locate tool using the code snippet
47647     for ac_prog in ccache
47648 do
47649   # Extract the first word of "$ac_prog", so it can be a program name with args.
47650 set dummy $ac_prog; ac_word=$2
47651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47652 $as_echo_n "checking for $ac_word... " >&6; }
47653 if ${ac_cv_path_CCACHE+:} false; then :
47654   $as_echo_n "(cached) " >&6
47655 else
47656   case $CCACHE in
47657   [\\/]* | ?:[\\/]*)


< prev index next >