common/autoconf/generated-configure.sh

Print this page
rev 1149 : 8057538: Build the freetype library during configure on Windows


1071 with_override_corba
1072 with_override_jaxp
1073 with_override_jaxws
1074 with_override_hotspot
1075 with_override_nashorn
1076 with_override_jdk
1077 with_import_hotspot
1078 with_toolchain_type
1079 with_jtreg
1080 with_extra_cflags
1081 with_extra_cxxflags
1082 with_extra_ldflags
1083 enable_debug_symbols
1084 enable_zip_debug_info
1085 with_x
1086 with_cups
1087 with_cups_include
1088 with_freetype
1089 with_freetype_include
1090 with_freetype_lib

1091 enable_freetype_bundling
1092 with_alsa
1093 with_alsa_include
1094 with_alsa_lib
1095 with_libjpeg
1096 with_giflib
1097 with_lcms
1098 with_libpng
1099 with_zlib
1100 with_stdc__lib
1101 with_msvcr_dll
1102 with_dxsdk
1103 with_dxsdk_lib
1104 with_dxsdk_include
1105 with_num_cores
1106 with_memory_size
1107 with_jobs
1108 with_boot_jdk_jvmargs
1109 with_sjavac_server_java
1110 enable_sjavac


1925   --with-override-nashorn use this nashorn dir for the build
1926   --with-override-jdk     use this jdk dir for the build
1927   --with-import-hotspot   import hotspot binaries from this jdk image or
1928                           hotspot build dist dir instead of building from
1929                           source
1930   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1931                           to show possible values [platform dependent]
1932   --with-jtreg            Regression Test Harness [probed]
1933   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1934   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1935   --with-extra-ldflags    extra flags to be used when linking jdk
1936   --with-x                use the X Window System
1937   --with-cups             specify prefix directory for the cups package
1938                           (expecting the headers under PATH/include)
1939   --with-cups-include     specify directory for the cups include files
1940   --with-freetype         specify prefix directory for the freetype package
1941                           (expecting the libraries under PATH/lib and the
1942                           headers under PATH/include)
1943   --with-freetype-include specify directory for the freetype include files
1944   --with-freetype-lib     specify directory for the freetype library



1945   --with-alsa             specify prefix directory for the alsa package
1946                           (expecting the libraries under PATH/lib and the
1947                           headers under PATH/include)
1948   --with-alsa-include     specify directory for the alsa include files
1949   --with-alsa-lib         specify directory for the alsa library
1950   --with-libjpeg          use libjpeg from build system or OpenJDK source
1951                           (system, bundled) [bundled]
1952   --with-giflib           use giflib from build system or OpenJDK source
1953                           (system, bundled) [bundled]
1954   --with-lcms             use lcms2 from build system or OpenJDK source
1955                           (system, bundled) [bundled]
1956   --with-libpng           use libpng from build system or OpenJDK source
1957                           (system, bundled) [bundled]
1958   --with-zlib             use zlib from build system or OpenJDK source
1959                           (system, bundled) [bundled]
1960   --with-stdc++lib=<static>,<dynamic>,<default>
1961                           force linking of the C++ runtime on Linux to either
1962                           static or dynamic, default is static with dynamic as
1963                           fallback
1964   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows


4304 
4305 # Check if the VS env variables were setup prior to running configure.
4306 # If not, then find vcvarsall.bat and run it automatically, and integrate
4307 # the set env variables into the spec file.
4308 
4309 
4310 
4311 
4312 
4313 
4314 
4315 
4316 
4317 
4318 # This line needs to be here, verbatim, after all includes and the dummy hook
4319 # definitions. It is replaced with custom functionality when building
4320 # custom sources.
4321 #CUSTOM_AUTOCONF_INCLUDE
4322 
4323 # Do not change or remove the following line, it is needed for consistency checks:
4324 DATE_WHEN_GENERATED=1409311712
4325 
4326 ###############################################################################
4327 #
4328 # Initialization / Boot-strapping
4329 #
4330 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4331 # thus it jumps back and forth, each time gaining something needed later on.
4332 #
4333 ###############################################################################
4334 
4335 # If we are requested to print additional help, do that and then exit.
4336 # This must be the very first call.
4337 
4338   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4339     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4340     $PRINTF "Which are valid to use depends on the build platform.\n"
4341     for toolchain in $VALID_TOOLCHAINS_all; do
4342       # Use indirect variable referencing
4343       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4344       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}


