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_LIBPNG
657 PNG_LIBS
658 PNG_CFLAGS
659 USE_EXTERNAL_LIBGIF
660 USE_EXTERNAL_LIBJPEG
661 ALSA_LIBS
662 ALSA_CFLAGS
663 FREETYPE_BUNDLE_LIB_PATH
664 FREETYPE_LIBS
665 FREETYPE_CFLAGS
666 CUPS_CFLAGS
667 OPENWIN_HOME
668 X_EXTRA_LIBS
669 X_LIBS
670 X_PRE_LIBS
671 X_CFLAGS
672 XMKMF
673 FIXPATH
674 ZIP_DEBUGINFO_FILES
675 ENABLE_DEBUG_SYMBOLS
676 CFLAGS_WARNINGS_ARE_ERRORS
677 COMPILER_SUPPORTS_TARGET_BITS_FLAG
678 ZERO_ARCHFLAG
679 LDFLAGS_CXX_JDK
680 LDFLAGS_JDKEXE_SUFFIX
681 LDFLAGS_JDKLIB_SUFFIX
682 LDFLAGS_JDKEXE
683 LDFLAGS_JDKLIB
684 CXXFLAGS_JDKEXE
685 CXXFLAGS_JDKLIB
686 CFLAGS_JDKEXE
687 CFLAGS_JDKLIB
691 LEGACY_EXTRA_CFLAGS
692 CXX_O_FLAG_NONE
693 CXX_O_FLAG_NORM
694 CXX_O_FLAG_HI
695 CXX_O_FLAG_HIGHEST
696 C_O_FLAG_NONE
697 C_O_FLAG_NORM
698 C_O_FLAG_HI
699 C_O_FLAG_HIGHEST
700 CXXFLAGS_DEBUG_SYMBOLS
701 CFLAGS_DEBUG_SYMBOLS
702 CXX_FLAG_DEPS
703 C_FLAG_DEPS
704 SET_SHARED_LIBRARY_MAPFILE
705 SET_SHARED_LIBRARY_NAME
706 SET_SHARED_LIBRARY_ORIGIN
707 SET_EXECUTABLE_ORIGIN
708 SHARED_LIBRARY_FLAGS
709 CXX_FLAG_REORDER
710 C_FLAG_REORDER
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
743 STRIP
744 DUMPBIN
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 ac_ct_CXX
759 CXXFLAGS
760 CXX
761 ac_ct_PROPER_COMPILER_CXX
762 PROPER_COMPILER_CXX
763 TOOLS_DIR_CXX
764 POTENTIAL_CXX
765 OBJEXT
766 EXEEXT
767 ac_ct_CC
768 CPPFLAGS
769 LDFLAGS
770 CFLAGS
771 CC
772 ac_ct_PROPER_COMPILER_CC
773 PROPER_COMPILER_CC
774 TOOLS_DIR_CC
775 POTENTIAL_CC
776 VS_PATH
777 VS_LIB
778 VS_INCLUDE
779 CYGWIN_LINK
780 EXE_SUFFIX
781 OBJ_SUFFIX
782 STATIC_LIBRARY
783 SHARED_LIBRARY
784 STATIC_LIBRARY_SUFFIX
785 SHARED_LIBRARY_SUFFIX
786 LIBRARY_PREFIX
787 TOOLCHAIN_TYPE
788 BUILD_HOTSPOT
789 HOTSPOT_DIST
790 BUILD_OUTPUT
791 OVERRIDE_SRC_ROOT
792 ADD_SRC_ROOT
793 JDK_TOPDIR
794 NASHORN_TOPDIR
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 SYS_ROOT
891 TOPDIR
892 PATH_SEP
893 ZERO_ARCHDEF
894 DEFINE_CROSS_COMPILE_ARCH
895 LP64
896 OPENJDK_TARGET_OS_EXPORT_DIR
897 OPENJDK_TARGET_OS_API_DIR
898 OPENJDK_TARGET_CPU_JLI_CFLAGS
899 OPENJDK_TARGET_CPU_OSARCH
900 OPENJDK_TARGET_CPU_ISADIR
901 OPENJDK_TARGET_CPU_LIBDIR
902 OPENJDK_TARGET_CPU_LEGACY_LIB
903 OPENJDK_TARGET_CPU_LEGACY
904 REQUIRED_OS_VERSION
905 REQUIRED_OS_NAME
906 COMPILE_TYPE
907 OPENJDK_TARGET_CPU_ENDIAN
908 OPENJDK_TARGET_CPU_BITS
909 OPENJDK_TARGET_CPU_ARCH
910 OPENJDK_TARGET_CPU
1003 datadir
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_target_bits
1023 with_sys_root
1024 with_tools_dir
1025 with_devkit
1026 enable_openjdk_only
1027 with_custom_make_dir
1028 with_jdk_variant
1029 with_jvm_interpreter
1030 with_jvm_variants
1031 enable_debug
1032 with_debug_level
1033 with_conf_name
1034 with_builddeps_conf
1035 with_builddeps_server
1036 with_builddeps_dir
1037 with_builddeps_group
1038 enable_headful
1039 enable_hotspot_test_in_build
1040 with_cacerts_file
1041 enable_unlimited_crypto
1042 enable_rmiconnector_iiop
1043 with_milestone
1044 with_update_version
1045 with_user_release_suffix
1046 with_build_number
1047 with_boot_jdk
1048 with_boot_jdk_jvmargs
1049 with_add_source_root
1050 with_override_source_root
1051 with_adds_and_overrides
1052 with_override_langtools
1831 --enable-macosx-runtime-support
1832 Deprecated. Option is kept for backwards
1833 compatibility and is ignored
1834 --disable-freetype-bundling
1835 disable bundling of the freetype library with the
1836 build result [enabled on Windows or when using
1837 --with-freetype, disabled otherwise]
1838 --enable-sjavac use sjavac to do fast incremental compiles
1839 [disabled]
1840 --disable-precompiled-headers
1841 disable using precompiled headers when compiling C++
1842 [enabled]
1843 --enable-ccache enable using ccache to speed up recompilations
1844 [disabled]
1845
1846 Optional Packages:
1847 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1848 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1849 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
1850 support it), e.g. --with-target-bits=32 [guessed]
1851 --with-sys-root pass this sys-root to the compilers and tools (for
1852 cross-compiling)
1853 --with-tools-dir search this directory for compilers and tools (for
1854 cross-compiling)
1855 --with-devkit use this directory as base for tools-dir and
1856 sys-root (for cross-compiling)
1857 --with-custom-make-dir Deprecated. Option is kept for backwards
1858 compatibility and is ignored
1859 --with-jdk-variant JDK variant to build (normal) [normal]
1860 --with-jvm-interpreter JVM interpreter to build (template, cpp) [template]
1861 --with-jvm-variants JVM variants (separated by commas) to build (server,
1862 client, minimal1, kernel, zero, zeroshark, core)
1863 [server]
1864 --with-debug-level set the debug level (release, fastdebug, slowdebug,
1865 optimized (HotSpot build only)) [release]
1866 --with-conf-name use this as the name of the configuration [generated
1867 from important configuration options]
1868 --with-builddeps-conf use this configuration file for the builddeps
1869 --with-builddeps-server download and use build dependencies from this server
1870 url
1871 --with-builddeps-dir store downloaded build dependencies here
1872 [/localhome/builddeps]
1873 --with-builddeps-group chgrp the downloaded build dependencies to this
1874 group
1875 --with-cacerts-file specify alternative cacerts file
1876 --with-milestone Set milestone value for build [internal]
1877 --with-update-version Set update version value for build [b00]
1878 --with-user-release-suffix
1879 Add a custom string to the version string if build
1880 number is not set.[username_builddateb00]
1881 --with-build-number Set build number value for build [b00]
1882 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
1883 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1884 invocations of boot JDK, overriding the default
1885 values, e.g --with-boot-jdk-jvmargs="-Xmx8G
3308 # version 2 for more details (a copy is included in the LICENSE file that
3309 # accompanied this code).
3310 #
3311 # You should have received a copy of the GNU General Public License version
3312 # 2 along with this work; if not, write to the Free Software Foundation,
3313 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314 #
3315 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316 # or visit www.oracle.com if you need additional information or have any
3317 # questions.
3318 #
3319
3320 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3321 # If so, then append $1 to $2 \
3322 # Also set JVM_ARG_OK to true/false depending on outcome.
3323
3324
3325 # Appends a string to a path variable, only adding the : when needed.
3326
3327
3328 # This will make sure the given variable points to a full and proper
3329 # path. This means:
3330 # 1) There will be no spaces in the path. On posix platforms,
3331 # spaces in the path will result in an error. On Windows,
3332 # the path will be rewritten using short-style to be space-free.
3333 # 2) The path will be absolute, and it will be in unix-style (on
3334 # cygwin).
3335 # $1: The name of the variable to fix
3336
3337
3338 # This will make sure the given variable points to a executable
3339 # with a full and proper path. This means:
3340 # 1) There will be no spaces in the path. On posix platforms,
3341 # spaces in the path will result in an error. On Windows,
3342 # the path will be rewritten using short-style to be space-free.
3343 # 2) The path will be absolute, and it will be in unix-style (on
3344 # cygwin).
3345 # Any arguments given to the executable is preserved.
3346 # If the input variable does not have a directory specification, then
3347 # it need to be in the PATH.
3390 # $2: executable name (or list of names) to look for
3391
3392
3393 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3394 # $1: variable to set
3395 # $2: autoconf macro to call to look for the special tool
3396
3397
3398 # Setup the most fundamental tools that relies on not much else to set up,
3399 # but is used by much of the early bootstrap code.
3400
3401
3402 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3403
3404
3405
3406
3407
3408
3409
3410 #%%% Simple tools %%%
3411
3412 # Check if we have found a usable version of make
3413 # $1: the path to a potential make binary (or empty)
3414 # $2: the description on how we found this
3415
3416
3417 # Goes looking for a usable version of GNU make.
3418
3419
3420
3421
3422
3423
3424 # Check if build directory is on local disk. If not possible to determine,
3425 # we prefer to claim it's local.
3426 # Argument 1: directory to test
3427 # Argument 2: what to do if it is on local disk
3428 # Argument 3: what to do otherwise (remote disk or failure)
3429
4216
4217 # Check if the VS env variables were setup prior to running configure.
4218 # If not, then find vcvarsall.bat and run it automatically, and integrate
4219 # the set env variables into the spec file.
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230 # This line needs to be here, verbatim, after all includes and the dummy hook
4231 # definitions. It is replaced with custom functionality when building
4232 # custom sources.
4233 #CUSTOM_AUTOCONF_INCLUDE
4234
4235 # Do not change or remove the following line, it is needed for consistency checks:
4236 DATE_WHEN_GENERATED=1395652496
4237
4238 ###############################################################################
4239 #
4240 # Initialization / Boot-strapping
4241 #
4242 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4243 # thus it jumps back and forth, each time gaining something needed later on.
4244 #
4245 ###############################################################################
4246
4247 # If we are requested to print additional help, do that and then exit.
4248 # This must be the very first call.
4249
4250 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4251 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4252 $PRINTF "Which are valid to use depends on the build platform.\n"
4253 for toolchain in $VALID_TOOLCHAINS_all; do
4254 # Use indirect variable referencing
4255 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4256 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
14223 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14224 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14225 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14226 fi
14227
14228 # Use eval to expand a potential ~
14229 eval path="$path"
14230 if test ! -f "$path" && test ! -d "$path"; then
14231 as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14232 fi
14233
14234 TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14235 fi
14236
14237 # SRC_ROOT is a traditional alias for TOPDIR.
14238 SRC_ROOT=$TOPDIR
14239
14240 # Locate the directory of this script.
14241 AUTOCONF_DIR=$TOPDIR/common/autoconf
14242
14243 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14244 # Add extra search paths on solaris for utilities like ar and as etc...
14245 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14246 fi
14247
14248 # You can force the sys-root if the sys-root encoded into the cross compiler tools
14249 # is not correct.
14250
14251 # Check whether --with-sys-root was given.
14252 if test "${with_sys_root+set}" = set; then :
14253 withval=$with_sys_root;
14254 fi
14255
14256
14257 if test "x$with_sys_root" != x; then
14258 SYS_ROOT=$with_sys_root
14259 else
14260 SYS_ROOT=/
14261 fi
14262
14263
14264
14265 # Check whether --with-tools-dir was given.
14266 if test "${with_tools_dir+set}" = set; then :
14267 withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14268
14269 fi
14270
14271
14272
14273 # Check whether --with-devkit was given.
14274 if test "${with_devkit+set}" = set; then :
14275 withval=$with_devkit;
14276 if test "x$with_sys_root" != x; then
14277 as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14278 fi
14279
14280 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14281
14282 # Input might be given as Windows format, start by converting to
14283 # unix format.
14284 path="$with_devkit"
14285 new_path=`$CYGPATH -u "$path"`
14286
14287 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14288 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14289 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14290 # "foo.exe" is OK but "foo" is an error.
14291 #
14292 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14293 # It is also a way to make sure we got the proper file name for the real test later on.
14294 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14295 if test "x$test_shortpath" = x; then
14296 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14297 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14298 as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14299 fi
14300
14301 # Call helper function which possibly converts this using DOS-style short mode.
14302 # If so, the updated path is stored in $new_path.
14303
14304 input_path="$new_path"
14305 # Check if we need to convert this using DOS-style short mode. If the path
14306 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14307 # take no chances and rewrite it.
14308 # Note: m4 eats our [], so we need to use [ and ] instead.
14309 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14310 if test "x$has_forbidden_chars" != x; then
14311 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14312 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14313 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14314 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14315 # Going to short mode and back again did indeed matter. Since short mode is
14316 # case insensitive, let's make it lowercase to improve readability.
14317 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14318 # Now convert it back to Unix-stile (cygpath)
14319 input_path=`$CYGPATH -u "$shortmode_path"`
14320 new_path="$input_path"
14321 fi
14322 fi
14323
14324 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14325 if test "x$test_cygdrive_prefix" = x; then
14326 # As a simple fix, exclude /usr/bin since it's not a real path.
14327 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14328 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14329 # a path prefixed by /cygdrive for fixpath to work.
14330 new_path="$CYGWIN_ROOT_PATH$input_path"
14331 fi
14332 fi
14333
14334
14335 if test "x$path" != "x$new_path"; then
14336 with_devkit="$new_path"
14337 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14338 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14339 fi
14340
14341 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14342
14343 path="$with_devkit"
14344 has_colon=`$ECHO $path | $GREP ^.:`
14345 new_path="$path"
14346 if test "x$has_colon" = x; then
14347 # Not in mixed or Windows style, start by that.
14348 new_path=`cmd //c echo $path`
14349 fi
14350
14351
14352 input_path="$new_path"
14353 # Check if we need to convert this using DOS-style short mode. If the path
14354 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14355 # take no chances and rewrite it.
14356 # Note: m4 eats our [], so we need to use [ and ] instead.
14357 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14358 if test "x$has_forbidden_chars" != x; then
14359 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14360 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14361 fi
14362
14363
14364 windows_path="$new_path"
14365 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14366 unix_path=`$CYGPATH -u "$windows_path"`
14367 new_path="$unix_path"
14368 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14369 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14370 new_path="$unix_path"
14371 fi
14372
14373 if test "x$path" != "x$new_path"; then
14374 with_devkit="$new_path"
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14376 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14377 fi
14378
14379 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14380 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14381
14382 else
14383 # We're on a posix platform. Hooray! :)
14384 path="$with_devkit"
14385 has_space=`$ECHO "$path" | $GREP " "`
14386 if test "x$has_space" != x; then
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14388 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14389 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14390 fi
14391
14392 # Use eval to expand a potential ~
14393 eval path="$path"
14394 if test ! -f "$path" && test ! -d "$path"; then
14395 as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14396 fi
14397
14398 with_devkit="`cd "$path"; $THEPWDCMD -L`"
14399 fi
14400
14401
14402 if test "x$TOOLS_DIR" = x; then
14403 TOOLS_DIR="$with_devkit/bin"
14404 else
14405 TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14406 fi
14407
14408 if test -d "$with_devkit/$host_alias/libc"; then
14409 SYS_ROOT=$with_devkit/$host_alias/libc
14410 elif test -d "$with_devkit/$host/sys-root"; then
14411 SYS_ROOT=$with_devkit/$host/sys-root
14412 fi
14413
14414 fi
14415
14416
14417
14418 # Setup default logging of stdout and stderr to build.log in the output root.
14419 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14420 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14421 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14422
14423
14424
14425
14426
14427 # Check if it's a pure open build or if custom sources are to be used.
14428
14429 # Check whether --enable-openjdk-only was given.
14430 if test "${enable_openjdk_only+set}" = set; then :
14431 enableval=$enable_openjdk_only;
14432 else
14433 enable_openjdk_only="no"
14434 fi
14435
14436
14783 # On Macosx universal binaries are produced, but they only contain
14784 # 64 bit intel. This invalidates control of which jvms are built
14785 # from configure, but only server is valid anyway. Fix this
14786 # when hotspot makefiles are rewritten.
14787 if test "x$MACOSX_UNIVERSAL" = xtrue; then
14788 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14789 fi
14790
14791 #####
14792
14793
14794
14795
14796
14797
14798
14799
14800 # With basic setup done, call the custom early hook.
14801
14802
14803 # To properly create a configuration name, we need to have the OpenJDK target
14804 # and options (variants and debug level) parsed.
14805
14806
14807
14808 # Check whether --with-conf-name was given.
14809 if test "${with_conf_name+set}" = set; then :
14810 withval=$with_conf_name; CONF_NAME=${with_conf_name}
14811 fi
14812
14813
14814 # Test from where we are running configure, in or outside of src root.
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14816 $as_echo_n "checking where to store configuration... " >&6; }
14817 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14818 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14819 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14820 # We are running configure from the src root.
14821 # Create a default ./build/target-variant-debuglevel output root.
14822 if test "x${CONF_NAME}" = x; then
16090 if test "x$arguments" != xEOL; then
16091 new_complete="$new_path ${arguments% *}"
16092 else
16093 new_complete="$new_path"
16094 fi
16095
16096 if test "x$complete" != "x$new_complete"; then
16097 FOUND_MAKE="$new_complete"
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16099 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16100 fi
16101
16102 fi
16103 fi
16104 fi
16105 fi
16106
16107 fi
16108
16109 if test "x$FOUND_MAKE" = x; then
16110 if test "x$TOOLS_DIR" != x; then
16111 # We have a tools-dir, check that as well before giving up.
16112 OLD_PATH=$PATH
16113 PATH=$TOOLS_DIR:$PATH
16114 for ac_prog in gmake
16115 do
16116 # Extract the first word of "$ac_prog", so it can be a program name with args.
16117 set dummy $ac_prog; ac_word=$2
16118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16119 $as_echo_n "checking for $ac_word... " >&6; }
16120 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16121 $as_echo_n "(cached) " >&6
16122 else
16123 case $CHECK_TOOLSDIR_GMAKE in
16124 [\\/]* | ?:[\\/]*)
16125 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16126 ;;
16127 *)
16128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16129 for as_dir in $PATH
16130 do
16131 IFS=$as_save_IFS
16132 test -z "$as_dir" && as_dir=.
16133 for ac_exec_ext in '' $ac_executable_extensions; do
27331 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27332 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27333 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27334 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27335 as_fn_error $? "Cannot continue" "$LINENO" 5
27336 fi
27337
27338 fi
27339
27340 # autoconf magic only relies on PATH, so update it if tools dir is specified
27341 OLD_PATH="$PATH"
27342
27343 # For solaris we really need solaris tools, and not the GNU equivalent.
27344 # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27345 # so add that to path before starting to probe.
27346 # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27347 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27348 PATH="/usr/ccs/bin:$PATH"
27349 fi
27350
27351 # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27352 # override all other locations.
27353 if test "x$TOOLS_DIR" != x; then
27354 PATH=$TOOLS_DIR:$PATH
27355 fi
27356
27357 # If a devkit is found on the builddeps server, then prepend its path to the
27358 # PATH variable. If there are cross compilers available in the devkit, these
27359 # will be found by AC_PROG_CC et al.
27360 DEVKIT=
27361
27362
27363 if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27364 # Source the builddeps file again, to make sure it uses the latest variables!
27365 . $builddepsfile
27366 # Look for a target and build machine specific resource!
27367 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27368 if test "x$resource" = x; then
27369 # Ok, lets instead look for a target specific resource
27370 eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27371 fi
27372 if test "x$resource" = x; then
27373 # Ok, lets instead look for a build specific resource
27374 eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27375 fi
27376 if test "x$resource" = x; then
27377 # Ok, lets instead look for a generic resource
27378 # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27379 resource=${builddep_devkit}
27380 fi
27381 if test "x$resource" != x; then
27382 { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27383 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27384 # If the resource in the builddeps.conf file is an existing directory,
27385 # for example /java/linux/cups
27386 if test -d ${resource}; then
27387 depdir=${resource}
27388 else
27389
27390 # devkit is for example mymodule
27391 # $resource is for example libs/general/libmymod_1_2_3.zip
27392 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27393 # $with_builddeps_dir is for example /localhome/builddeps
27394 # depdir is the name of the variable into which we store the depdir, eg MYMOD
27395 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27396 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27397 filename=`basename $resource`
27398 filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27399 filebase=${filename%%.*}
27400 extension=${filename#*.}
27401 installdir=$with_builddeps_dir/$filebase
27402 if test ! -f $installdir/$filename.unpacked; then
27403 { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27404 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27405 if test ! -d $installdir; then
27406 mkdir -p $installdir
27407 fi
27408 if test ! -d $installdir; then
27409 as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27410 fi
27411 tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27412 touch $tmpfile
27413 if test ! -f $tmpfile; then
27414 as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27415 fi
27416
27417 # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip
27418 # $tmpfile is the local file name for the downloaded file.
27419 VALID_TOOL=no
27420 if test "x$BDEPS_FTP" = xwget; then
27421 VALID_TOOL=yes
27422 wget -O $tmpfile $with_builddeps_server/$resource
27423 fi
27424 if test "x$BDEPS_FTP" = xlftp; then
27425 VALID_TOOL=yes
27426 lftp -c "get $with_builddeps_server/$resource -o $tmpfile"
27427 fi
27428 if test "x$BDEPS_FTP" = xftp; then
27429 VALID_TOOL=yes
27430 FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'`
27431 FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'`
27432 FTPUSERPWD=${FTPSERVER%%@*}
27433 if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27434 FTPUSER=${userpwd%%:*}
27435 FTPPWD=${userpwd#*@}
27436 FTPSERVER=${FTPSERVER#*@}
27437 else
27438 FTPUSER=ftp
27439 FTPPWD=ftp
27440 fi
27441 # the "pass" command does not work on some
27442 # ftp clients (read ftp.exe) but if it works,
27443 # passive mode is better!
27444 ( \
27445 echo "user $FTPUSER $FTPPWD" ; \
27446 echo "pass" ; \
27447 echo "bin" ; \
27448 echo "get $FTPPATH $tmpfile" ; \
27449 ) | ftp -in $FTPSERVER
27450 fi
27451 if test "x$VALID_TOOL" != xyes; then
27452 as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27453 fi
27454
27455 mv $tmpfile $installdir/$filename
27456 if test ! -s $installdir/$filename; then
27457 as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27458 fi
27459 case "$extension" in
27460 zip) echo "Unzipping $installdir/$filename..."
27461 (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27462 ;;
27463 tar.gz) echo "Untaring $installdir/$filename..."
27464 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27465 ;;
27466 tgz) echo "Untaring $installdir/$filename..."
27467 (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27468 ;;
27469 *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27470 ;;
27471 esac
27472 fi
27473 if test -f $installdir/$filename.unpacked; then
27474 depdir=$installdir
27475 fi
27476
27477 fi
27478 # Source the builddeps file again, because in the previous command, the depdir
27479 # was updated to point at the current build dependency install directory.
27480 . $builddepsfile
27481 # Now extract variables from the builddeps.conf files.
27482 theroot=${builddep_devkit_ROOT}
27483 thecflags=${builddep_devkit_CFLAGS}
27484 thelibs=${builddep_devkit_LIBS}
27485 if test "x$depdir" = x; then
27486 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27487 fi
27488 DEVKIT=$depdir
27489 if test "x$theroot" != x; then
27490 DEVKIT="$theroot"
27491 fi
27492 if test "x$thecflags" != x; then
27493 DEVKIT_CFLAGS="$thecflags"
27494 fi
27495 if test "x$thelibs" != x; then
27496 DEVKIT_LIBS="$thelibs"
27497 fi
27498
27499 # Found devkit
27500 PATH="$DEVKIT/bin:$PATH"
27501 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27502 if test "x$x_includes" = "xNONE"; then
27503 x_includes="$SYS_ROOT/usr/include/X11"
27504 fi
27505 if test "x$x_libraries" = "xNONE"; then
27506 x_libraries="$SYS_ROOT/usr/lib"
27507 fi
27508
27509
27510 fi
27511
27512 fi
27513
27514
27515
27516 #
27517 # Setup the compilers (CC and CXX)
27518 #
27519
27520 COMPILER_NAME=C
27521 SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27522
27523 if test "x$CC" != x; then
27524 # User has supplied compiler name already, always let that override.
27525 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27526 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27527 if test "x`basename $CC`" = "x$CC"; then
27528 # A command without a complete path is provided, search $PATH.
27529
27530 for ac_prog in $CC
27531 do
27532 # Extract the first word of "$ac_prog", so it can be a program name with args.
27533 set dummy $ac_prog; ac_word=$2
27534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27577 else
27578 as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27579 fi
27580 else
27581 # Otherwise it might already be a complete path
27582 if test ! -x "$CC"; then
27583 as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27584 fi
27585 fi
27586 else
27587 # No user supplied value. Locate compiler ourselves.
27588
27589 # If we are cross compiling, assume cross compilation tools follows the
27590 # cross compilation standard where they are prefixed with the autoconf
27591 # standard name for the target. For example the binary
27592 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27593 # If we are not cross compiling, then the default compiler name will be
27594 # used.
27595
27596 CC=
27597 # If TOOLS_DIR is set, check for all compiler names in there first
27598 # before checking the rest of the PATH.
27599 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27600 # step, this should not be necessary.
27601 if test -n "$TOOLS_DIR"; then
27602 PATH_save="$PATH"
27603 PATH="$TOOLS_DIR"
27604 for ac_prog in $SEARCH_LIST
27605 do
27606 # Extract the first word of "$ac_prog", so it can be a program name with args.
27607 set dummy $ac_prog; ac_word=$2
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27609 $as_echo_n "checking for $ac_word... " >&6; }
27610 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27611 $as_echo_n "(cached) " >&6
27612 else
27613 case $TOOLS_DIR_CC in
27614 [\\/]* | ?:[\\/]*)
27615 ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27616 ;;
27617 *)
27618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27619 for as_dir in $PATH
27620 do
27621 IFS=$as_save_IFS
27622 test -z "$as_dir" && as_dir=.
27623 for ac_exec_ext in '' $ac_executable_extensions; do
27624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27625 ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27627 break 2
27628 fi
27629 done
27630 done
27631 IFS=$as_save_IFS
27632
27633 ;;
27634 esac
27635 fi
27636 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27637 if test -n "$TOOLS_DIR_CC"; then
27638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27639 $as_echo "$TOOLS_DIR_CC" >&6; }
27640 else
27641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27642 $as_echo "no" >&6; }
27643 fi
27644
27645
27646 test -n "$TOOLS_DIR_CC" && break
27647 done
27648
27649 CC=$TOOLS_DIR_CC
27650 PATH="$PATH_save"
27651 fi
27652
27653 # AC_PATH_PROGS can't be run multiple times with the same variable,
27654 # so create a new name for this run.
27655 if test "x$CC" = x; then
27656 for ac_prog in $SEARCH_LIST
27657 do
27658 # Extract the first word of "$ac_prog", so it can be a program name with args.
27659 set dummy $ac_prog; ac_word=$2
27660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27661 $as_echo_n "checking for $ac_word... " >&6; }
27662 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27663 $as_echo_n "(cached) " >&6
27664 else
27665 case $POTENTIAL_CC in
27666 [\\/]* | ?:[\\/]*)
27667 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27668 ;;
27669 *)
29283 else
29284 as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29285 fi
29286 else
29287 # Otherwise it might already be a complete path
29288 if test ! -x "$CXX"; then
29289 as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29290 fi
29291 fi
29292 else
29293 # No user supplied value. Locate compiler ourselves.
29294
29295 # If we are cross compiling, assume cross compilation tools follows the
29296 # cross compilation standard where they are prefixed with the autoconf
29297 # standard name for the target. For example the binary
29298 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29299 # If we are not cross compiling, then the default compiler name will be
29300 # used.
29301
29302 CXX=
29303 # If TOOLS_DIR is set, check for all compiler names in there first
29304 # before checking the rest of the PATH.
29305 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29306 # step, this should not be necessary.
29307 if test -n "$TOOLS_DIR"; then
29308 PATH_save="$PATH"
29309 PATH="$TOOLS_DIR"
29310 for ac_prog in $SEARCH_LIST
29311 do
29312 # Extract the first word of "$ac_prog", so it can be a program name with args.
29313 set dummy $ac_prog; ac_word=$2
29314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29315 $as_echo_n "checking for $ac_word... " >&6; }
29316 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29317 $as_echo_n "(cached) " >&6
29318 else
29319 case $TOOLS_DIR_CXX in
29320 [\\/]* | ?:[\\/]*)
29321 ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29322 ;;
29323 *)
29324 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29325 for as_dir in $PATH
29326 do
29327 IFS=$as_save_IFS
29328 test -z "$as_dir" && as_dir=.
29329 for ac_exec_ext in '' $ac_executable_extensions; do
29330 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29331 ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29332 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29333 break 2
29334 fi
29335 done
29336 done
29337 IFS=$as_save_IFS
29338
29339 ;;
29340 esac
29341 fi
29342 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29343 if test -n "$TOOLS_DIR_CXX"; then
29344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29345 $as_echo "$TOOLS_DIR_CXX" >&6; }
29346 else
29347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29348 $as_echo "no" >&6; }
29349 fi
29350
29351
29352 test -n "$TOOLS_DIR_CXX" && break
29353 done
29354
29355 CXX=$TOOLS_DIR_CXX
29356 PATH="$PATH_save"
29357 fi
29358
29359 # AC_PATH_PROGS can't be run multiple times with the same variable,
29360 # so create a new name for this run.
29361 if test "x$CXX" = x; then
29362 for ac_prog in $SEARCH_LIST
29363 do
29364 # Extract the first word of "$ac_prog", so it can be a program name with args.
29365 set dummy $ac_prog; ac_word=$2
29366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29367 $as_echo_n "checking for $ac_word... " >&6; }
29368 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29369 $as_echo_n "(cached) " >&6
29370 else
29371 case $POTENTIAL_CXX in
29372 [\\/]* | ?:[\\/]*)
29373 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29374 ;;
29375 *)
40743 # in a custom configure script, or possibly the command line.
40744 # Let those variables be expanded at make time in spec.gmk.
40745 # The \$ are escaped to the shell, and the $(...) variables
40746 # are evaluated by make.
40747 RC_FLAGS="$RC_FLAGS \
40748 -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40749 -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40750 -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40751 -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40752 -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40753 -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40754 -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40755 fi
40756
40757
40758 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40759 # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40760 CCXXFLAGS="$CCXXFLAGS -nologo"
40761 fi
40762
40763
40764 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40765
40766 # Now we can test some aspects on the target using configure macros.
40767
40768
40769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40770 $as_echo_n "checking for ANSI C header files... " >&6; }
40771 if ${ac_cv_header_stdc+:} false; then :
40772 $as_echo_n "(cached) " >&6
40773 else
40774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40775 /* end confdefs.h. */
40776 #include <stdlib.h>
40777 #include <stdarg.h>
40778 #include <string.h>
40779 #include <float.h>
40780
40781 int
40782 main ()
41591
41592
41593 # Check whether --with-extra-cxxflags was given.
41594 if test "${with_extra_cxxflags+set}" = set; then :
41595 withval=$with_extra_cxxflags;
41596 fi
41597
41598
41599
41600 # Check whether --with-extra-ldflags was given.
41601 if test "${with_extra_ldflags+set}" = set; then :
41602 withval=$with_extra_ldflags;
41603 fi
41604
41605
41606 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41607 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41608 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41609
41610 # Hotspot needs these set in their legacy form
41611 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41612 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41613 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41614
41615
41616
41617
41618
41619 ###############################################################################
41620 #
41621 # Now setup the CFLAGS and LDFLAGS for the JDK build.
41622 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41623 #
41624
41625 # Setup compiler/platform specific flags to CFLAGS_JDK,
41626 # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41627 if test "x$TOOLCHAIN_TYPE" = xgcc; then
41628 # these options are used for both C and C++ compiles
41629 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41630 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41631 case $OPENJDK_TARGET_CPU_ARCH in
41632 arm )
41633 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41691
41692 # Setup LP64
41693 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41694
41695 # Set some common defines. These works for all compilers, but assume
41696 # -D is universally accepted.
41697
41698 # Setup endianness
41699 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41700 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41701 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41702 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41703 # Note: -Dmacro is the same as #define macro 1
41704 # -Dmacro= is the same as #define macro
41705 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41706 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41707 else
41708 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41709 fi
41710 else
41711 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41712 fi
41713
41714 # Setup target OS define. Use OS target name but in upper case.
41715 OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41716 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41717
41718 # Setup target CPU
41719 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41720
41721 # Setup debug/release defines
41722 if test "x$DEBUG_LEVEL" = xrelease; then
41723 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41724 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41725 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41726 fi
41727 else
41728 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41729 fi
41730
41731 # Setup release name
41732 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42255 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42256 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42258 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42259 else
42260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42261 $as_echo "no" >&6; }
42262 fi
42263
42264
42265
42266 ###############################################################################
42267 #
42268 # Check for X Windows
42269 #
42270
42271 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42272 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42273 # --x-libraries for the sysroot, if that seems to be correct.
42274 if test "x$SYS_ROOT" != "x/"; then
42275 if test "x$x_includes" = xNONE; then
42276 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42277 x_includes="$SYS_ROOT/usr/X11R6/include"
42278 elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42279 x_includes="$SYS_ROOT/usr/include"
42280 fi
42281 fi
42282 if test "x$x_libraries" = xNONE; then
42283 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42284 x_libraries="$SYS_ROOT/usr/X11R6/lib"
42285 elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42286 x_libraries="$SYS_ROOT/usr/lib64"
42287 elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42288 x_libraries="$SYS_ROOT/usr/lib"
42289 fi
42290 fi
42291 fi
42292
42293 # Now let autoconf do it's magic
42294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42295 $as_echo_n "checking for X... " >&6; }
42296
42297
42298 # Check whether --with-x was given.
42299 if test "${with_x+set}" = set; then :
42300 withval=$with_x;
42301 fi
42302
42303 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42304 if test "x$with_x" = xno; then
42305 # The user explicitly disabled X.
42306 have_x=disabled
42307 else
42308 case $x_includes,$x_libraries in #(
43000 yum)
43001 yum_help $MISSING_DEPENDENCY ;;
43002 port)
43003 port_help $MISSING_DEPENDENCY ;;
43004 pkgutil)
43005 pkgutil_help $MISSING_DEPENDENCY ;;
43006 pkgadd)
43007 pkgadd_help $MISSING_DEPENDENCY ;;
43008 esac
43009
43010 if test "x$PKGHANDLER_COMMAND" != x; then
43011 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43012 fi
43013 fi
43014
43015 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43016 fi
43017
43018 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43019 OPENWIN_HOME="/usr/openwin"
43020 fi
43021
43022
43023
43024 #
43025 # Weird Sol10 something check...TODO change to try compile
43026 #
43027 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43028 if test "`uname -r`" = "5.10"; then
43029 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43030 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43031 fi
43032 fi
43033 fi
43034
43035 ac_ext=c
43036 ac_cpp='$CPP $CPPFLAGS'
43037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43040
43041 OLD_CFLAGS="$CFLAGS"
43042 CFLAGS="$CFLAGS $X_CFLAGS"
43043
43302 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43303 cat >>confdefs.h <<_ACEOF
43304 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43305 _ACEOF
43306
43307 CUPS_FOUND=yes
43308 CUPS_CFLAGS=
43309 DEFAULT_CUPS=yes
43310
43311
43312 fi
43313
43314 done
43315
43316 fi
43317 if test "x$CUPS_FOUND" = xno; then
43318 # Getting nervous now? Lets poke around for standard Solaris third-party
43319 # package installation locations.
43320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43321 $as_echo_n "checking for cups headers... " >&6; }
43322 if test -s /opt/sfw/cups/include/cups/cups.h; then
43323 # An SFW package seems to be installed!
43324 CUPS_FOUND=yes
43325 CUPS_CFLAGS="-I/opt/sfw/cups/include"
43326 elif test -s /opt/csw/include/cups/cups.h; then
43327 # A CSW package seems to be installed!
43328 CUPS_FOUND=yes
43329 CUPS_CFLAGS="-I/opt/csw/include"
43330 fi
43331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43332 $as_echo "$CUPS_FOUND" >&6; }
43333 fi
43334 if test "x$CUPS_FOUND" = xno; then
43335
43336 # Print a helpful message on how to acquire the necessary build dependency.
43337 # cups is the help tag: freetype, cups, pulse, alsa etc
43338 MISSING_DEPENDENCY=cups
43339
43340 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43341 cygwin_help $MISSING_DEPENDENCY
43342 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43343 msys_help $MISSING_DEPENDENCY
43344 else
43345 PKGHANDLER_COMMAND=
43346
43347 case $PKGHANDLER in
43348 apt-get)
43349 apt_help $MISSING_DEPENDENCY ;;
43902 fi
43903 else FOUND_FREETYPE=no
43904
43905 fi
43906
43907 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43908 if test "x$FOUND_FREETYPE" = xyes; then
43909 if test "x$BUNDLE_FREETYPE" = xyes; then
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43911 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43912 FOUND_FREETYPE=no
43913 else
43914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43915 $as_echo_n "checking for freetype... " >&6; }
43916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43917 $as_echo "yes (using builddeps)" >&6; }
43918 fi
43919 fi
43920 fi
43921
43922 if test "x$FOUND_FREETYPE" != xyes; then
43923 # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43924 if test "x$PKG_CONFIG" != x; then
43925
43926 pkg_failed=no
43927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43928 $as_echo_n "checking for FREETYPE... " >&6; }
43929
43930 if test -n "$FREETYPE_CFLAGS"; then
43931 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43932 elif test -n "$PKG_CONFIG"; then
43933 if test -n "$PKG_CONFIG" && \
43934 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43935 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43936 ac_status=$?
43937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43938 test $ac_status = 0; }; then
43939 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43940 else
43941 pkg_failed=yes
43993 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43994 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43995 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43996 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43997 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43998 fi
43999 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44000 if test "x$BUNDLE_FREETYPE" = xyes; then
44001 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44002 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44003 FOUND_FREETYPE=no
44004 else
44005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44006 $as_echo_n "checking for freetype... " >&6; }
44007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44008 $as_echo "yes (using pkg-config)" >&6; }
44009 fi
44010 fi
44011 fi
44012 fi
44013
44014 if test "x$FOUND_FREETYPE" != xyes; then
44015 # Check in well-known locations
44016 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44017 FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44018
44019 windows_path="$FREETYPE_BASE_DIR"
44020 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44021 unix_path=`$CYGPATH -u "$windows_path"`
44022 FREETYPE_BASE_DIR="$unix_path"
44023 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44024 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44025 FREETYPE_BASE_DIR="$unix_path"
44026 fi
44027
44028
44029 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44030 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44031 METHOD="well-known location"
44032
44602 fi
44603
44604 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44605 fi
44606
44607
44608 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44610 $as_echo_n "checking for freetype includes... " >&6; }
44611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44612 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44613 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44615 $as_echo_n "checking for freetype libraries... " >&6; }
44616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44617 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44618 fi
44619
44620 fi
44621 else
44622 if test "x$SYS_ROOT" = "x/"; then
44623 FREETYPE_ROOT=
44624 else
44625 FREETYPE_ROOT="$SYS_ROOT"
44626 fi
44627 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44628
44629 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44630 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44631 METHOD="well-known location"
44632
44633 # First check if the files exists.
44634 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44635 # We found an arbitrary include file. That's a good sign.
44636 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44637 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44638 FOUND_FREETYPE=yes
44639
44640 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44641 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44642 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44643 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44644 FOUND_FREETYPE=no
44645 else
44646 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44647 # On Windows, we will need both .lib and .dll file.
44898 if test ! -f "$path" && test ! -d "$path"; then
44899 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44900 fi
44901
44902 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44903 fi
44904
44905
44906 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44908 $as_echo_n "checking for freetype includes... " >&6; }
44909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44910 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44911 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44913 $as_echo_n "checking for freetype libraries... " >&6; }
44914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44915 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44916 fi
44917
44918
44919 if test "x$FOUND_FREETYPE" != xyes; then
44920 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44921
44922 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44923 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44924 METHOD="well-known location"
44925
44926 # First check if the files exists.
44927 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44928 # We found an arbitrary include file. That's a good sign.
44929 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44930 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44931 FOUND_FREETYPE=yes
44932
44933 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44934 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44935 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44936 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44937 FOUND_FREETYPE=no
44938 else
44939 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44940 # On Windows, we will need both .lib and .dll file.
45194
45195 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45196 fi
45197
45198
45199 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45201 $as_echo_n "checking for freetype includes... " >&6; }
45202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45203 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45204 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45206 $as_echo_n "checking for freetype libraries... " >&6; }
45207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45208 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45209 fi
45210
45211 fi
45212
45213 if test "x$FOUND_FREETYPE" != xyes; then
45214 FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45215 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45216
45217 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45218 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45219 METHOD="well-known location"
45220
45221 # First check if the files exists.
45222 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45223 # We found an arbitrary include file. That's a good sign.
45224 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45225 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45226 FOUND_FREETYPE=yes
45227
45228 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45229 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45230 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45231 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45232 FOUND_FREETYPE=no
45233 else
45234 if test "x$OPENJDK_TARGET_OS" = xwindows; then
46670 fi
46671 ALSA=$depdir
46672 if test "x$theroot" != x; then
46673 ALSA="$theroot"
46674 fi
46675 if test "x$thecflags" != x; then
46676 ALSA_CFLAGS="$thecflags"
46677 fi
46678 if test "x$thelibs" != x; then
46679 ALSA_LIBS="$thelibs"
46680 fi
46681 ALSA_FOUND=yes
46682 else ALSA_FOUND=no
46683
46684 fi
46685 else ALSA_FOUND=no
46686
46687 fi
46688
46689 fi
46690 if test "x$ALSA_FOUND" = xno; then
46691
46692 pkg_failed=no
46693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46694 $as_echo_n "checking for ALSA... " >&6; }
46695
46696 if test -n "$ALSA_CFLAGS"; then
46697 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46698 elif test -n "$PKG_CONFIG"; then
46699 if test -n "$PKG_CONFIG" && \
46700 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46701 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46702 ac_status=$?
46703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46704 test $ac_status = 0; }; then
46705 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46706 else
46707 pkg_failed=yes
46708 fi
46709 else
46739 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46740 else
46741 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46742 fi
46743 # Put the nasty error message in config.log where it belongs
46744 echo "$ALSA_PKG_ERRORS" >&5
46745
46746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46747 $as_echo "no" >&6; }
46748 ALSA_FOUND=no
46749 elif test $pkg_failed = untried; then
46750 ALSA_FOUND=no
46751 else
46752 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46753 ALSA_LIBS=$pkg_cv_ALSA_LIBS
46754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46755 $as_echo "yes" >&6; }
46756 ALSA_FOUND=yes
46757 fi
46758 fi
46759 if test "x$ALSA_FOUND" = xno; then
46760 for ac_header in alsa/asoundlib.h
46761 do :
46762 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46763 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46764 cat >>confdefs.h <<_ACEOF
46765 #define HAVE_ALSA_ASOUNDLIB_H 1
46766 _ACEOF
46767
46768 ALSA_FOUND=yes
46769 ALSA_CFLAGS=-Iignoreme
46770 ALSA_LIBS=-lasound
46771 DEFAULT_ALSA=yes
46772
46773 else
46774 ALSA_FOUND=no
46775 fi
46776
46777 done
46778
47617 fi
47618 done
47619
47620 unset LLVM_LIBS
47621 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47622 if echo "${flag}" | grep -q '^-l'; then
47623 if test "${LLVM_LIBS}" != ""; then
47624 LLVM_LIBS="${LLVM_LIBS} "
47625 fi
47626 LLVM_LIBS="${LLVM_LIBS}${flag}"
47627 fi
47628 done
47629
47630
47631
47632
47633 fi
47634
47635 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47636 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47637 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47638 fi
47639
47640 # TODO better (platform agnostic) test
47641 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47642 LIBCXX="-lstdc++"
47643 fi
47644
47645
47646
47647
47648 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47649
47650
47651 # Check whether --with-msvcr-dll was given.
47652 if test "${with_msvcr_dll+set}" = set; then :
47653 withval=$with_msvcr_dll;
47654 fi
47655
47656
47657 if test "x$with_msvcr_dll" != x; then
48542
48543
48544
48545
48546 # Setup use of ccache, if available
48547
48548 # Check whether --enable-ccache was given.
48549 if test "${enable_ccache+set}" = set; then :
48550 enableval=$enable_ccache;
48551 fi
48552
48553
48554 CCACHE=
48555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48556 $as_echo_n "checking is ccache enabled... " >&6; }
48557 ENABLE_CCACHE=$enable_ccache
48558 if test "x$enable_ccache" = xyes; then
48559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48560 $as_echo "yes" >&6; }
48561 OLD_PATH="$PATH"
48562 if test "x$TOOLS_DIR" != x; then
48563 PATH=$TOOLS_DIR:$PATH
48564 fi
48565
48566
48567
48568 # Publish this variable in the help.
48569
48570
48571 if test "x$CCACHE" = x; then
48572 # The variable is not set by user, try to locate tool using the code snippet
48573 for ac_prog in ccache
48574 do
48575 # Extract the first word of "$ac_prog", so it can be a program name with args.
48576 set dummy $ac_prog; ac_word=$2
48577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48578 $as_echo_n "checking for $ac_word... " >&6; }
48579 if ${ac_cv_path_CCACHE+:} false; then :
48580 $as_echo_n "(cached) " >&6
48581 else
48582 case $CCACHE in
48583 [\\/]* | ?:[\\/]*)
|
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_LIBPNG
657 PNG_LIBS
658 PNG_CFLAGS
659 USE_EXTERNAL_LIBGIF
660 USE_EXTERNAL_LIBJPEG
661 ALSA_LIBS
662 ALSA_CFLAGS
663 FREETYPE_BUNDLE_LIB_PATH
664 FREETYPE_LIBS
665 FREETYPE_CFLAGS
666 CUPS_CFLAGS
667 X_EXTRA_LIBS
668 X_LIBS
669 X_PRE_LIBS
670 X_CFLAGS
671 XMKMF
672 FIXPATH
673 ZIP_DEBUGINFO_FILES
674 ENABLE_DEBUG_SYMBOLS
675 CFLAGS_WARNINGS_ARE_ERRORS
676 COMPILER_SUPPORTS_TARGET_BITS_FLAG
677 ZERO_ARCHFLAG
678 LDFLAGS_CXX_JDK
679 LDFLAGS_JDKEXE_SUFFIX
680 LDFLAGS_JDKLIB_SUFFIX
681 LDFLAGS_JDKEXE
682 LDFLAGS_JDKLIB
683 CXXFLAGS_JDKEXE
684 CXXFLAGS_JDKLIB
685 CFLAGS_JDKEXE
686 CFLAGS_JDKLIB
690 LEGACY_EXTRA_CFLAGS
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 SYSROOT_LDFLAGS
711 SYSROOT_CFLAGS
712 RC_FLAGS
713 AR_OUT_OPTION
714 LD_OUT_OPTION
715 EXE_OUT_OPTION
716 CC_OUT_OPTION
717 POST_MCS_CMD
718 POST_STRIP_CMD
719 ARFLAGS
720 COMPILER_TARGET_BITS_FLAG
721 JT_HOME
722 JTREGEXE
723 USING_BROKEN_SUSE_LD
724 PACKAGE_PATH
725 LDEXECXX
726 LDEXE
727 USE_CLANG
728 HOTSPOT_LD
729 HOTSPOT_CXX
730 HOTSPOT_RC
731 HOTSPOT_MT
744 STRIP
745 DUMPBIN
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 ac_ct_CXX
760 CXXFLAGS
761 CXX
762 ac_ct_PROPER_COMPILER_CXX
763 PROPER_COMPILER_CXX
764 TOOLCHAIN_PATH_CXX
765 POTENTIAL_CXX
766 OBJEXT
767 EXEEXT
768 ac_ct_CC
769 CPPFLAGS
770 LDFLAGS
771 CFLAGS
772 CC
773 ac_ct_PROPER_COMPILER_CC
774 PROPER_COMPILER_CC
775 TOOLCHAIN_PATH_CC
776 POTENTIAL_CC
777 VS_PATH
778 VS_LIB
779 VS_INCLUDE
780 CYGWIN_LINK
781 EXE_SUFFIX
782 OBJ_SUFFIX
783 STATIC_LIBRARY
784 SHARED_LIBRARY
785 STATIC_LIBRARY_SUFFIX
786 SHARED_LIBRARY_SUFFIX
787 LIBRARY_PREFIX
788 TOOLCHAIN_TYPE
789 BUILD_HOTSPOT
790 HOTSPOT_DIST
791 BUILD_OUTPUT
792 OVERRIDE_SRC_ROOT
793 ADD_SRC_ROOT
794 JDK_TOPDIR
795 NASHORN_TOPDIR
871 DEBUG_CLASSFILES
872 FASTDEBUG
873 VARIANT
874 DEBUG_LEVEL
875 MACOSX_UNIVERSAL
876 INCLUDE_SA
877 JVM_VARIANT_CORE
878 JVM_VARIANT_ZEROSHARK
879 JVM_VARIANT_ZERO
880 JVM_VARIANT_KERNEL
881 JVM_VARIANT_MINIMAL1
882 JVM_VARIANT_CLIENT
883 JVM_VARIANT_SERVER
884 JVM_VARIANTS
885 JVM_INTERPRETER
886 JDK_VARIANT
887 SET_OPENJDK
888 BUILD_LOG_WRAPPER
889 BUILD_LOG_PREVIOUS
890 BUILD_LOG
891 TOPDIR
892 PATH_SEP
893 ZERO_ARCHDEF
894 DEFINE_CROSS_COMPILE_ARCH
895 LP64
896 OPENJDK_TARGET_OS_EXPORT_DIR
897 OPENJDK_TARGET_OS_API_DIR
898 OPENJDK_TARGET_CPU_JLI_CFLAGS
899 OPENJDK_TARGET_CPU_OSARCH
900 OPENJDK_TARGET_CPU_ISADIR
901 OPENJDK_TARGET_CPU_LIBDIR
902 OPENJDK_TARGET_CPU_LEGACY_LIB
903 OPENJDK_TARGET_CPU_LEGACY
904 REQUIRED_OS_VERSION
905 REQUIRED_OS_NAME
906 COMPILE_TYPE
907 OPENJDK_TARGET_CPU_ENDIAN
908 OPENJDK_TARGET_CPU_BITS
909 OPENJDK_TARGET_CPU_ARCH
910 OPENJDK_TARGET_CPU
1003 datadir
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_target_bits
1023 enable_openjdk_only
1024 with_custom_make_dir
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_conf_name
1037 with_builddeps_conf
1038 with_builddeps_server
1039 with_builddeps_dir
1040 with_builddeps_group
1041 enable_headful
1042 enable_hotspot_test_in_build
1043 with_cacerts_file
1044 enable_unlimited_crypto
1045 enable_rmiconnector_iiop
1046 with_milestone
1047 with_update_version
1048 with_user_release_suffix
1049 with_build_number
1050 with_boot_jdk
1051 with_boot_jdk_jvmargs
1052 with_add_source_root
1053 with_override_source_root
1054 with_adds_and_overrides
1055 with_override_langtools
1834 --enable-macosx-runtime-support
1835 Deprecated. Option is kept for backwards
1836 compatibility and is ignored
1837 --disable-freetype-bundling
1838 disable bundling of the freetype library with the
1839 build result [enabled on Windows or when using
1840 --with-freetype, disabled otherwise]
1841 --enable-sjavac use sjavac to do fast incremental compiles
1842 [disabled]
1843 --disable-precompiled-headers
1844 disable using precompiled headers when compiling C++
1845 [enabled]
1846 --enable-ccache enable using ccache to speed up recompilations
1847 [disabled]
1848
1849 Optional Packages:
1850 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1851 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1852 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
1853 support it), e.g. --with-target-bits=32 [guessed]
1854 --with-custom-make-dir Deprecated. Option is kept for backwards
1855 compatibility and is ignored
1856 --with-jdk-variant JDK variant to build (normal) [normal]
1857 --with-jvm-interpreter JVM interpreter to build (template, cpp) [template]
1858 --with-jvm-variants JVM variants (separated by commas) to build (server,
1859 client, minimal1, kernel, zero, zeroshark, core)
1860 [server]
1861 --with-debug-level set the debug level (release, fastdebug, slowdebug,
1862 optimized (HotSpot build only)) [release]
1863 --with-devkit use this devkit for compilers, tools and resources
1864 --with-sys-root alias for --with-sysroot for backwards compatability
1865 --with-sysroot use this directory as sysroot)
1866 --with-tools-dir alias for --with-toolchain-path for backwards
1867 compatibility
1868 --with-toolchain-path prepend these directories when searching for
1869 toolchain binaries (compilers etc)
1870 --with-extra-path prepend these directories to the default path
1871 --with-conf-name use this as the name of the configuration [generated
1872 from important configuration options]
1873 --with-builddeps-conf use this configuration file for the builddeps
1874 --with-builddeps-server download and use build dependencies from this server
1875 url
1876 --with-builddeps-dir store downloaded build dependencies here
1877 [/localhome/builddeps]
1878 --with-builddeps-group chgrp the downloaded build dependencies to this
1879 group
1880 --with-cacerts-file specify alternative cacerts file
1881 --with-milestone Set milestone value for build [internal]
1882 --with-update-version Set update version value for build [b00]
1883 --with-user-release-suffix
1884 Add a custom string to the version string if build
1885 number is not set.[username_builddateb00]
1886 --with-build-number Set build number value for build [b00]
1887 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
1888 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1889 invocations of boot JDK, overriding the default
1890 values, e.g --with-boot-jdk-jvmargs="-Xmx8G
3313 # version 2 for more details (a copy is included in the LICENSE file that
3314 # accompanied this code).
3315 #
3316 # You should have received a copy of the GNU General Public License version
3317 # 2 along with this work; if not, write to the Free Software Foundation,
3318 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3319 #
3320 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3321 # or visit www.oracle.com if you need additional information or have any
3322 # questions.
3323 #
3324
3325 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3326 # If so, then append $1 to $2 \
3327 # Also set JVM_ARG_OK to true/false depending on outcome.
3328
3329
3330 # Appends a string to a path variable, only adding the : when needed.
3331
3332
3333 # Prepends a string to a path variable, only adding the : when needed.
3334
3335
3336 # This will make sure the given variable points to a full and proper
3337 # path. This means:
3338 # 1) There will be no spaces in the path. On posix platforms,
3339 # spaces in the path will result in an error. On Windows,
3340 # the path will be rewritten using short-style to be space-free.
3341 # 2) The path will be absolute, and it will be in unix-style (on
3342 # cygwin).
3343 # $1: The name of the variable to fix
3344
3345
3346 # This will make sure the given variable points to a executable
3347 # with a full and proper path. This means:
3348 # 1) There will be no spaces in the path. On posix platforms,
3349 # spaces in the path will result in an error. On Windows,
3350 # the path will be rewritten using short-style to be space-free.
3351 # 2) The path will be absolute, and it will be in unix-style (on
3352 # cygwin).
3353 # Any arguments given to the executable is preserved.
3354 # If the input variable does not have a directory specification, then
3355 # it need to be in the PATH.
3398 # $2: executable name (or list of names) to look for
3399
3400
3401 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3402 # $1: variable to set
3403 # $2: autoconf macro to call to look for the special tool
3404
3405
3406 # Setup the most fundamental tools that relies on not much else to set up,
3407 # but is used by much of the early bootstrap code.
3408
3409
3410 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420 #%%% Simple tools %%%
3421
3422 # Check if we have found a usable version of make
3423 # $1: the path to a potential make binary (or empty)
3424 # $2: the description on how we found this
3425
3426
3427 # Goes looking for a usable version of GNU make.
3428
3429
3430
3431
3432
3433
3434 # Check if build directory is on local disk. If not possible to determine,
3435 # we prefer to claim it's local.
3436 # Argument 1: directory to test
3437 # Argument 2: what to do if it is on local disk
3438 # Argument 3: what to do otherwise (remote disk or failure)
3439
4226
4227 # Check if the VS env variables were setup prior to running configure.
4228 # If not, then find vcvarsall.bat and run it automatically, and integrate
4229 # the set env variables into the spec file.
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240 # This line needs to be here, verbatim, after all includes and the dummy hook
4241 # definitions. It is replaced with custom functionality when building
4242 # custom sources.
4243 #CUSTOM_AUTOCONF_INCLUDE
4244
4245 # Do not change or remove the following line, it is needed for consistency checks:
4246 DATE_WHEN_GENERATED=1395839362
4247
4248 ###############################################################################
4249 #
4250 # Initialization / Boot-strapping
4251 #
4252 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4253 # thus it jumps back and forth, each time gaining something needed later on.
4254 #
4255 ###############################################################################
4256
4257 # If we are requested to print additional help, do that and then exit.
4258 # This must be the very first call.
4259
4260 if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4261 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4262 $PRINTF "Which are valid to use depends on the build platform.\n"
4263 for toolchain in $VALID_TOOLCHAINS_all; do
4264 # Use indirect variable referencing
4265 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4266 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
14233 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14234 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14235 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14236 fi
14237
14238 # Use eval to expand a potential ~
14239 eval path="$path"
14240 if test ! -f "$path" && test ! -d "$path"; then
14241 as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14242 fi
14243
14244 TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14245 fi
14246
14247 # SRC_ROOT is a traditional alias for TOPDIR.
14248 SRC_ROOT=$TOPDIR
14249
14250 # Locate the directory of this script.
14251 AUTOCONF_DIR=$TOPDIR/common/autoconf
14252
14253
14254 # Setup default logging of stdout and stderr to build.log in the output root.
14255 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14256 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14257 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14258
14259
14260
14261
14262
14263 # Check if it's a pure open build or if custom sources are to be used.
14264
14265 # Check whether --enable-openjdk-only was given.
14266 if test "${enable_openjdk_only+set}" = set; then :
14267 enableval=$enable_openjdk_only;
14268 else
14269 enable_openjdk_only="no"
14270 fi
14271
14272
14619 # On Macosx universal binaries are produced, but they only contain
14620 # 64 bit intel. This invalidates control of which jvms are built
14621 # from configure, but only server is valid anyway. Fix this
14622 # when hotspot makefiles are rewritten.
14623 if test "x$MACOSX_UNIVERSAL" = xtrue; then
14624 HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14625 fi
14626
14627 #####
14628
14629
14630
14631
14632
14633
14634
14635
14636 # With basic setup done, call the custom early hook.
14637
14638
14639 # Check if we have devkits, extra paths or sysroot set.
14640
14641
14642 # Check whether --with-devkit was given.
14643 if test "${with_devkit+set}" = set; then :
14644 withval=$with_devkit;
14645
14646 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14647
14648 # Input might be given as Windows format, start by converting to
14649 # unix format.
14650 path="$with_devkit"
14651 new_path=`$CYGPATH -u "$path"`
14652
14653 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14654 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14655 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14656 # "foo.exe" is OK but "foo" is an error.
14657 #
14658 # This test is therefore slightly more accurate than "test -f" to check for file precense.
14659 # It is also a way to make sure we got the proper file name for the real test later on.
14660 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14661 if test "x$test_shortpath" = x; then
14662 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14663 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14664 as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14665 fi
14666
14667 # Call helper function which possibly converts this using DOS-style short mode.
14668 # If so, the updated path is stored in $new_path.
14669
14670 input_path="$new_path"
14671 # Check if we need to convert this using DOS-style short mode. If the path
14672 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14673 # take no chances and rewrite it.
14674 # Note: m4 eats our [], so we need to use [ and ] instead.
14675 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14676 if test "x$has_forbidden_chars" != x; then
14677 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14678 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14679 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14680 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14681 # Going to short mode and back again did indeed matter. Since short mode is
14682 # case insensitive, let's make it lowercase to improve readability.
14683 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14684 # Now convert it back to Unix-stile (cygpath)
14685 input_path=`$CYGPATH -u "$shortmode_path"`
14686 new_path="$input_path"
14687 fi
14688 fi
14689
14690 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14691 if test "x$test_cygdrive_prefix" = x; then
14692 # As a simple fix, exclude /usr/bin since it's not a real path.
14693 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14694 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14695 # a path prefixed by /cygdrive for fixpath to work.
14696 new_path="$CYGWIN_ROOT_PATH$input_path"
14697 fi
14698 fi
14699
14700
14701 if test "x$path" != "x$new_path"; then
14702 with_devkit="$new_path"
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14704 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14705 fi
14706
14707 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14708
14709 path="$with_devkit"
14710 has_colon=`$ECHO $path | $GREP ^.:`
14711 new_path="$path"
14712 if test "x$has_colon" = x; then
14713 # Not in mixed or Windows style, start by that.
14714 new_path=`cmd //c echo $path`
14715 fi
14716
14717
14718 input_path="$new_path"
14719 # Check if we need to convert this using DOS-style short mode. If the path
14720 # contains just simple characters, use it. Otherwise (spaces, weird characters),
14721 # take no chances and rewrite it.
14722 # Note: m4 eats our [], so we need to use [ and ] instead.
14723 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14724 if test "x$has_forbidden_chars" != x; then
14725 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14726 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14727 fi
14728
14729
14730 windows_path="$new_path"
14731 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14732 unix_path=`$CYGPATH -u "$windows_path"`
14733 new_path="$unix_path"
14734 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14735 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14736 new_path="$unix_path"
14737 fi
14738
14739 if test "x$path" != "x$new_path"; then
14740 with_devkit="$new_path"
14741 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14742 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14743 fi
14744
14745 # Save the first 10 bytes of this path to the storage, so fixpath can work.
14746 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14747
14748 else
14749 # We're on a posix platform. Hooray! :)
14750 path="$with_devkit"
14751 has_space=`$ECHO "$path" | $GREP " "`
14752 if test "x$has_space" != x; then
14753 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14754 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14755 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14756 fi
14757
14758 # Use eval to expand a potential ~
14759 eval path="$path"
14760 if test ! -f "$path" && test ! -d "$path"; then
14761 as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14762 fi
14763
14764 with_devkit="`cd "$path"; $THEPWDCMD -L`"
14765 fi
14766
14767 DEVKIT_ROOT="$with_devkit"
14768 # Check for a meta data info file in the root of the devkit
14769 if test -f "$DEVKIT_ROOT/devkit.info"; then
14770 # This potentially sets the following:
14771 # DEVKIT_NAME: A descriptive name of the devkit
14772 # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14773 # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14774 # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14775 . $DEVKIT_ROOT/devkit.info
14776 fi
14777
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14779 $as_echo_n "checking for devkit... " >&6; }
14780 if test "x$DEVKIT_NAME" != x; then
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14782 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14783 else
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14785 $as_echo "$DEVKIT_ROOT" >&6; }
14786 fi
14787
14788 if test "x$DEVKIT_EXTRA_PATH" != x; then
14789
14790 if test "x$DEVKIT_EXTRA_PATH" != x; then
14791 if test "x$EXTRA_PATH" = x; then
14792 EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14793 else
14794 EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14795 fi
14796 fi
14797
14798 fi
14799
14800 # Fallback default of just /bin if DEVKIT_PATH is not defined
14801 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14802 DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14803 fi
14804
14805 if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14806 if test "x$TOOLCHAIN_PATH" = x; then
14807 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14808 else
14809 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14810 fi
14811 fi
14812
14813
14814 # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14815 # places for backwards compatiblity.
14816 if test "x$DEVKIT_SYSROOT" != x; then
14817 SYSROOT="$DEVKIT_SYSROOT"
14818 elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14819 SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14820 elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14821 SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14822 fi
14823
14824
14825 fi
14826
14827
14828 # You can force the sysroot if the sysroot encoded into the compiler tools
14829 # is not correct.
14830
14831 # Check whether --with-sys-root was given.
14832 if test "${with_sys_root+set}" = set; then :
14833 withval=$with_sys_root; SYSROOT=$with_sys_root
14834
14835 fi
14836
14837
14838
14839 # Check whether --with-sysroot was given.
14840 if test "${with_sysroot+set}" = set; then :
14841 withval=$with_sysroot; SYSROOT=$with_sysroot
14842
14843 fi
14844
14845
14846
14847 # Check whether --with-tools-dir was given.
14848 if test "${with_tools_dir+set}" = set; then :
14849 withval=$with_tools_dir;
14850 if test "x$with_tools_dir" != x; then
14851 if test "x$TOOLCHAIN_PATH" = x; then
14852 TOOLCHAIN_PATH="$with_tools_dir"
14853 else
14854 TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14855 fi
14856 fi
14857
14858
14859 fi
14860
14861
14862
14863 # Check whether --with-toolchain-path was given.
14864 if test "${with_toolchain_path+set}" = set; then :
14865 withval=$with_toolchain_path;
14866 if test "x$with_toolchain_path" != x; then
14867 if test "x$TOOLCHAIN_PATH" = x; then
14868 TOOLCHAIN_PATH="$with_toolchain_path"
14869 else
14870 TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14871 fi
14872 fi
14873
14874
14875 fi
14876
14877
14878
14879 # Check whether --with-extra-path was given.
14880 if test "${with_extra_path+set}" = set; then :
14881 withval=$with_extra_path;
14882 if test "x$with_extra_path" != x; then
14883 if test "x$EXTRA_PATH" = x; then
14884 EXTRA_PATH="$with_extra_path"
14885 else
14886 EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14887 fi
14888 fi
14889
14890
14891 fi
14892
14893
14894 # Prepend the extra path to the global path
14895
14896 if test "x$EXTRA_PATH" != x; then
14897 if test "x$PATH" = x; then
14898 PATH="$EXTRA_PATH"
14899 else
14900 PATH="$EXTRA_PATH:$PATH"
14901 fi
14902 fi
14903
14904
14905 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14906 # Add extra search paths on solaris for utilities like ar and as etc...
14907 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14908 fi
14909
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14911 $as_echo_n "checking for sysroot... " >&6; }
14912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14913 $as_echo "$SYSROOT" >&6; }
14914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14915 $as_echo_n "checking for toolchain path... " >&6; }
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14917 $as_echo "$TOOLCHAIN_PATH" >&6; }
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14919 $as_echo_n "checking for extra path... " >&6; }
14920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14921 $as_echo "$EXTRA_PATH" >&6; }
14922
14923
14924 # To properly create a configuration name, we need to have the OpenJDK target
14925 # and options (variants and debug level) parsed.
14926
14927
14928
14929 # Check whether --with-conf-name was given.
14930 if test "${with_conf_name+set}" = set; then :
14931 withval=$with_conf_name; CONF_NAME=${with_conf_name}
14932 fi
14933
14934
14935 # Test from where we are running configure, in or outside of src root.
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14937 $as_echo_n "checking where to store configuration... " >&6; }
14938 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14939 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14940 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14941 # We are running configure from the src root.
14942 # Create a default ./build/target-variant-debuglevel output root.
14943 if test "x${CONF_NAME}" = x; then
16211 if test "x$arguments" != xEOL; then
16212 new_complete="$new_path ${arguments% *}"
16213 else
16214 new_complete="$new_path"
16215 fi
16216
16217 if test "x$complete" != "x$new_complete"; then
16218 FOUND_MAKE="$new_complete"
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16220 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16221 fi
16222
16223 fi
16224 fi
16225 fi
16226 fi
16227
16228 fi
16229
16230 if test "x$FOUND_MAKE" = x; then
16231 if test "x$TOOLCHAIN_PATH" != x; then
16232 # We have a toolchain path, check that as well before giving up.
16233 OLD_PATH=$PATH
16234 PATH=$TOOLCHAIN_PATH:$PATH
16235 for ac_prog in gmake
16236 do
16237 # Extract the first word of "$ac_prog", so it can be a program name with args.
16238 set dummy $ac_prog; ac_word=$2
16239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16240 $as_echo_n "checking for $ac_word... " >&6; }
16241 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16242 $as_echo_n "(cached) " >&6
16243 else
16244 case $CHECK_TOOLSDIR_GMAKE in
16245 [\\/]* | ?:[\\/]*)
16246 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16247 ;;
16248 *)
16249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16250 for as_dir in $PATH
16251 do
16252 IFS=$as_save_IFS
16253 test -z "$as_dir" && as_dir=.
16254 for ac_exec_ext in '' $ac_executable_extensions; do
27452 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27453 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27454 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27455 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27456 as_fn_error $? "Cannot continue" "$LINENO" 5
27457 fi
27458
27459 fi
27460
27461 # autoconf magic only relies on PATH, so update it if tools dir is specified
27462 OLD_PATH="$PATH"
27463
27464 # For solaris we really need solaris tools, and not the GNU equivalent.
27465 # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27466 # so add that to path before starting to probe.
27467 # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27468 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27469 PATH="/usr/ccs/bin:$PATH"
27470 fi
27471
27472 # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27473 # override all other locations.
27474 if test "x$TOOLCHAIN_PATH" != x; then
27475 PATH=$TOOLCHAIN_PATH:$PATH
27476 fi
27477
27478
27479 #
27480 # Setup the compilers (CC and CXX)
27481 #
27482
27483 COMPILER_NAME=C
27484 SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27485
27486 if test "x$CC" != x; then
27487 # User has supplied compiler name already, always let that override.
27488 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27489 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27490 if test "x`basename $CC`" = "x$CC"; then
27491 # A command without a complete path is provided, search $PATH.
27492
27493 for ac_prog in $CC
27494 do
27495 # Extract the first word of "$ac_prog", so it can be a program name with args.
27496 set dummy $ac_prog; ac_word=$2
27497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27540 else
27541 as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27542 fi
27543 else
27544 # Otherwise it might already be a complete path
27545 if test ! -x "$CC"; then
27546 as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27547 fi
27548 fi
27549 else
27550 # No user supplied value. Locate compiler ourselves.
27551
27552 # If we are cross compiling, assume cross compilation tools follows the
27553 # cross compilation standard where they are prefixed with the autoconf
27554 # standard name for the target. For example the binary
27555 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27556 # If we are not cross compiling, then the default compiler name will be
27557 # used.
27558
27559 CC=
27560 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27561 # before checking the rest of the PATH.
27562 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27563 # step, this should not be necessary.
27564 if test -n "$TOOLCHAIN_PATH"; then
27565 PATH_save="$PATH"
27566 PATH="$TOOLCHAIN_PATH"
27567 for ac_prog in $SEARCH_LIST
27568 do
27569 # Extract the first word of "$ac_prog", so it can be a program name with args.
27570 set dummy $ac_prog; ac_word=$2
27571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27572 $as_echo_n "checking for $ac_word... " >&6; }
27573 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27574 $as_echo_n "(cached) " >&6
27575 else
27576 case $TOOLCHAIN_PATH_CC in
27577 [\\/]* | ?:[\\/]*)
27578 ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27579 ;;
27580 *)
27581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27582 for as_dir in $PATH
27583 do
27584 IFS=$as_save_IFS
27585 test -z "$as_dir" && as_dir=.
27586 for ac_exec_ext in '' $ac_executable_extensions; do
27587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27588 ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27590 break 2
27591 fi
27592 done
27593 done
27594 IFS=$as_save_IFS
27595
27596 ;;
27597 esac
27598 fi
27599 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27600 if test -n "$TOOLCHAIN_PATH_CC"; then
27601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27602 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27603 else
27604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27605 $as_echo "no" >&6; }
27606 fi
27607
27608
27609 test -n "$TOOLCHAIN_PATH_CC" && break
27610 done
27611
27612 CC=$TOOLCHAIN_PATH_CC
27613 PATH="$PATH_save"
27614 fi
27615
27616 # AC_PATH_PROGS can't be run multiple times with the same variable,
27617 # so create a new name for this run.
27618 if test "x$CC" = x; then
27619 for ac_prog in $SEARCH_LIST
27620 do
27621 # Extract the first word of "$ac_prog", so it can be a program name with args.
27622 set dummy $ac_prog; ac_word=$2
27623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27624 $as_echo_n "checking for $ac_word... " >&6; }
27625 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27626 $as_echo_n "(cached) " >&6
27627 else
27628 case $POTENTIAL_CC in
27629 [\\/]* | ?:[\\/]*)
27630 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27631 ;;
27632 *)
29246 else
29247 as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29248 fi
29249 else
29250 # Otherwise it might already be a complete path
29251 if test ! -x "$CXX"; then
29252 as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29253 fi
29254 fi
29255 else
29256 # No user supplied value. Locate compiler ourselves.
29257
29258 # If we are cross compiling, assume cross compilation tools follows the
29259 # cross compilation standard where they are prefixed with the autoconf
29260 # standard name for the target. For example the binary
29261 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29262 # If we are not cross compiling, then the default compiler name will be
29263 # used.
29264
29265 CXX=
29266 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29267 # before checking the rest of the PATH.
29268 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29269 # step, this should not be necessary.
29270 if test -n "$TOOLCHAIN_PATH"; then
29271 PATH_save="$PATH"
29272 PATH="$TOOLCHAIN_PATH"
29273 for ac_prog in $SEARCH_LIST
29274 do
29275 # Extract the first word of "$ac_prog", so it can be a program name with args.
29276 set dummy $ac_prog; ac_word=$2
29277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29278 $as_echo_n "checking for $ac_word... " >&6; }
29279 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29280 $as_echo_n "(cached) " >&6
29281 else
29282 case $TOOLCHAIN_PATH_CXX in
29283 [\\/]* | ?:[\\/]*)
29284 ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29285 ;;
29286 *)
29287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288 for as_dir in $PATH
29289 do
29290 IFS=$as_save_IFS
29291 test -z "$as_dir" && as_dir=.
29292 for ac_exec_ext in '' $ac_executable_extensions; do
29293 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294 ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296 break 2
29297 fi
29298 done
29299 done
29300 IFS=$as_save_IFS
29301
29302 ;;
29303 esac
29304 fi
29305 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29306 if test -n "$TOOLCHAIN_PATH_CXX"; then
29307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29308 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29309 else
29310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29311 $as_echo "no" >&6; }
29312 fi
29313
29314
29315 test -n "$TOOLCHAIN_PATH_CXX" && break
29316 done
29317
29318 CXX=$TOOLCHAIN_PATH_CXX
29319 PATH="$PATH_save"
29320 fi
29321
29322 # AC_PATH_PROGS can't be run multiple times with the same variable,
29323 # so create a new name for this run.
29324 if test "x$CXX" = x; then
29325 for ac_prog in $SEARCH_LIST
29326 do
29327 # Extract the first word of "$ac_prog", so it can be a program name with args.
29328 set dummy $ac_prog; ac_word=$2
29329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29330 $as_echo_n "checking for $ac_word... " >&6; }
29331 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29332 $as_echo_n "(cached) " >&6
29333 else
29334 case $POTENTIAL_CXX in
29335 [\\/]* | ?:[\\/]*)
29336 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29337 ;;
29338 *)
40706 # in a custom configure script, or possibly the command line.
40707 # Let those variables be expanded at make time in spec.gmk.
40708 # The \$ are escaped to the shell, and the $(...) variables
40709 # are evaluated by make.
40710 RC_FLAGS="$RC_FLAGS \
40711 -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40712 -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40713 -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40714 -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40715 -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40716 -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40717 -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40718 fi
40719
40720
40721 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40722 # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40723 CCXXFLAGS="$CCXXFLAGS -nologo"
40724 fi
40725
40726 if test "x$SYSROOT" != "x"; then
40727 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
40728 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40729 # Solaris Studio does not have a concept of sysroot. Instead we must
40730 # make sure the default include and lib dirs are appended to each
40731 # compile and link command line.
40732 SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
40733 SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
40734 -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
40735 -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
40736 fi
40737 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
40738 SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
40739 SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
40740 elif test "x$TOOLCHAIN_TYPE" = xclang; then
40741 SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
40742 SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
40743 fi
40744 # Propagate the sysroot args to hotspot
40745 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
40746 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
40747 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
40748 fi
40749
40750
40751
40752
40753 # FIXME: Currently we must test this after toolchain but before flags. Fix!
40754
40755 # Now we can test some aspects on the target using configure macros.
40756
40757
40758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40759 $as_echo_n "checking for ANSI C header files... " >&6; }
40760 if ${ac_cv_header_stdc+:} false; then :
40761 $as_echo_n "(cached) " >&6
40762 else
40763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40764 /* end confdefs.h. */
40765 #include <stdlib.h>
40766 #include <stdarg.h>
40767 #include <string.h>
40768 #include <float.h>
40769
40770 int
40771 main ()
41580
41581
41582 # Check whether --with-extra-cxxflags was given.
41583 if test "${with_extra_cxxflags+set}" = set; then :
41584 withval=$with_extra_cxxflags;
41585 fi
41586
41587
41588
41589 # Check whether --with-extra-ldflags was given.
41590 if test "${with_extra_ldflags+set}" = set; then :
41591 withval=$with_extra_ldflags;
41592 fi
41593
41594
41595 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41596 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41597 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41598
41599 # Hotspot needs these set in their legacy form
41600 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
41601 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
41602 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
41603
41604
41605
41606
41607
41608 ###############################################################################
41609 #
41610 # Now setup the CFLAGS and LDFLAGS for the JDK build.
41611 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41612 #
41613
41614 # Setup compiler/platform specific flags to CFLAGS_JDK,
41615 # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41616 if test "x$TOOLCHAIN_TYPE" = xgcc; then
41617 # these options are used for both C and C++ compiles
41618 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41619 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41620 case $OPENJDK_TARGET_CPU_ARCH in
41621 arm )
41622 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41680
41681 # Setup LP64
41682 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41683
41684 # Set some common defines. These works for all compilers, but assume
41685 # -D is universally accepted.
41686
41687 # Setup endianness
41688 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41689 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41690 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41691 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41692 # Note: -Dmacro is the same as #define macro 1
41693 # -Dmacro= is the same as #define macro
41694 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41695 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41696 else
41697 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41698 fi
41699 else
41700 # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
41701 # are defined in the system?
41702 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41703 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
41704 else
41705 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41706 fi
41707 fi
41708
41709 # Setup target OS define. Use OS target name but in upper case.
41710 OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41711 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41712
41713 # Setup target CPU
41714 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41715
41716 # Setup debug/release defines
41717 if test "x$DEBUG_LEVEL" = xrelease; then
41718 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41719 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41720 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41721 fi
41722 else
41723 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41724 fi
41725
41726 # Setup release name
41727 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42250 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42251 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42253 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42254 else
42255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42256 $as_echo "no" >&6; }
42257 fi
42258
42259
42260
42261 ###############################################################################
42262 #
42263 # Check for X Windows
42264 #
42265
42266 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42267 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42268 # --x-libraries for the sysroot, if that seems to be correct.
42269 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42270 if test "x$SYSROOT" != "x"; then
42271 if test "x$x_includes" = xNONE; then
42272 if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42273 x_includes="$SYSROOT/usr/X11R6/include"
42274 elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42275 x_includes="$SYSROOT/usr/include"
42276 fi
42277 fi
42278 if test "x$x_libraries" = xNONE; then
42279 if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42280 x_libraries="$SYSROOT/usr/X11R6/lib"
42281 elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42282 x_libraries="$SYSROOT/usr/lib64"
42283 elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42284 x_libraries="$SYSROOT/usr/lib"
42285 fi
42286 fi
42287 fi
42288 fi
42289
42290 # Now let autoconf do it's magic
42291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42292 $as_echo_n "checking for X... " >&6; }
42293
42294
42295 # Check whether --with-x was given.
42296 if test "${with_x+set}" = set; then :
42297 withval=$with_x;
42298 fi
42299
42300 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42301 if test "x$with_x" = xno; then
42302 # The user explicitly disabled X.
42303 have_x=disabled
42304 else
42305 case $x_includes,$x_libraries in #(
42997 yum)
42998 yum_help $MISSING_DEPENDENCY ;;
42999 port)
43000 port_help $MISSING_DEPENDENCY ;;
43001 pkgutil)
43002 pkgutil_help $MISSING_DEPENDENCY ;;
43003 pkgadd)
43004 pkgadd_help $MISSING_DEPENDENCY ;;
43005 esac
43006
43007 if test "x$PKGHANDLER_COMMAND" != x; then
43008 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43009 fi
43010 fi
43011
43012 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43013 fi
43014
43015 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43016 OPENWIN_HOME="/usr/openwin"
43017 X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43018 X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43019 -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43020 -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43021 -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43022 fi
43023
43024 #
43025 # Weird Sol10 something check...TODO change to try compile
43026 #
43027 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43028 if test "`uname -r`" = "5.10"; then
43029 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43030 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43031 fi
43032 fi
43033 fi
43034
43035 ac_ext=c
43036 ac_cpp='$CPP $CPPFLAGS'
43037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43040
43041 OLD_CFLAGS="$CFLAGS"
43042 CFLAGS="$CFLAGS $X_CFLAGS"
43043
43302 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43303 cat >>confdefs.h <<_ACEOF
43304 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43305 _ACEOF
43306
43307 CUPS_FOUND=yes
43308 CUPS_CFLAGS=
43309 DEFAULT_CUPS=yes
43310
43311
43312 fi
43313
43314 done
43315
43316 fi
43317 if test "x$CUPS_FOUND" = xno; then
43318 # Getting nervous now? Lets poke around for standard Solaris third-party
43319 # package installation locations.
43320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43321 $as_echo_n "checking for cups headers... " >&6; }
43322 if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43323 # An SFW package seems to be installed!
43324 CUPS_FOUND=yes
43325 CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43326 elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43327 # A CSW package seems to be installed!
43328 CUPS_FOUND=yes
43329 CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43330 fi
43331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43332 $as_echo "$CUPS_FOUND" >&6; }
43333 fi
43334 if test "x$CUPS_FOUND" = xno; then
43335
43336 # Print a helpful message on how to acquire the necessary build dependency.
43337 # cups is the help tag: freetype, cups, pulse, alsa etc
43338 MISSING_DEPENDENCY=cups
43339
43340 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43341 cygwin_help $MISSING_DEPENDENCY
43342 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43343 msys_help $MISSING_DEPENDENCY
43344 else
43345 PKGHANDLER_COMMAND=
43346
43347 case $PKGHANDLER in
43348 apt-get)
43349 apt_help $MISSING_DEPENDENCY ;;
43902 fi
43903 else FOUND_FREETYPE=no
43904
43905 fi
43906
43907 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43908 if test "x$FOUND_FREETYPE" = xyes; then
43909 if test "x$BUNDLE_FREETYPE" = xyes; then
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43911 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43912 FOUND_FREETYPE=no
43913 else
43914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43915 $as_echo_n "checking for freetype... " >&6; }
43916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43917 $as_echo "yes (using builddeps)" >&6; }
43918 fi
43919 fi
43920 fi
43921
43922 # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
43923 if test "x$SYSROOT" = x; then
43924 if test "x$FOUND_FREETYPE" != xyes; then
43925 # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43926 if test "x$PKG_CONFIG" != x; then
43927
43928 pkg_failed=no
43929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43930 $as_echo_n "checking for FREETYPE... " >&6; }
43931
43932 if test -n "$FREETYPE_CFLAGS"; then
43933 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43934 elif test -n "$PKG_CONFIG"; then
43935 if test -n "$PKG_CONFIG" && \
43936 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43937 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43938 ac_status=$?
43939 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43940 test $ac_status = 0; }; then
43941 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43942 else
43943 pkg_failed=yes
43995 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43996 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43997 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43998 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43999 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44000 fi
44001 # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44002 if test "x$BUNDLE_FREETYPE" = xyes; then
44003 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44004 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44005 FOUND_FREETYPE=no
44006 else
44007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44008 $as_echo_n "checking for freetype... " >&6; }
44009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44010 $as_echo "yes (using pkg-config)" >&6; }
44011 fi
44012 fi
44013 fi
44014 fi
44015 fi
44016
44017 if test "x$FOUND_FREETYPE" != xyes; then
44018 # Check in well-known locations
44019 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44020 FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44021
44022 windows_path="$FREETYPE_BASE_DIR"
44023 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44024 unix_path=`$CYGPATH -u "$windows_path"`
44025 FREETYPE_BASE_DIR="$unix_path"
44026 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44027 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44028 FREETYPE_BASE_DIR="$unix_path"
44029 fi
44030
44031
44032 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44033 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44034 METHOD="well-known location"
44035
44605 fi
44606
44607 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44608 fi
44609
44610
44611 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44613 $as_echo_n "checking for freetype includes... " >&6; }
44614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44615 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44616 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44618 $as_echo_n "checking for freetype libraries... " >&6; }
44619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44620 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44621 fi
44622
44623 fi
44624 else
44625 FREETYPE_BASE_DIR="$SYSROOT/usr"
44626
44627 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44628 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44629 METHOD="well-known location"
44630
44631 # First check if the files exists.
44632 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44633 # We found an arbitrary include file. That's a good sign.
44634 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44635 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44636 FOUND_FREETYPE=yes
44637
44638 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44639 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44640 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44641 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44642 FOUND_FREETYPE=no
44643 else
44644 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44645 # On Windows, we will need both .lib and .dll file.
44646 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44647 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44648 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44649 FOUND_FREETYPE=no
44650 fi
44651 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
44652 # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44653 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44654 fi
44655 fi
44656 fi
44657
44658 if test "x$FOUND_FREETYPE" = xyes; then
44659
44660 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44661
44662 # Input might be given as Windows format, start by converting to
44663 # unix format.
44664 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44665 new_path=`$CYGPATH -u "$path"`
44666
44667 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44668 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44669 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44670 # "foo.exe" is OK but "foo" is an error.
44671 #
44672 # This test is therefore slightly more accurate than "test -f" to check for file precense.
44673 # It is also a way to make sure we got the proper file name for the real test later on.
44674 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44675 if test "x$test_shortpath" = x; then
44676 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44677 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44678 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44679 fi
44680
44681 # Call helper function which possibly converts this using DOS-style short mode.
44682 # If so, the updated path is stored in $new_path.
44683
44684 input_path="$new_path"
44685 # Check if we need to convert this using DOS-style short mode. If the path
44686 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44687 # take no chances and rewrite it.
44688 # Note: m4 eats our [], so we need to use [ and ] instead.
44689 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44690 if test "x$has_forbidden_chars" != x; then
44691 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44692 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44693 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44694 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44695 # Going to short mode and back again did indeed matter. Since short mode is
44696 # case insensitive, let's make it lowercase to improve readability.
44697 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44698 # Now convert it back to Unix-stile (cygpath)
44699 input_path=`$CYGPATH -u "$shortmode_path"`
44700 new_path="$input_path"
44701 fi
44702 fi
44703
44704 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44705 if test "x$test_cygdrive_prefix" = x; then
44706 # As a simple fix, exclude /usr/bin since it's not a real path.
44707 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44708 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44709 # a path prefixed by /cygdrive for fixpath to work.
44710 new_path="$CYGWIN_ROOT_PATH$input_path"
44711 fi
44712 fi
44713
44714
44715 if test "x$path" != "x$new_path"; then
44716 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44717 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44718 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44719 fi
44720
44721 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44722
44723 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44724 has_colon=`$ECHO $path | $GREP ^.:`
44725 new_path="$path"
44726 if test "x$has_colon" = x; then
44727 # Not in mixed or Windows style, start by that.
44728 new_path=`cmd //c echo $path`
44729 fi
44730
44731
44732 input_path="$new_path"
44733 # Check if we need to convert this using DOS-style short mode. If the path
44734 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44735 # take no chances and rewrite it.
44736 # Note: m4 eats our [], so we need to use [ and ] instead.
44737 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44738 if test "x$has_forbidden_chars" != x; then
44739 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44740 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44741 fi
44742
44743
44744 windows_path="$new_path"
44745 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44746 unix_path=`$CYGPATH -u "$windows_path"`
44747 new_path="$unix_path"
44748 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44749 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44750 new_path="$unix_path"
44751 fi
44752
44753 if test "x$path" != "x$new_path"; then
44754 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44755 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44756 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44757 fi
44758
44759 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44760 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44761
44762 else
44763 # We're on a posix platform. Hooray! :)
44764 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44765 has_space=`$ECHO "$path" | $GREP " "`
44766 if test "x$has_space" != x; then
44767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44768 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44769 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44770 fi
44771
44772 # Use eval to expand a potential ~
44773 eval path="$path"
44774 if test ! -f "$path" && test ! -d "$path"; then
44775 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44776 fi
44777
44778 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44779 fi
44780
44781
44782 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44783
44784 # Input might be given as Windows format, start by converting to
44785 # unix format.
44786 path="$POTENTIAL_FREETYPE_LIB_PATH"
44787 new_path=`$CYGPATH -u "$path"`
44788
44789 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44790 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44791 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44792 # "foo.exe" is OK but "foo" is an error.
44793 #
44794 # This test is therefore slightly more accurate than "test -f" to check for file precense.
44795 # It is also a way to make sure we got the proper file name for the real test later on.
44796 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44797 if test "x$test_shortpath" = x; then
44798 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44799 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44800 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44801 fi
44802
44803 # Call helper function which possibly converts this using DOS-style short mode.
44804 # If so, the updated path is stored in $new_path.
44805
44806 input_path="$new_path"
44807 # Check if we need to convert this using DOS-style short mode. If the path
44808 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44809 # take no chances and rewrite it.
44810 # Note: m4 eats our [], so we need to use [ and ] instead.
44811 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44812 if test "x$has_forbidden_chars" != x; then
44813 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44814 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44815 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44816 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44817 # Going to short mode and back again did indeed matter. Since short mode is
44818 # case insensitive, let's make it lowercase to improve readability.
44819 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44820 # Now convert it back to Unix-stile (cygpath)
44821 input_path=`$CYGPATH -u "$shortmode_path"`
44822 new_path="$input_path"
44823 fi
44824 fi
44825
44826 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44827 if test "x$test_cygdrive_prefix" = x; then
44828 # As a simple fix, exclude /usr/bin since it's not a real path.
44829 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44830 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44831 # a path prefixed by /cygdrive for fixpath to work.
44832 new_path="$CYGWIN_ROOT_PATH$input_path"
44833 fi
44834 fi
44835
44836
44837 if test "x$path" != "x$new_path"; then
44838 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44839 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44840 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44841 fi
44842
44843 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844
44845 path="$POTENTIAL_FREETYPE_LIB_PATH"
44846 has_colon=`$ECHO $path | $GREP ^.:`
44847 new_path="$path"
44848 if test "x$has_colon" = x; then
44849 # Not in mixed or Windows style, start by that.
44850 new_path=`cmd //c echo $path`
44851 fi
44852
44853
44854 input_path="$new_path"
44855 # Check if we need to convert this using DOS-style short mode. If the path
44856 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44857 # take no chances and rewrite it.
44858 # Note: m4 eats our [], so we need to use [ and ] instead.
44859 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44860 if test "x$has_forbidden_chars" != x; then
44861 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44862 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44863 fi
44864
44865
44866 windows_path="$new_path"
44867 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44868 unix_path=`$CYGPATH -u "$windows_path"`
44869 new_path="$unix_path"
44870 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44871 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44872 new_path="$unix_path"
44873 fi
44874
44875 if test "x$path" != "x$new_path"; then
44876 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44877 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44878 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44879 fi
44880
44881 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44882 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44883
44884 else
44885 # We're on a posix platform. Hooray! :)
44886 path="$POTENTIAL_FREETYPE_LIB_PATH"
44887 has_space=`$ECHO "$path" | $GREP " "`
44888 if test "x$has_space" != x; then
44889 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44890 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44891 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44892 fi
44893
44894 # Use eval to expand a potential ~
44895 eval path="$path"
44896 if test ! -f "$path" && test ! -d "$path"; then
44897 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44898 fi
44899
44900 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44901 fi
44902
44903
44904 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44906 $as_echo_n "checking for freetype includes... " >&6; }
44907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44908 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44909 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44911 $as_echo_n "checking for freetype libraries... " >&6; }
44912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44913 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44914 fi
44915
44916
44917 if test "x$FOUND_FREETYPE" != xyes; then
44918 FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
44919
44920 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44921 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44922 METHOD="well-known location"
44923
44924 # First check if the files exists.
44925 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44926 # We found an arbitrary include file. That's a good sign.
44927 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44928 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44929 FOUND_FREETYPE=yes
44930
44931 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44932 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44933 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44934 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44935 FOUND_FREETYPE=no
44936 else
44937 if test "x$OPENJDK_TARGET_OS" = xwindows; then
44938 # On Windows, we will need both .lib and .dll file.
45189 if test ! -f "$path" && test ! -d "$path"; then
45190 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45191 fi
45192
45193 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45194 fi
45195
45196
45197 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45199 $as_echo_n "checking for freetype includes... " >&6; }
45200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45201 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45202 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45204 $as_echo_n "checking for freetype libraries... " >&6; }
45205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45206 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45207 fi
45208
45209 fi
45210
45211 if test "x$FOUND_FREETYPE" != xyes; then
45212 FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45213
45214 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45215 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45216 METHOD="well-known location"
45217
45218 # First check if the files exists.
45219 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45220 # We found an arbitrary include file. That's a good sign.
45221 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45222 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45223 FOUND_FREETYPE=yes
45224
45225 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45226 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45227 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45228 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45229 FOUND_FREETYPE=no
45230 else
45231 if test "x$OPENJDK_TARGET_OS" = xwindows; then
45232 # On Windows, we will need both .lib and .dll file.
45486
45487 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45488 fi
45489
45490
45491 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45493 $as_echo_n "checking for freetype includes... " >&6; }
45494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45495 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45496 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45498 $as_echo_n "checking for freetype libraries... " >&6; }
45499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45500 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45501 fi
45502
45503 fi
45504
45505 if test "x$FOUND_FREETYPE" != xyes; then
45506 FREETYPE_BASE_DIR="$SYSROOT/usr"
45507 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45508
45509 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45510 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45511 METHOD="well-known location"
45512
45513 # First check if the files exists.
45514 if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45515 # We found an arbitrary include file. That's a good sign.
45516 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45517 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45518 FOUND_FREETYPE=yes
45519
45520 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45521 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45522 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45523 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45524 FOUND_FREETYPE=no
45525 else
45526 if test "x$OPENJDK_TARGET_OS" = xwindows; then
46962 fi
46963 ALSA=$depdir
46964 if test "x$theroot" != x; then
46965 ALSA="$theroot"
46966 fi
46967 if test "x$thecflags" != x; then
46968 ALSA_CFLAGS="$thecflags"
46969 fi
46970 if test "x$thelibs" != x; then
46971 ALSA_LIBS="$thelibs"
46972 fi
46973 ALSA_FOUND=yes
46974 else ALSA_FOUND=no
46975
46976 fi
46977 else ALSA_FOUND=no
46978
46979 fi
46980
46981 fi
46982 # Do not try pkg-config if we have a sysroot set.
46983 if test "x$SYSROOT" = x; then
46984 if test "x$ALSA_FOUND" = xno; then
46985
46986 pkg_failed=no
46987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46988 $as_echo_n "checking for ALSA... " >&6; }
46989
46990 if test -n "$ALSA_CFLAGS"; then
46991 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46992 elif test -n "$PKG_CONFIG"; then
46993 if test -n "$PKG_CONFIG" && \
46994 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46995 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46996 ac_status=$?
46997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46998 test $ac_status = 0; }; then
46999 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47000 else
47001 pkg_failed=yes
47002 fi
47003 else
47033 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47034 else
47035 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47036 fi
47037 # Put the nasty error message in config.log where it belongs
47038 echo "$ALSA_PKG_ERRORS" >&5
47039
47040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47041 $as_echo "no" >&6; }
47042 ALSA_FOUND=no
47043 elif test $pkg_failed = untried; then
47044 ALSA_FOUND=no
47045 else
47046 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47047 ALSA_LIBS=$pkg_cv_ALSA_LIBS
47048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47049 $as_echo "yes" >&6; }
47050 ALSA_FOUND=yes
47051 fi
47052 fi
47053 fi
47054 if test "x$ALSA_FOUND" = xno; then
47055 for ac_header in alsa/asoundlib.h
47056 do :
47057 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47058 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47059 cat >>confdefs.h <<_ACEOF
47060 #define HAVE_ALSA_ASOUNDLIB_H 1
47061 _ACEOF
47062
47063 ALSA_FOUND=yes
47064 ALSA_CFLAGS=-Iignoreme
47065 ALSA_LIBS=-lasound
47066 DEFAULT_ALSA=yes
47067
47068 else
47069 ALSA_FOUND=no
47070 fi
47071
47072 done
47073
47912 fi
47913 done
47914
47915 unset LLVM_LIBS
47916 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47917 if echo "${flag}" | grep -q '^-l'; then
47918 if test "${LLVM_LIBS}" != ""; then
47919 LLVM_LIBS="${LLVM_LIBS} "
47920 fi
47921 LLVM_LIBS="${LLVM_LIBS}${flag}"
47922 fi
47923 done
47924
47925
47926
47927
47928 fi
47929
47930 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47931 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47932 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47933 fi
47934
47935 # TODO better (platform agnostic) test
47936 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47937 LIBCXX="-lstdc++"
47938 fi
47939
47940
47941
47942
47943 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47944
47945
47946 # Check whether --with-msvcr-dll was given.
47947 if test "${with_msvcr_dll+set}" = set; then :
47948 withval=$with_msvcr_dll;
47949 fi
47950
47951
47952 if test "x$with_msvcr_dll" != x; then
48837
48838
48839
48840
48841 # Setup use of ccache, if available
48842
48843 # Check whether --enable-ccache was given.
48844 if test "${enable_ccache+set}" = set; then :
48845 enableval=$enable_ccache;
48846 fi
48847
48848
48849 CCACHE=
48850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48851 $as_echo_n "checking is ccache enabled... " >&6; }
48852 ENABLE_CCACHE=$enable_ccache
48853 if test "x$enable_ccache" = xyes; then
48854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48855 $as_echo "yes" >&6; }
48856 OLD_PATH="$PATH"
48857 if test "x$TOOLCHAIN_PATH" != x; then
48858 PATH=$TOOLCHAIN_PATH:$PATH
48859 fi
48860
48861
48862
48863 # Publish this variable in the help.
48864
48865
48866 if test "x$CCACHE" = x; then
48867 # The variable is not set by user, try to locate tool using the code snippet
48868 for ac_prog in ccache
48869 do
48870 # Extract the first word of "$ac_prog", so it can be a program name with args.
48871 set dummy $ac_prog; ac_word=$2
48872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48873 $as_echo_n "checking for $ac_word... " >&6; }
48874 if ${ac_cv_path_CCACHE+:} false; then :
48875 $as_echo_n "(cached) " >&6
48876 else
48877 case $CCACHE in
48878 [\\/]* | ?:[\\/]*)
|