44301   # The ubiquitous freetype library is used to render fonts.
44302   #
44303 
44304 # Check whether --with-freetype was given.
44305 if test "${with_freetype+set}" = set; then :
44306   withval=$with_freetype;
44307 fi
44308 
44309 
44310 # Check whether --with-freetype-include was given.
44311 if test "${with_freetype_include+set}" = set; then :
44312   withval=$with_freetype_include;
44313 fi
44314 
44315 
44316 # Check whether --with-freetype-lib was given.
44317 if test "${with_freetype_lib+set}" = set; then :
44318   withval=$with_freetype_lib;
44319 fi
44320 






44321   # Check whether --enable-freetype-bundling was given.
44322 if test "${enable_freetype_bundling+set}" = set; then :
44323   enableval=$enable_freetype_bundling;
44324 fi
44325 
44326 
44327   FREETYPE_CFLAGS=
44328   FREETYPE_LIBS=
44329   FREETYPE_BUNDLE_LIB_PATH=
44330 
44331   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44332     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44333       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44334 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44335     fi
44336     if test "x$enable_freetype_bundling" != x; then
44337       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44338 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44339     fi
44340   else
44341     # freetype is needed to build; go get it!
44342 
44343     BUNDLE_FREETYPE="$enable_freetype_bundling"
44344 
44345     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44346       # User has specified settings
44347 
44348       if test "x$BUNDLE_FREETYPE" = x; then
44349         # If not specified, default is to bundle freetype
44350         BUNDLE_FREETYPE=yes
44351       fi
44352 
44353       if test "x$with_freetype" != x; then
44354         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44355         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44356       fi
44357 
44358       # Allow --with-freetype-lib and --with-freetype-include to override
44359       if test "x$with_freetype_include" != x; then
44360         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44361       fi
44362       if test "x$with_freetype_lib" != x; then
44363         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44364       fi
44365 




































































































































44366       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44367         # Okay, we got it. Check that it works.
44368 
44369   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44370   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44371   METHOD="--with-freetype"
44372 
44373   # First check if the files exists.
44374   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44375     # We found an arbitrary include file. That's a good sign.
44376     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44377 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44378     FOUND_FREETYPE=yes
44379 
44380     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44381     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44382       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44383 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44384       FOUND_FREETYPE=no
44385     else


44643     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44644   fi
44645 
44646 
44647     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44648     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44649 $as_echo_n "checking for freetype includes... " >&6; }
44650     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44651 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44652     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44654 $as_echo_n "checking for freetype libraries... " >&6; }
44655     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44656 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44657   fi
44658 
44659         if test "x$FOUND_FREETYPE" != xyes; then
44660           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44661         fi
44662       else





44663         # User specified only one of lib or include. This is an error.
44664         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44665           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44666 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44667           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44668         else
44669           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44670 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44671           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5

44672         fi
44673       fi
44674     else
44675       # User did not specify settings, but we need freetype. Try to locate it.
44676 
44677       if test "x$BUNDLE_FREETYPE" = x; then
44678         # If not specified, default is to bundle freetype only on windows
44679         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44680           BUNDLE_FREETYPE=yes
44681         else
44682           BUNDLE_FREETYPE=no
44683         fi
44684       fi
44685 
44686       if test "x$FOUND_FREETYPE" != xyes; then
44687         # Check builddeps
44688 
44689 
44690   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44691     # Source the builddeps file again, to make sure it uses the latest variables!




1071 with_override_corba
1072 with_override_jaxp
1073 with_override_jaxws
1074 with_override_hotspot
1075 with_override_nashorn
1076 with_override_jdk
1077 with_import_hotspot
1078 with_toolchain_type
1079 with_jtreg
1080 with_extra_cflags
1081 with_extra_cxxflags
1082 with_extra_ldflags
1083 enable_debug_symbols
1084 enable_zip_debug_info
1085 with_x
1086 with_cups
1087 with_cups_include
1088 with_freetype
1089 with_freetype_include
1090 with_freetype_lib
1091 with_freetype_src
1092 enable_freetype_bundling
1093 with_alsa
1094 with_alsa_include
1095 with_alsa_lib
1096 with_libjpeg
1097 with_giflib
1098 with_lcms
1099 with_libpng
1100 with_zlib
1101 with_stdc__lib
1102 with_msvcr_dll
1103 with_dxsdk
1104 with_dxsdk_lib
1105 with_dxsdk_include
1106 with_num_cores
1107 with_memory_size
1108 with_jobs
1109 with_boot_jdk_jvmargs
1110 with_sjavac_server_java
1111 enable_sjavac


1926   --with-override-nashorn use this nashorn dir for the build
1927   --with-override-jdk     use this jdk dir for the build
1928   --with-import-hotspot   import hotspot binaries from this jdk image or
1929                           hotspot build dist dir instead of building from
1930                           source
1931   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1932                           to show possible values [platform dependent]
1933   --with-jtreg            Regression Test Harness [probed]
1934   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1935   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1936   --with-extra-ldflags    extra flags to be used when linking jdk
1937   --with-x                use the X Window System
1938   --with-cups             specify prefix directory for the cups package
1939                           (expecting the headers under PATH/include)
1940   --with-cups-include     specify directory for the cups include files
1941   --with-freetype         specify prefix directory for the freetype package
1942                           (expecting the libraries under PATH/lib and the
1943                           headers under PATH/include)
1944   --with-freetype-include specify directory for the freetype include files
1945   --with-freetype-lib     specify directory for the freetype library
1946   --with-freetype-src     specify directory with freetype sources to
1947                           automatically build the library (experimental,
1948                           Windows-only)
1949   --with-alsa             specify prefix directory for the alsa package
1950                           (expecting the libraries under PATH/lib and the
1951                           headers under PATH/include)
1952   --with-alsa-include     specify directory for the alsa include files
1953   --with-alsa-lib         specify directory for the alsa library
1954   --with-libjpeg          use libjpeg from build system or OpenJDK source
1955                           (system, bundled) [bundled]
1956   --with-giflib           use giflib from build system or OpenJDK source
1957                           (system, bundled) [bundled]
1958   --with-lcms             use lcms2 from build system or OpenJDK source
1959                           (system, bundled) [bundled]
1960   --with-libpng           use libpng from build system or OpenJDK source
1961                           (system, bundled) [bundled]
1962   --with-zlib             use zlib from build system or OpenJDK source
1963                           (system, bundled) [bundled]
1964   --with-stdc++lib=<static>,<dynamic>,<default>
1965                           force linking of the C++ runtime on Linux to either
1966                           static or dynamic, default is static with dynamic as
1967                           fallback
1968   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows


4308 
4309 # Check if the VS env variables were setup prior to running configure.
4310 # If not, then find vcvarsall.bat and run it automatically, and integrate
4311 # the set env variables into the spec file.
4312 
4313 
4314 
4315 
4316 
4317 
4318 
4319 
4320 
4321 
4322 # This line needs to be here, verbatim, after all includes and the dummy hook
4323 # definitions. It is replaced with custom functionality when building
4324 # custom sources.
4325 #CUSTOM_AUTOCONF_INCLUDE
4326 
4327 # Do not change or remove the following line, it is needed for consistency checks:
4328 DATE_WHEN_GENERATED=1409848681
4329 
4330 ###############################################################################
4331 #
4332 # Initialization / Boot-strapping
4333 #
4334 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4335 # thus it jumps back and forth, each time gaining something needed later on.
4336 #
4337 ###############################################################################
4338 
4339 # If we are requested to print additional help, do that and then exit.
4340 # This must be the very first call.
4341 
4342   if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4343     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4344     $PRINTF "Which are valid to use depends on the build platform.\n"
4345     for toolchain in $VALID_TOOLCHAINS_all; do
4346       # Use indirect variable referencing
4347       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4348       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}


44305   # The ubiquitous freetype library is used to render fonts.
44306   #
44307 
44308 # Check whether --with-freetype was given.
44309 if test "${with_freetype+set}" = set; then :
44310   withval=$with_freetype;
44311 fi
44312 
44313 
44314 # Check whether --with-freetype-include was given.
44315 if test "${with_freetype_include+set}" = set; then :
44316   withval=$with_freetype_include;
44317 fi
44318 
44319 
44320 # Check whether --with-freetype-lib was given.
44321 if test "${with_freetype_lib+set}" = set; then :
44322   withval=$with_freetype_lib;
44323 fi
44324 
44325 
44326 # Check whether --with-freetype-src was given.
44327 if test "${with_freetype_src+set}" = set; then :
44328   withval=$with_freetype_src;
44329 fi
44330 
44331   # Check whether --enable-freetype-bundling was given.
44332 if test "${enable_freetype_bundling+set}" = set; then :
44333   enableval=$enable_freetype_bundling;
44334 fi
44335 
44336 
44337   FREETYPE_CFLAGS=
44338   FREETYPE_LIBS=
44339   FREETYPE_BUNDLE_LIB_PATH=
44340 
44341   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44342     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44343       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44344 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44345     fi
44346     if test "x$enable_freetype_bundling" != x; then
44347       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44348 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44349     fi
44350   else
44351     # freetype is needed to build; go get it!
44352 
44353     BUNDLE_FREETYPE="$enable_freetype_bundling"
44354 
44355     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x || test "x$with_freetype_src" != x; then
44356       # User has specified settings
44357 
44358       if test "x$BUNDLE_FREETYPE" = x; then
44359         # If not specified, default is to bundle freetype
44360         BUNDLE_FREETYPE=yes
44361       fi
44362 
44363       if test "x$with_freetype" != x; then
44364         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44365         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44366       fi
44367 
44368       # Allow --with-freetype-lib and --with-freetype-include to override
44369       if test "x$with_freetype_include" != x; then
44370         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44371       fi
44372       if test "x$with_freetype_lib" != x; then
44373         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44374       fi
44375 
44376       # Try to build freetype if --with-freetype-src was given on Windows
44377       if test "x$with_freetype_src" != x && test "x$OPENJDK_TARGET_OS" = xwindows; then
44378         # Check if the freetype sources are acessible..
44379         if ! test -d $with_freetype_src; then
44380           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can't find path \"$with_freetype_src\" - ignoring --with-freetype-src" >&5
44381 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$with_freetype_src\" - ignoring --with-freetype-src" >&2;}
44382           freetype_src_ignore=true
44383         fi
44384         # ..and contain a vc2010 project file
44385         vcxproj_path="$with_freetype_src/builds/windows/vc2010/freetype.vcxproj"
44386         if test "x$freetype_src_ignore" = x && ! test -s $vcxproj_path; then
44387           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
44388 $as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44389           freetype_src_ignore=true
44390         fi
44391         # Now try to find a version of 'msbuild.exe'
44392         if test "x$freetype_src_ignore" = x; then
44393           # Add other well-known locations to the listless ...
44394           for msbuild_exe in "c:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe"; do
44395 
44396   windows_path="$msbuild_exe"
44397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398     unix_path=`$CYGPATH -u "$windows_path"`
44399     msbuild_exe="$unix_path"
44400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402     msbuild_exe="$unix_path"
44403   fi
44404 
44405             if test -s $msbuild_exe; then
44406               msbuild_exe_path=$windows_path
44407               { $as_echo "$as_me:${as_lineno-$LINENO}: Found msbuild.exe at $msbuild_exe" >&5
44408 $as_echo "$as_me: Found msbuild.exe at $msbuild_exe" >&6;}
44409               break;
44410             fi
44411           done
44412           if test "x$msbuild_exe_path" = x; then
44413             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
44414 $as_echo "$as_me: WARNING: Can't find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
44415             freetype_src_ignore=true
44416           fi
44417         fi
44418 
44419         # Ready to go..
44420         if test "x$freetype_src_ignore" = x; then
44421 
44422           # msbuild requires trailing slashes for output direcoties
44423           freetype_lib_path="$with_freetype_src/lib$OPENJDK_TARGET_CPU_BITS/"
44424           freetype_lib_path_unix="$freetype_lib_path"
44425           freetype_obj_path="$with_freetype_src/obj$OPENJDK_TARGET_CPU_BITS/"
44426 
44427   unix_path="$vcxproj_path"
44428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429     windows_path=`$CYGPATH -m "$unix_path"`
44430     vcxproj_path="$windows_path"
44431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44432     windows_path=`cmd //c echo $unix_path`
44433     vcxproj_path="$windows_path"
44434   fi
44435 
44436 
44437   unix_path="$freetype_lib_path"
44438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44439     windows_path=`$CYGPATH -m "$unix_path"`
44440     freetype_lib_path="$windows_path"
44441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44442     windows_path=`cmd //c echo $unix_path`
44443     freetype_lib_path="$windows_path"
44444   fi
44445 
44446 
44447   unix_path="$freetype_obj_path"
44448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44449     windows_path=`$CYGPATH -m "$unix_path"`
44450     freetype_obj_path="$windows_path"
44451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44452     windows_path=`cmd //c echo $unix_path`
44453     freetype_obj_path="$windows_path"
44454   fi
44455 
44456           if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44457             freetype_platform=x64
44458           else
44459             freetype_platform=win32
44460           fi
44461           # The original freetype project file is for VS 2010 (i.e. 'v100'), so we have to adapt the toolset if building with the SDK
44462           # TODO: we may also have to set the toolset to 'v110' or 'v120' if building with VS 2012 or VS2013 respectively
44463           # TODO: find a better (more reliable) test for the actual, active toolset
44464           if $ECHO "$VS_PATH" | grep -q 'SDKs'; then
44465             freetype_platform_toolset="/p:PlatformToolset=Windows7.1SDK"
44466           fi
44467 
44468           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src - trying to compile freetype sources to $freetype_lib_path_unix .." >&5
44469 $as_echo "$as_me: User specified --with-freetype-src - trying to compile freetype sources to $freetype_lib_path_unix .." >&6;}
44470 
44471           # First we try to build the freetype.dll
44472           $ECHO -e "@echo off\n"\
44473                    "$msbuild_exe_path $vcxproj_path $freetype_platform_toolset "\
44474                                       "/p:Configuration=\"Release Multithreaded\" "\
44475                                       "/p:Platform=$freetype_platform "\
44476                                       "/p:ConfigurationType=DynamicLibrary "\
44477                                       "/p:TargetName=freetype "\
44478                                       "/p:OutDir=\"$freetype_lib_path\" "\
44479                                       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44480           cmd /c freetype.bat
44481 
44482           if test -s "$freetype_lib_path_unix/freetype.dll"; then
44483             # If that succeeds we also build freetype.lib
44484             $ECHO -e "@echo off\n"\
44485                      "$msbuild_exe_path $vcxproj_path $freetype_platform_toolset "\
44486                                         "/p:Configuration=\"Release Multithreaded\" "\
44487                                         "/p:Platform=$freetype_platform "\
44488                                         "/p:ConfigurationType=StaticLibrary "\
44489                                         "/p:TargetName=freetype "\
44490                                         "/p:OutDir=\"$freetype_lib_path\" "\
44491                                         "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44492             cmd /c freetype.bat
44493 
44494             if test -s "$freetype_lib_path_unix/freetype.lib"; then
44495               # Once we build both, lib and dll, set freetype lib and include path appropriately
44496               POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_src/include"
44497               POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44498               { $as_echo "$as_me:${as_lineno-$LINENO}: ..compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44499 $as_echo "$as_me: ..compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44500             fi
44501           fi
44502         fi
44503       else
44504         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44505 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44506       fi
44507 
44508       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44509         # Okay, we got it. Check that it works.
44510 
44511   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44512   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44513   METHOD="--with-freetype"
44514 
44515   # First check if the files exists.
44516   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44517     # We found an arbitrary include file. That's a good sign.
44518     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44519 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44520     FOUND_FREETYPE=yes
44521 
44522     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44523     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44524       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44525 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44526       FOUND_FREETYPE=no
44527     else


44785     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44786   fi
44787 
44788 
44789     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44791 $as_echo_n "checking for freetype includes... " >&6; }
44792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44793 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44794     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44796 $as_echo_n "checking for freetype libraries... " >&6; }
44797     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44798 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44799   fi
44800 
44801         if test "x$FOUND_FREETYPE" != xyes; then
44802           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44803         fi
44804       else
44805         if test "x$with_freetype_src" != x; then
44806             { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44807 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44808             as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44809         else
44810           # User specified only one of lib or include. This is an error.
44811           if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44812             { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44813 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44814             as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44815           else
44816             { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44817 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44818             as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44819           fi
44820         fi
44821       fi
44822     else
44823       # User did not specify settings, but we need freetype. Try to locate it.
44824 
44825       if test "x$BUNDLE_FREETYPE" = x; then
44826         # If not specified, default is to bundle freetype only on windows
44827         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44828           BUNDLE_FREETYPE=yes
44829         else
44830           BUNDLE_FREETYPE=no
44831         fi
44832       fi
44833 
44834       if test "x$FOUND_FREETYPE" != xyes; then
44835         # Check builddeps
44836 
44837 
44838   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44839     # Source the builddeps file again, to make sure it uses the latest variables!