Wed, 23 Oct 2013 13:05:58 +0200
8001922: Improve freetype handling.
Reviewed-by: erikj
1.1 --- a/common/autoconf/configure.ac Tue Oct 22 16:41:34 2013 -0700 1.2 +++ b/common/autoconf/configure.ac Wed Oct 23 13:05:58 2013 +0200 1.3 @@ -177,6 +177,9 @@ 1.4 # 1.5 ############################################################################### 1.6 1.7 +# After we have toolchain, we can compile fixpath. It's needed by the lib checks. 1.8 +BASIC_COMPILE_FIXPATH 1.9 + 1.10 LIB_SETUP_INIT 1.11 LIB_SETUP_X11 1.12 LIB_SETUP_CUPS 1.13 @@ -185,8 +188,6 @@ 1.14 LIB_SETUP_MISC_LIBS 1.15 LIB_SETUP_STATIC_LINK_LIBSTDCPP 1.16 1.17 -# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 1.18 -BASIC_COMPILE_FIXPATH 1.19 1.20 ############################################################################### 1.21 #
2.1 --- a/common/autoconf/generated-configure.sh Tue Oct 22 16:41:34 2013 -0700 2.2 +++ b/common/autoconf/generated-configure.sh Wed Oct 23 13:05:58 2013 +0200 2.3 @@ -634,7 +634,6 @@ 2.4 ENABLE_INTREE_EC 2.5 SALIB_NAME 2.6 HOTSPOT_MAKE_ARGS 2.7 -FIXPATH 2.8 LIBCXX 2.9 LLVM_LIBS 2.10 LLVM_LDFLAGS 2.11 @@ -651,10 +650,9 @@ 2.12 USE_EXTERNAL_LIBJPEG 2.13 ALSA_LIBS 2.14 ALSA_CFLAGS 2.15 -FREETYPE2_LIB_PATH 2.16 -USING_SYSTEM_FT_LIB 2.17 -FREETYPE2_LIBS 2.18 -FREETYPE2_CFLAGS 2.19 +FREETYPE_BUNDLE_LIB_PATH 2.20 +FREETYPE_LIBS 2.21 +FREETYPE_CFLAGS 2.22 CUPS_CFLAGS 2.23 OPENWIN_HOME 2.24 X_EXTRA_LIBS 2.25 @@ -662,6 +660,7 @@ 2.26 X_PRE_LIBS 2.27 X_CFLAGS 2.28 XMKMF 2.29 +FIXPATH 2.30 CXXFLAGS_DEBUG_SYMBOLS 2.31 CFLAGS_DEBUG_SYMBOLS 2.32 ZIP_DEBUGINFO_FILES 2.33 @@ -824,8 +823,8 @@ 2.34 OS_VERSION_MAJOR 2.35 PKG_CONFIG 2.36 CODESIGN 2.37 +XATTR 2.38 DSYMUTIL 2.39 -XATTR 2.40 IS_GNU_TIME 2.41 TIME 2.42 STAT 2.43 @@ -1047,6 +1046,9 @@ 2.44 with_cups 2.45 with_cups_include 2.46 with_freetype 2.47 +with_freetype_include 2.48 +with_freetype_lib 2.49 +enable_freetype_bundling 2.50 with_alsa 2.51 with_alsa_include 2.52 with_alsa_lib 2.53 @@ -1079,8 +1081,8 @@ 2.54 CPP 2.55 CXXCPP 2.56 XMKMF 2.57 -FREETYPE2_CFLAGS 2.58 -FREETYPE2_LIBS 2.59 +FREETYPE_CFLAGS 2.60 +FREETYPE_LIBS 2.61 ALSA_CFLAGS 2.62 ALSA_LIBS 2.63 LIBFFI_CFLAGS 2.64 @@ -1719,6 +1721,10 @@ 2.65 --enable-macosx-runtime-support 2.66 Deprecated. Option is kept for backwards 2.67 compatibility and is ignored 2.68 + --disable-freetype-bundling 2.69 + disable bundling of the freetype library with the 2.70 + build result [enabled on Windows or when using 2.71 + --with-freetype, disabled otherwise] 2.72 --enable-sjavac use sjavac to do fast incremental compiles 2.73 [disabled] 2.74 --disable-precompiled-headers 2.75 @@ -1804,9 +1810,11 @@ 2.76 --with-cups specify prefix directory for the cups package 2.77 (expecting the headers under PATH/include) 2.78 --with-cups-include specify directory for the cups include files 2.79 - --with-freetype specify prefix directory for the freetype2 package 2.80 + --with-freetype specify prefix directory for the freetype package 2.81 (expecting the libraries under PATH/lib and the 2.82 headers under PATH/include) 2.83 + --with-freetype-include specify directory for the freetype include files 2.84 + --with-freetype-lib specify directory for the freetype library 2.85 --with-alsa specify prefix directory for the alsa package 2.86 (expecting the libraries under PATH/lib and the 2.87 headers under PATH/include) 2.88 @@ -1847,10 +1855,10 @@ 2.89 CPP C preprocessor 2.90 CXXCPP C++ preprocessor 2.91 XMKMF Path to xmkmf, Makefile generator for X Window System 2.92 - FREETYPE2_CFLAGS 2.93 - C compiler flags for FREETYPE2, overriding pkg-config 2.94 - FREETYPE2_LIBS 2.95 - linker flags for FREETYPE2, overriding pkg-config 2.96 + FREETYPE_CFLAGS 2.97 + C compiler flags for FREETYPE, overriding pkg-config 2.98 + FREETYPE_LIBS 2.99 + linker flags for FREETYPE, overriding pkg-config 2.100 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config 2.101 ALSA_LIBS linker flags for ALSA, overriding pkg-config 2.102 LIBFFI_CFLAGS 2.103 @@ -3460,7 +3468,7 @@ 2.104 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )" 2.105 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.106 ;; 2.107 - freetype2) 2.108 + freetype) 2.109 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 2.110 HELP_MSG="To install freetype, run: 2.111 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe 2.112 @@ -3495,7 +3503,7 @@ 2.113 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 2.114 cups) 2.115 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 2.116 - freetype2) 2.117 + freetype) 2.118 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 2.119 pulse) 2.120 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 2.121 @@ -3518,7 +3526,7 @@ 2.122 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 2.123 cups) 2.124 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 2.125 - freetype2) 2.126 + freetype) 2.127 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; 2.128 pulse) 2.129 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;; 2.130 @@ -3646,6 +3654,8 @@ 2.131 2.132 2.133 2.134 + 2.135 + 2.136 # 2.137 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2.138 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.139 @@ -3854,7 +3864,7 @@ 2.140 #CUSTOM_AUTOCONF_INCLUDE 2.141 2.142 # Do not change or remove the following line, it is needed for consistency checks: 2.143 -DATE_WHEN_GENERATED=1382437436 2.144 +DATE_WHEN_GENERATED=1382526194 2.145 2.146 ############################################################################### 2.147 # 2.148 @@ -10514,6 +10524,65 @@ 2.149 2.150 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 2.151 2.152 + for ac_prog in dsymutil 2.153 +do 2.154 + # Extract the first word of "$ac_prog", so it can be a program name with args. 2.155 +set dummy $ac_prog; ac_word=$2 2.156 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.157 +$as_echo_n "checking for $ac_word... " >&6; } 2.158 +if ${ac_cv_path_DSYMUTIL+:} false; then : 2.159 + $as_echo_n "(cached) " >&6 2.160 +else 2.161 + case $DSYMUTIL in 2.162 + [\\/]* | ?:[\\/]*) 2.163 + ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path. 2.164 + ;; 2.165 + *) 2.166 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.167 +for as_dir in $PATH 2.168 +do 2.169 + IFS=$as_save_IFS 2.170 + test -z "$as_dir" && as_dir=. 2.171 + for ac_exec_ext in '' $ac_executable_extensions; do 2.172 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.173 + ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext" 2.174 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.175 + break 2 2.176 + fi 2.177 +done 2.178 + done 2.179 +IFS=$as_save_IFS 2.180 + 2.181 + ;; 2.182 +esac 2.183 +fi 2.184 +DSYMUTIL=$ac_cv_path_DSYMUTIL 2.185 +if test -n "$DSYMUTIL"; then 2.186 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 2.187 +$as_echo "$DSYMUTIL" >&6; } 2.188 +else 2.189 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.190 +$as_echo "no" >&6; } 2.191 +fi 2.192 + 2.193 + 2.194 + test -n "$DSYMUTIL" && break 2.195 +done 2.196 + 2.197 + 2.198 + if test "x$DSYMUTIL" = x; then 2.199 + if test "xdsymutil" = x; then 2.200 + PROG_NAME=dsymutil 2.201 + else 2.202 + PROG_NAME=dsymutil 2.203 + fi 2.204 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 2.205 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 2.206 + as_fn_error $? "Cannot continue" "$LINENO" 5 2.207 + fi 2.208 + 2.209 + 2.210 + 2.211 for ac_prog in xattr 2.212 do 2.213 # Extract the first word of "$ac_prog", so it can be a program name with args. 2.214 @@ -10628,64 +10697,6 @@ 2.215 $as_echo "yes" >&6; } 2.216 fi 2.217 fi 2.218 - 2.219 - 2.220 - for ac_prog in dsymutil 2.221 -do 2.222 - # Extract the first word of "$ac_prog", so it can be a program name with args. 2.223 -set dummy $ac_prog; ac_word=$2 2.224 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.225 -$as_echo_n "checking for $ac_word... " >&6; } 2.226 -if ${ac_cv_path_DSYMUTIL+:} false; then : 2.227 - $as_echo_n "(cached) " >&6 2.228 -else 2.229 - case $DSYMUTIL in 2.230 - [\\/]* | ?:[\\/]*) 2.231 - ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path. 2.232 - ;; 2.233 - *) 2.234 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.235 -for as_dir in $PATH 2.236 -do 2.237 - IFS=$as_save_IFS 2.238 - test -z "$as_dir" && as_dir=. 2.239 - for ac_exec_ext in '' $ac_executable_extensions; do 2.240 - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.241 - ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext" 2.242 - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.243 - break 2 2.244 - fi 2.245 -done 2.246 - done 2.247 -IFS=$as_save_IFS 2.248 - 2.249 - ;; 2.250 -esac 2.251 -fi 2.252 -DSYMUTIL=$ac_cv_path_DSYMUTIL 2.253 -if test -n "$DSYMUTIL"; then 2.254 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 2.255 -$as_echo "$DSYMUTIL" >&6; } 2.256 -else 2.257 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.258 -$as_echo "no" >&6; } 2.259 -fi 2.260 - 2.261 - 2.262 - test -n "$DSYMUTIL" && break 2.263 -done 2.264 - 2.265 - 2.266 - if test "x$DSYMUTIL" = x; then 2.267 - if test "xdsymutil" = x; then 2.268 - PROG_NAME=dsymutil 2.269 - else 2.270 - PROG_NAME=dsymutil 2.271 - fi 2.272 - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5 2.273 -$as_echo "$as_me: Could not find $PROG_NAME!" >&6;} 2.274 - as_fn_error $? "Cannot continue" "$LINENO" 5 2.275 - fi 2.276 fi 2.277 2.278 2.279 @@ -15811,7 +15822,7 @@ 2.280 if test "x$BOOT_JDK_FOUND" = xno; then 2.281 2.282 # Print a helpful message on how to acquire the necessary build dependency. 2.283 - # openjdk is the help tag: freetyp2, cups, pulse, alsa etc 2.284 + # openjdk is the help tag: freetype, cups, pulse, alsa etc 2.285 MISSING_DEPENDENCY=openjdk 2.286 2.287 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.288 @@ -19215,7 +19226,7 @@ 2.289 if test "x$CC" = x; then 2.290 2.291 # Print a helpful message on how to acquire the necessary build dependency. 2.292 - # devkit is the help tag: freetyp2, cups, pulse, alsa etc 2.293 + # devkit is the help tag: freetype, cups, pulse, alsa etc 2.294 MISSING_DEPENDENCY=devkit 2.295 2.296 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.297 @@ -20794,7 +20805,7 @@ 2.298 if test "x$CXX" = x; then 2.299 2.300 # Print a helpful message on how to acquire the necessary build dependency. 2.301 - # devkit is the help tag: freetyp2, cups, pulse, alsa etc 2.302 + # devkit is the help tag: freetype, cups, pulse, alsa etc 2.303 MISSING_DEPENDENCY=devkit 2.304 2.305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.306 @@ -29941,2951 +29952,7 @@ 2.307 # 2.308 ############################################################################### 2.309 2.310 - 2.311 - 2.312 - ############################################################################### 2.313 - # 2.314 - # OS specific settings that we never will need to probe. 2.315 - # 2.316 - if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.317 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 2.318 -$as_echo_n "checking what is not needed on Linux?... " >&6; } 2.319 - PULSE_NOT_NEEDED=yes 2.320 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 2.321 -$as_echo "pulse" >&6; } 2.322 - fi 2.323 - 2.324 - if test "x$OPENJDK_TARGET_OS" = xsolaris; then 2.325 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 2.326 -$as_echo_n "checking what is not needed on Solaris?... " >&6; } 2.327 - ALSA_NOT_NEEDED=yes 2.328 - PULSE_NOT_NEEDED=yes 2.329 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 2.330 -$as_echo "alsa pulse" >&6; } 2.331 - fi 2.332 - 2.333 - if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.334 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 2.335 -$as_echo_n "checking what is not needed on Windows?... " >&6; } 2.336 - CUPS_NOT_NEEDED=yes 2.337 - ALSA_NOT_NEEDED=yes 2.338 - PULSE_NOT_NEEDED=yes 2.339 - X11_NOT_NEEDED=yes 2.340 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 2.341 -$as_echo "alsa cups pulse x11" >&6; } 2.342 - fi 2.343 - 2.344 - if test "x$OPENJDK_TARGET_OS" = xmacosx; then 2.345 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 2.346 -$as_echo_n "checking what is not needed on MacOSX?... " >&6; } 2.347 - ALSA_NOT_NEEDED=yes 2.348 - PULSE_NOT_NEEDED=yes 2.349 - X11_NOT_NEEDED=yes 2.350 - FREETYPE2_NOT_NEEDED=yes 2.351 - # If the java runtime framework is disabled, then we need X11. 2.352 - # This will be adjusted below. 2.353 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11 freetype" >&5 2.354 -$as_echo "alsa pulse x11 freetype" >&6; } 2.355 - fi 2.356 - 2.357 - if test "x$OPENJDK_TARGET_OS" = xbsd; then 2.358 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 2.359 -$as_echo_n "checking what is not needed on bsd?... " >&6; } 2.360 - ALSA_NOT_NEEDED=yes 2.361 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 2.362 -$as_echo "alsa" >&6; } 2.363 - fi 2.364 - 2.365 - if test "x$OPENJDK" = "xfalse"; then 2.366 - FREETYPE2_NOT_NEEDED=yes 2.367 - fi 2.368 - 2.369 - if test "x$SUPPORT_HEADFUL" = xno; then 2.370 - X11_NOT_NEEDED=yes 2.371 - fi 2.372 - 2.373 - ############################################################################### 2.374 - # 2.375 - # Check for MacOSX support for OpenJDK. 2.376 - # 2.377 - 2.378 - 2.379 - # Check whether --enable-macosx-runtime-support was given. 2.380 -if test "${enable_macosx_runtime_support+set}" = set; then : 2.381 - enableval=$enable_macosx_runtime_support; 2.382 -fi 2.383 - 2.384 - if test "x$enable_macosx_runtime_support" != x; then 2.385 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5 2.386 -$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;} 2.387 - fi 2.388 - 2.389 - 2.390 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5 2.391 -$as_echo_n "checking for Mac OS X Java Framework... " >&6; } 2.392 - if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 2.393 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5 2.394 -$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; } 2.395 - else 2.396 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.397 -$as_echo "no" >&6; } 2.398 - fi 2.399 - 2.400 - 2.401 - 2.402 - ############################################################################### 2.403 - # 2.404 - # Check for X Windows 2.405 - # 2.406 - 2.407 - # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 2.408 - # Make a simple check for the libraries at the sysroot, and setup --x-includes and 2.409 - # --x-libraries for the sysroot, if that seems to be correct. 2.410 - if test "x$SYS_ROOT" != "x/"; then 2.411 - if test "x$x_includes" = xNONE; then 2.412 - if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 2.413 - x_includes="$SYS_ROOT/usr/X11R6/include" 2.414 - elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then 2.415 - x_includes="$SYS_ROOT/usr/include" 2.416 - fi 2.417 - fi 2.418 - if test "x$x_libraries" = xNONE; then 2.419 - if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 2.420 - x_libraries="$SYS_ROOT/usr/X11R6/lib" 2.421 - elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 2.422 - x_libraries="$SYS_ROOT/usr/lib64" 2.423 - elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then 2.424 - x_libraries="$SYS_ROOT/usr/lib" 2.425 - fi 2.426 - fi 2.427 - fi 2.428 - 2.429 - # Now let autoconf do it's magic 2.430 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 2.431 -$as_echo_n "checking for X... " >&6; } 2.432 - 2.433 - 2.434 -# Check whether --with-x was given. 2.435 -if test "${with_x+set}" = set; then : 2.436 - withval=$with_x; 2.437 -fi 2.438 - 2.439 -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. 2.440 -if test "x$with_x" = xno; then 2.441 - # The user explicitly disabled X. 2.442 - have_x=disabled 2.443 -else 2.444 - case $x_includes,$x_libraries in #( 2.445 - *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( 2.446 - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : 2.447 - $as_echo_n "(cached) " >&6 2.448 -else 2.449 - # One or both of the vars are not set, and there is no cached value. 2.450 -ac_x_includes=no ac_x_libraries=no 2.451 -rm -f -r conftest.dir 2.452 -if mkdir conftest.dir; then 2.453 - cd conftest.dir 2.454 - cat >Imakefile <<'_ACEOF' 2.455 -incroot: 2.456 - @echo incroot='${INCROOT}' 2.457 -usrlibdir: 2.458 - @echo usrlibdir='${USRLIBDIR}' 2.459 -libdir: 2.460 - @echo libdir='${LIBDIR}' 2.461 -_ACEOF 2.462 - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 2.463 - # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 2.464 - for ac_var in incroot usrlibdir libdir; do 2.465 - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 2.466 - done 2.467 - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 2.468 - for ac_extension in a so sl dylib la dll; do 2.469 - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 2.470 - test -f "$ac_im_libdir/libX11.$ac_extension"; then 2.471 - ac_im_usrlibdir=$ac_im_libdir; break 2.472 - fi 2.473 - done 2.474 - # Screen out bogus values from the imake configuration. They are 2.475 - # bogus both because they are the default anyway, and because 2.476 - # using them would break gcc on systems where it needs fixed includes. 2.477 - case $ac_im_incroot in 2.478 - /usr/include) ac_x_includes= ;; 2.479 - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 2.480 - esac 2.481 - case $ac_im_usrlibdir in 2.482 - /usr/lib | /usr/lib64 | /lib | /lib64) ;; 2.483 - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 2.484 - esac 2.485 - fi 2.486 - cd .. 2.487 - rm -f -r conftest.dir 2.488 -fi 2.489 - 2.490 -# Standard set of common directories for X headers. 2.491 -# Check X11 before X11Rn because it is often a symlink to the current release. 2.492 -ac_x_header_dirs=' 2.493 -/usr/X11/include 2.494 -/usr/X11R7/include 2.495 -/usr/X11R6/include 2.496 -/usr/X11R5/include 2.497 -/usr/X11R4/include 2.498 - 2.499 -/usr/include/X11 2.500 -/usr/include/X11R7 2.501 -/usr/include/X11R6 2.502 -/usr/include/X11R5 2.503 -/usr/include/X11R4 2.504 - 2.505 -/usr/local/X11/include 2.506 -/usr/local/X11R7/include 2.507 -/usr/local/X11R6/include 2.508 -/usr/local/X11R5/include 2.509 -/usr/local/X11R4/include 2.510 - 2.511 -/usr/local/include/X11 2.512 -/usr/local/include/X11R7 2.513 -/usr/local/include/X11R6 2.514 -/usr/local/include/X11R5 2.515 -/usr/local/include/X11R4 2.516 - 2.517 -/usr/X386/include 2.518 -/usr/x386/include 2.519 -/usr/XFree86/include/X11 2.520 - 2.521 -/usr/include 2.522 -/usr/local/include 2.523 -/usr/unsupported/include 2.524 -/usr/athena/include 2.525 -/usr/local/x11r5/include 2.526 -/usr/lpp/Xamples/include 2.527 - 2.528 -/usr/openwin/include 2.529 -/usr/openwin/share/include' 2.530 - 2.531 -if test "$ac_x_includes" = no; then 2.532 - # Guess where to find include files, by looking for Xlib.h. 2.533 - # First, try using that file with no special directory specified. 2.534 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.535 -/* end confdefs.h. */ 2.536 -#include <X11/Xlib.h> 2.537 -_ACEOF 2.538 -if ac_fn_cxx_try_cpp "$LINENO"; then : 2.539 - # We can compile using X headers with no special include directory. 2.540 -ac_x_includes= 2.541 -else 2.542 - for ac_dir in $ac_x_header_dirs; do 2.543 - if test -r "$ac_dir/X11/Xlib.h"; then 2.544 - ac_x_includes=$ac_dir 2.545 - break 2.546 - fi 2.547 -done 2.548 -fi 2.549 -rm -f conftest.err conftest.i conftest.$ac_ext 2.550 -fi # $ac_x_includes = no 2.551 - 2.552 -if test "$ac_x_libraries" = no; then 2.553 - # Check for the libraries. 2.554 - # See if we find them without any special options. 2.555 - # Don't add to $LIBS permanently. 2.556 - ac_save_LIBS=$LIBS 2.557 - LIBS="-lX11 $LIBS" 2.558 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.559 -/* end confdefs.h. */ 2.560 -#include <X11/Xlib.h> 2.561 -int 2.562 -main () 2.563 -{ 2.564 -XrmInitialize () 2.565 - ; 2.566 - return 0; 2.567 -} 2.568 -_ACEOF 2.569 -if ac_fn_cxx_try_link "$LINENO"; then : 2.570 - LIBS=$ac_save_LIBS 2.571 -# We can link X programs with no special library path. 2.572 -ac_x_libraries= 2.573 -else 2.574 - LIBS=$ac_save_LIBS 2.575 -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 2.576 -do 2.577 - # Don't even attempt the hair of trying to link an X program! 2.578 - for ac_extension in a so sl dylib la dll; do 2.579 - if test -r "$ac_dir/libX11.$ac_extension"; then 2.580 - ac_x_libraries=$ac_dir 2.581 - break 2 2.582 - fi 2.583 - done 2.584 -done 2.585 -fi 2.586 -rm -f core conftest.err conftest.$ac_objext \ 2.587 - conftest$ac_exeext conftest.$ac_ext 2.588 -fi # $ac_x_libraries = no 2.589 - 2.590 -case $ac_x_includes,$ac_x_libraries in #( 2.591 - no,* | *,no | *\'*) 2.592 - # Didn't find X, or a directory has "'" in its name. 2.593 - ac_cv_have_x="have_x=no";; #( 2.594 - *) 2.595 - # Record where we found X for the cache. 2.596 - ac_cv_have_x="have_x=yes\ 2.597 - ac_x_includes='$ac_x_includes'\ 2.598 - ac_x_libraries='$ac_x_libraries'" 2.599 -esac 2.600 -fi 2.601 -;; #( 2.602 - *) have_x=yes;; 2.603 - esac 2.604 - eval "$ac_cv_have_x" 2.605 -fi # $with_x != no 2.606 - 2.607 -if test "$have_x" != yes; then 2.608 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 2.609 -$as_echo "$have_x" >&6; } 2.610 - no_x=yes 2.611 -else 2.612 - # If each of the values was on the command line, it overrides each guess. 2.613 - test "x$x_includes" = xNONE && x_includes=$ac_x_includes 2.614 - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 2.615 - # Update the cache value to reflect the command line values. 2.616 - ac_cv_have_x="have_x=yes\ 2.617 - ac_x_includes='$x_includes'\ 2.618 - ac_x_libraries='$x_libraries'" 2.619 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 2.620 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } 2.621 -fi 2.622 - 2.623 - if test "$no_x" = yes; then 2.624 - # Not all programs may use this symbol, but it does not hurt to define it. 2.625 - 2.626 -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 2.627 - 2.628 - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 2.629 -else 2.630 - if test -n "$x_includes"; then 2.631 - X_CFLAGS="$X_CFLAGS -I$x_includes" 2.632 - fi 2.633 - 2.634 - # It would also be nice to do this for all -L options, not just this one. 2.635 - if test -n "$x_libraries"; then 2.636 - X_LIBS="$X_LIBS -L$x_libraries" 2.637 - # For Solaris; some versions of Sun CC require a space after -R and 2.638 - # others require no space. Words are not sufficient . . . . 2.639 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 2.640 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } 2.641 - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 2.642 - ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 2.643 - ac_cxx_werror_flag=yes 2.644 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.645 -/* end confdefs.h. */ 2.646 - 2.647 -int 2.648 -main () 2.649 -{ 2.650 - 2.651 - ; 2.652 - return 0; 2.653 -} 2.654 -_ACEOF 2.655 -if ac_fn_cxx_try_link "$LINENO"; then : 2.656 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.657 -$as_echo "no" >&6; } 2.658 - X_LIBS="$X_LIBS -R$x_libraries" 2.659 -else 2.660 - LIBS="$ac_xsave_LIBS -R $x_libraries" 2.661 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.662 -/* end confdefs.h. */ 2.663 - 2.664 -int 2.665 -main () 2.666 -{ 2.667 - 2.668 - ; 2.669 - return 0; 2.670 -} 2.671 -_ACEOF 2.672 -if ac_fn_cxx_try_link "$LINENO"; then : 2.673 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.674 -$as_echo "yes" >&6; } 2.675 - X_LIBS="$X_LIBS -R $x_libraries" 2.676 -else 2.677 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 2.678 -$as_echo "neither works" >&6; } 2.679 -fi 2.680 -rm -f core conftest.err conftest.$ac_objext \ 2.681 - conftest$ac_exeext conftest.$ac_ext 2.682 -fi 2.683 -rm -f core conftest.err conftest.$ac_objext \ 2.684 - conftest$ac_exeext conftest.$ac_ext 2.685 - ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 2.686 - LIBS=$ac_xsave_LIBS 2.687 - fi 2.688 - 2.689 - # Check for system-dependent libraries X programs must link with. 2.690 - # Do this before checking for the system-independent R6 libraries 2.691 - # (-lICE), since we may need -lsocket or whatever for X linking. 2.692 - 2.693 - if test "$ISC" = yes; then 2.694 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 2.695 - else 2.696 - # Martyn Johnson says this is needed for Ultrix, if the X 2.697 - # libraries were built with DECnet support. And Karl Berry says 2.698 - # the Alpha needs dnet_stub (dnet does not exist). 2.699 - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 2.700 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.701 -/* end confdefs.h. */ 2.702 - 2.703 -/* Override any GCC internal prototype to avoid an error. 2.704 - Use char because int might match the return type of a GCC 2.705 - builtin and then its argument prototype would still apply. */ 2.706 -#ifdef __cplusplus 2.707 -extern "C" 2.708 -#endif 2.709 -char XOpenDisplay (); 2.710 -int 2.711 -main () 2.712 -{ 2.713 -return XOpenDisplay (); 2.714 - ; 2.715 - return 0; 2.716 -} 2.717 -_ACEOF 2.718 -if ac_fn_cxx_try_link "$LINENO"; then : 2.719 - 2.720 -else 2.721 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 2.722 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 2.723 -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : 2.724 - $as_echo_n "(cached) " >&6 2.725 -else 2.726 - ac_check_lib_save_LIBS=$LIBS 2.727 -LIBS="-ldnet $LIBS" 2.728 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.729 -/* end confdefs.h. */ 2.730 - 2.731 -/* Override any GCC internal prototype to avoid an error. 2.732 - Use char because int might match the return type of a GCC 2.733 - builtin and then its argument prototype would still apply. */ 2.734 -#ifdef __cplusplus 2.735 -extern "C" 2.736 -#endif 2.737 -char dnet_ntoa (); 2.738 -int 2.739 -main () 2.740 -{ 2.741 -return dnet_ntoa (); 2.742 - ; 2.743 - return 0; 2.744 -} 2.745 -_ACEOF 2.746 -if ac_fn_cxx_try_link "$LINENO"; then : 2.747 - ac_cv_lib_dnet_dnet_ntoa=yes 2.748 -else 2.749 - ac_cv_lib_dnet_dnet_ntoa=no 2.750 -fi 2.751 -rm -f core conftest.err conftest.$ac_objext \ 2.752 - conftest$ac_exeext conftest.$ac_ext 2.753 -LIBS=$ac_check_lib_save_LIBS 2.754 -fi 2.755 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 2.756 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 2.757 -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : 2.758 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 2.759 -fi 2.760 - 2.761 - if test $ac_cv_lib_dnet_dnet_ntoa = no; then 2.762 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 2.763 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 2.764 -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : 2.765 - $as_echo_n "(cached) " >&6 2.766 -else 2.767 - ac_check_lib_save_LIBS=$LIBS 2.768 -LIBS="-ldnet_stub $LIBS" 2.769 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.770 -/* end confdefs.h. */ 2.771 - 2.772 -/* Override any GCC internal prototype to avoid an error. 2.773 - Use char because int might match the return type of a GCC 2.774 - builtin and then its argument prototype would still apply. */ 2.775 -#ifdef __cplusplus 2.776 -extern "C" 2.777 -#endif 2.778 -char dnet_ntoa (); 2.779 -int 2.780 -main () 2.781 -{ 2.782 -return dnet_ntoa (); 2.783 - ; 2.784 - return 0; 2.785 -} 2.786 -_ACEOF 2.787 -if ac_fn_cxx_try_link "$LINENO"; then : 2.788 - ac_cv_lib_dnet_stub_dnet_ntoa=yes 2.789 -else 2.790 - ac_cv_lib_dnet_stub_dnet_ntoa=no 2.791 -fi 2.792 -rm -f core conftest.err conftest.$ac_objext \ 2.793 - conftest$ac_exeext conftest.$ac_ext 2.794 -LIBS=$ac_check_lib_save_LIBS 2.795 -fi 2.796 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 2.797 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 2.798 -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : 2.799 - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 2.800 -fi 2.801 - 2.802 - fi 2.803 -fi 2.804 -rm -f core conftest.err conftest.$ac_objext \ 2.805 - conftest$ac_exeext conftest.$ac_ext 2.806 - LIBS="$ac_xsave_LIBS" 2.807 - 2.808 - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 2.809 - # to get the SysV transport functions. 2.810 - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 2.811 - # needs -lnsl. 2.812 - # The nsl library prevents programs from opening the X display 2.813 - # on Irix 5.2, according to T.E. Dickey. 2.814 - # The functions gethostbyname, getservbyname, and inet_addr are 2.815 - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 2.816 - ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 2.817 -if test "x$ac_cv_func_gethostbyname" = xyes; then : 2.818 - 2.819 -fi 2.820 - 2.821 - if test $ac_cv_func_gethostbyname = no; then 2.822 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 2.823 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 2.824 -if ${ac_cv_lib_nsl_gethostbyname+:} false; then : 2.825 - $as_echo_n "(cached) " >&6 2.826 -else 2.827 - ac_check_lib_save_LIBS=$LIBS 2.828 -LIBS="-lnsl $LIBS" 2.829 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.830 -/* end confdefs.h. */ 2.831 - 2.832 -/* Override any GCC internal prototype to avoid an error. 2.833 - Use char because int might match the return type of a GCC 2.834 - builtin and then its argument prototype would still apply. */ 2.835 -#ifdef __cplusplus 2.836 -extern "C" 2.837 -#endif 2.838 -char gethostbyname (); 2.839 -int 2.840 -main () 2.841 -{ 2.842 -return gethostbyname (); 2.843 - ; 2.844 - return 0; 2.845 -} 2.846 -_ACEOF 2.847 -if ac_fn_cxx_try_link "$LINENO"; then : 2.848 - ac_cv_lib_nsl_gethostbyname=yes 2.849 -else 2.850 - ac_cv_lib_nsl_gethostbyname=no 2.851 -fi 2.852 -rm -f core conftest.err conftest.$ac_objext \ 2.853 - conftest$ac_exeext conftest.$ac_ext 2.854 -LIBS=$ac_check_lib_save_LIBS 2.855 -fi 2.856 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 2.857 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 2.858 -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : 2.859 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 2.860 -fi 2.861 - 2.862 - if test $ac_cv_lib_nsl_gethostbyname = no; then 2.863 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 2.864 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 2.865 -if ${ac_cv_lib_bsd_gethostbyname+:} false; then : 2.866 - $as_echo_n "(cached) " >&6 2.867 -else 2.868 - ac_check_lib_save_LIBS=$LIBS 2.869 -LIBS="-lbsd $LIBS" 2.870 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.871 -/* end confdefs.h. */ 2.872 - 2.873 -/* Override any GCC internal prototype to avoid an error. 2.874 - Use char because int might match the return type of a GCC 2.875 - builtin and then its argument prototype would still apply. */ 2.876 -#ifdef __cplusplus 2.877 -extern "C" 2.878 -#endif 2.879 -char gethostbyname (); 2.880 -int 2.881 -main () 2.882 -{ 2.883 -return gethostbyname (); 2.884 - ; 2.885 - return 0; 2.886 -} 2.887 -_ACEOF 2.888 -if ac_fn_cxx_try_link "$LINENO"; then : 2.889 - ac_cv_lib_bsd_gethostbyname=yes 2.890 -else 2.891 - ac_cv_lib_bsd_gethostbyname=no 2.892 -fi 2.893 -rm -f core conftest.err conftest.$ac_objext \ 2.894 - conftest$ac_exeext conftest.$ac_ext 2.895 -LIBS=$ac_check_lib_save_LIBS 2.896 -fi 2.897 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 2.898 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 2.899 -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : 2.900 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 2.901 -fi 2.902 - 2.903 - fi 2.904 - fi 2.905 - 2.906 - # lieder@skyler.mavd.honeywell.com says without -lsocket, 2.907 - # socket/setsockopt and other routines are undefined under SCO ODT 2.908 - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 2.909 - # on later versions), says Simon Leinen: it contains gethostby* 2.910 - # variants that don't use the name server (or something). -lsocket 2.911 - # must be given before -lnsl if both are needed. We assume that 2.912 - # if connect needs -lnsl, so does gethostbyname. 2.913 - ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 2.914 -if test "x$ac_cv_func_connect" = xyes; then : 2.915 - 2.916 -fi 2.917 - 2.918 - if test $ac_cv_func_connect = no; then 2.919 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 2.920 -$as_echo_n "checking for connect in -lsocket... " >&6; } 2.921 -if ${ac_cv_lib_socket_connect+:} false; then : 2.922 - $as_echo_n "(cached) " >&6 2.923 -else 2.924 - ac_check_lib_save_LIBS=$LIBS 2.925 -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 2.926 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.927 -/* end confdefs.h. */ 2.928 - 2.929 -/* Override any GCC internal prototype to avoid an error. 2.930 - Use char because int might match the return type of a GCC 2.931 - builtin and then its argument prototype would still apply. */ 2.932 -#ifdef __cplusplus 2.933 -extern "C" 2.934 -#endif 2.935 -char connect (); 2.936 -int 2.937 -main () 2.938 -{ 2.939 -return connect (); 2.940 - ; 2.941 - return 0; 2.942 -} 2.943 -_ACEOF 2.944 -if ac_fn_cxx_try_link "$LINENO"; then : 2.945 - ac_cv_lib_socket_connect=yes 2.946 -else 2.947 - ac_cv_lib_socket_connect=no 2.948 -fi 2.949 -rm -f core conftest.err conftest.$ac_objext \ 2.950 - conftest$ac_exeext conftest.$ac_ext 2.951 -LIBS=$ac_check_lib_save_LIBS 2.952 -fi 2.953 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 2.954 -$as_echo "$ac_cv_lib_socket_connect" >&6; } 2.955 -if test "x$ac_cv_lib_socket_connect" = xyes; then : 2.956 - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 2.957 -fi 2.958 - 2.959 - fi 2.960 - 2.961 - # Guillermo Gomez says -lposix is necessary on A/UX. 2.962 - ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 2.963 -if test "x$ac_cv_func_remove" = xyes; then : 2.964 - 2.965 -fi 2.966 - 2.967 - if test $ac_cv_func_remove = no; then 2.968 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 2.969 -$as_echo_n "checking for remove in -lposix... " >&6; } 2.970 -if ${ac_cv_lib_posix_remove+:} false; then : 2.971 - $as_echo_n "(cached) " >&6 2.972 -else 2.973 - ac_check_lib_save_LIBS=$LIBS 2.974 -LIBS="-lposix $LIBS" 2.975 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.976 -/* end confdefs.h. */ 2.977 - 2.978 -/* Override any GCC internal prototype to avoid an error. 2.979 - Use char because int might match the return type of a GCC 2.980 - builtin and then its argument prototype would still apply. */ 2.981 -#ifdef __cplusplus 2.982 -extern "C" 2.983 -#endif 2.984 -char remove (); 2.985 -int 2.986 -main () 2.987 -{ 2.988 -return remove (); 2.989 - ; 2.990 - return 0; 2.991 -} 2.992 -_ACEOF 2.993 -if ac_fn_cxx_try_link "$LINENO"; then : 2.994 - ac_cv_lib_posix_remove=yes 2.995 -else 2.996 - ac_cv_lib_posix_remove=no 2.997 -fi 2.998 -rm -f core conftest.err conftest.$ac_objext \ 2.999 - conftest$ac_exeext conftest.$ac_ext 2.1000 -LIBS=$ac_check_lib_save_LIBS 2.1001 -fi 2.1002 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 2.1003 -$as_echo "$ac_cv_lib_posix_remove" >&6; } 2.1004 -if test "x$ac_cv_lib_posix_remove" = xyes; then : 2.1005 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 2.1006 -fi 2.1007 - 2.1008 - fi 2.1009 - 2.1010 - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 2.1011 - ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 2.1012 -if test "x$ac_cv_func_shmat" = xyes; then : 2.1013 - 2.1014 -fi 2.1015 - 2.1016 - if test $ac_cv_func_shmat = no; then 2.1017 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 2.1018 -$as_echo_n "checking for shmat in -lipc... " >&6; } 2.1019 -if ${ac_cv_lib_ipc_shmat+:} false; then : 2.1020 - $as_echo_n "(cached) " >&6 2.1021 -else 2.1022 - ac_check_lib_save_LIBS=$LIBS 2.1023 -LIBS="-lipc $LIBS" 2.1024 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.1025 -/* end confdefs.h. */ 2.1026 - 2.1027 -/* Override any GCC internal prototype to avoid an error. 2.1028 - Use char because int might match the return type of a GCC 2.1029 - builtin and then its argument prototype would still apply. */ 2.1030 -#ifdef __cplusplus 2.1031 -extern "C" 2.1032 -#endif 2.1033 -char shmat (); 2.1034 -int 2.1035 -main () 2.1036 -{ 2.1037 -return shmat (); 2.1038 - ; 2.1039 - return 0; 2.1040 -} 2.1041 -_ACEOF 2.1042 -if ac_fn_cxx_try_link "$LINENO"; then : 2.1043 - ac_cv_lib_ipc_shmat=yes 2.1044 -else 2.1045 - ac_cv_lib_ipc_shmat=no 2.1046 -fi 2.1047 -rm -f core conftest.err conftest.$ac_objext \ 2.1048 - conftest$ac_exeext conftest.$ac_ext 2.1049 -LIBS=$ac_check_lib_save_LIBS 2.1050 -fi 2.1051 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 2.1052 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } 2.1053 -if test "x$ac_cv_lib_ipc_shmat" = xyes; then : 2.1054 - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 2.1055 -fi 2.1056 - 2.1057 - fi 2.1058 - fi 2.1059 - 2.1060 - # Check for libraries that X11R6 Xt/Xaw programs need. 2.1061 - ac_save_LDFLAGS=$LDFLAGS 2.1062 - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 2.1063 - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 2.1064 - # check for ICE first), but we must link in the order -lSM -lICE or 2.1065 - # we get undefined symbols. So assume we have SM if we have ICE. 2.1066 - # These have to be linked with before -lX11, unlike the other 2.1067 - # libraries we check for below, so use a different variable. 2.1068 - # John Interrante, Karl Berry 2.1069 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 2.1070 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 2.1071 -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : 2.1072 - $as_echo_n "(cached) " >&6 2.1073 -else 2.1074 - ac_check_lib_save_LIBS=$LIBS 2.1075 -LIBS="-lICE $X_EXTRA_LIBS $LIBS" 2.1076 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.1077 -/* end confdefs.h. */ 2.1078 - 2.1079 -/* Override any GCC internal prototype to avoid an error. 2.1080 - Use char because int might match the return type of a GCC 2.1081 - builtin and then its argument prototype would still apply. */ 2.1082 -#ifdef __cplusplus 2.1083 -extern "C" 2.1084 -#endif 2.1085 -char IceConnectionNumber (); 2.1086 -int 2.1087 -main () 2.1088 -{ 2.1089 -return IceConnectionNumber (); 2.1090 - ; 2.1091 - return 0; 2.1092 -} 2.1093 -_ACEOF 2.1094 -if ac_fn_cxx_try_link "$LINENO"; then : 2.1095 - ac_cv_lib_ICE_IceConnectionNumber=yes 2.1096 -else 2.1097 - ac_cv_lib_ICE_IceConnectionNumber=no 2.1098 -fi 2.1099 -rm -f core conftest.err conftest.$ac_objext \ 2.1100 - conftest$ac_exeext conftest.$ac_ext 2.1101 -LIBS=$ac_check_lib_save_LIBS 2.1102 -fi 2.1103 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 2.1104 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 2.1105 -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : 2.1106 - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 2.1107 -fi 2.1108 - 2.1109 - LDFLAGS=$ac_save_LDFLAGS 2.1110 - 2.1111 -fi 2.1112 - 2.1113 - 2.1114 - # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 2.1115 - # this doesn't make sense so we remove it. 2.1116 - if test "x$COMPILE_TYPE" = xcross; then 2.1117 - X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 2.1118 - fi 2.1119 - 2.1120 - if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 2.1121 - 2.1122 - # Print a helpful message on how to acquire the necessary build dependency. 2.1123 - # x11 is the help tag: freetyp2, cups, pulse, alsa etc 2.1124 - MISSING_DEPENDENCY=x11 2.1125 - 2.1126 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1127 - cygwin_help $MISSING_DEPENDENCY 2.1128 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1129 - msys_help $MISSING_DEPENDENCY 2.1130 - else 2.1131 - PKGHANDLER_COMMAND= 2.1132 - 2.1133 - case $PKGHANDLER in 2.1134 - apt-get) 2.1135 - apt_help $MISSING_DEPENDENCY ;; 2.1136 - yum) 2.1137 - yum_help $MISSING_DEPENDENCY ;; 2.1138 - port) 2.1139 - port_help $MISSING_DEPENDENCY ;; 2.1140 - pkgutil) 2.1141 - pkgutil_help $MISSING_DEPENDENCY ;; 2.1142 - pkgadd) 2.1143 - pkgadd_help $MISSING_DEPENDENCY ;; 2.1144 - * ) 2.1145 - break ;; 2.1146 - esac 2.1147 - 2.1148 - if test "x$PKGHANDLER_COMMAND" != x; then 2.1149 - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.1150 - fi 2.1151 - fi 2.1152 - 2.1153 - as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 2.1154 - fi 2.1155 - 2.1156 - # Some of the old makefiles require a setting of OPENWIN_HOME 2.1157 - # Since the X11R6 directory has disappeared on later Linuxes, 2.1158 - # we need to probe for it. 2.1159 - if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.1160 - if test -d "$SYS_ROOT/usr/X11R6"; then 2.1161 - OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 2.1162 - elif test -d "$SYS_ROOT/usr/include/X11"; then 2.1163 - OPENWIN_HOME="$SYS_ROOT/usr" 2.1164 - fi 2.1165 - fi 2.1166 - if test "x$OPENJDK_TARGET_OS" = xsolaris; then 2.1167 - OPENWIN_HOME="/usr/openwin" 2.1168 - fi 2.1169 - 2.1170 - 2.1171 - 2.1172 - # 2.1173 - # Weird Sol10 something check...TODO change to try compile 2.1174 - # 2.1175 - if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 2.1176 - if test "`uname -r`" = "5.10"; then 2.1177 - if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 2.1178 - X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 2.1179 - fi 2.1180 - fi 2.1181 - fi 2.1182 - 2.1183 - ac_ext=c 2.1184 -ac_cpp='$CPP $CPPFLAGS' 2.1185 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.1186 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.1187 -ac_compiler_gnu=$ac_cv_c_compiler_gnu 2.1188 - 2.1189 - OLD_CFLAGS="$CFLAGS" 2.1190 - CFLAGS="$CFLAGS $X_CFLAGS" 2.1191 - 2.1192 - # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 2.1193 - for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h 2.1194 -do : 2.1195 - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 2.1196 -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " 2.1197 - # include <X11/Xlib.h> 2.1198 - # include <X11/Xutil.h> 2.1199 - 2.1200 - 2.1201 -" 2.1202 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 2.1203 - cat >>confdefs.h <<_ACEOF 2.1204 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 2.1205 -_ACEOF 2.1206 - X11_A_OK=yes 2.1207 -else 2.1208 - X11_A_OK=no; break 2.1209 -fi 2.1210 - 2.1211 -done 2.1212 - 2.1213 - 2.1214 - CFLAGS="$OLD_CFLAGS" 2.1215 - ac_ext=cpp 2.1216 -ac_cpp='$CXXCPP $CPPFLAGS' 2.1217 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.1218 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.1219 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.1220 - 2.1221 - 2.1222 - if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 2.1223 - 2.1224 - # Print a helpful message on how to acquire the necessary build dependency. 2.1225 - # x11 is the help tag: freetyp2, cups, pulse, alsa etc 2.1226 - MISSING_DEPENDENCY=x11 2.1227 - 2.1228 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1229 - cygwin_help $MISSING_DEPENDENCY 2.1230 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1231 - msys_help $MISSING_DEPENDENCY 2.1232 - else 2.1233 - PKGHANDLER_COMMAND= 2.1234 - 2.1235 - case $PKGHANDLER in 2.1236 - apt-get) 2.1237 - apt_help $MISSING_DEPENDENCY ;; 2.1238 - yum) 2.1239 - yum_help $MISSING_DEPENDENCY ;; 2.1240 - port) 2.1241 - port_help $MISSING_DEPENDENCY ;; 2.1242 - pkgutil) 2.1243 - pkgutil_help $MISSING_DEPENDENCY ;; 2.1244 - pkgadd) 2.1245 - pkgadd_help $MISSING_DEPENDENCY ;; 2.1246 - * ) 2.1247 - break ;; 2.1248 - esac 2.1249 - 2.1250 - if test "x$PKGHANDLER_COMMAND" != x; then 2.1251 - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.1252 - fi 2.1253 - fi 2.1254 - 2.1255 - as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5 2.1256 - fi 2.1257 - 2.1258 - 2.1259 - 2.1260 - 2.1261 - 2.1262 - 2.1263 - ############################################################################### 2.1264 - # 2.1265 - # The common unix printing system cups is used to print from java. 2.1266 - # 2.1267 - 2.1268 -# Check whether --with-cups was given. 2.1269 -if test "${with_cups+set}" = set; then : 2.1270 - withval=$with_cups; 2.1271 -fi 2.1272 - 2.1273 - 2.1274 -# Check whether --with-cups-include was given. 2.1275 -if test "${with_cups_include+set}" = set; then : 2.1276 - withval=$with_cups_include; 2.1277 -fi 2.1278 - 2.1279 - 2.1280 - if test "x$CUPS_NOT_NEEDED" = xyes; then 2.1281 - if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 2.1282 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 2.1283 -$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 2.1284 - fi 2.1285 - CUPS_CFLAGS= 2.1286 - else 2.1287 - CUPS_FOUND=no 2.1288 - 2.1289 - if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 2.1290 - as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 2.1291 - fi 2.1292 - 2.1293 - if test "x${with_cups}" != x; then 2.1294 - CUPS_CFLAGS="-I${with_cups}/include" 2.1295 - CUPS_FOUND=yes 2.1296 - fi 2.1297 - if test "x${with_cups_include}" != x; then 2.1298 - CUPS_CFLAGS="-I${with_cups_include}" 2.1299 - CUPS_FOUND=yes 2.1300 - fi 2.1301 - if test "x$CUPS_FOUND" = xno; then 2.1302 - 2.1303 - 2.1304 - if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.1305 - # Source the builddeps file again, to make sure it uses the latest variables! 2.1306 - . $builddepsfile 2.1307 - # Look for a target and build machine specific resource! 2.1308 - eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.1309 - if test "x$resource" = x; then 2.1310 - # Ok, lets instead look for a target specific resource 2.1311 - eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 2.1312 - fi 2.1313 - if test "x$resource" = x; then 2.1314 - # Ok, lets instead look for a build specific resource 2.1315 - eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 2.1316 - fi 2.1317 - if test "x$resource" = x; then 2.1318 - # Ok, lets instead look for a generic resource 2.1319 - # (The cups comes from M4 and not the shell, thus no need for eval here.) 2.1320 - resource=${builddep_cups} 2.1321 - fi 2.1322 - if test "x$resource" != x; then 2.1323 - { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 2.1324 -$as_echo "$as_me: Using builddeps $resource for cups" >&6;} 2.1325 - # If the resource in the builddeps.conf file is an existing directory, 2.1326 - # for example /java/linux/cups 2.1327 - if test -d ${resource}; then 2.1328 - depdir=${resource} 2.1329 - else 2.1330 - 2.1331 - # cups is for example mymodule 2.1332 - # $resource is for example libs/general/libmymod_1_2_3.zip 2.1333 - # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.1334 - # $with_builddeps_dir is for example /localhome/builddeps 2.1335 - # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.1336 - # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.1337 - # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.1338 - filename=`basename $resource` 2.1339 - filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.1340 - filebase=${filename%%.*} 2.1341 - extension=${filename#*.} 2.1342 - installdir=$with_builddeps_dir/$filebase 2.1343 - if test ! -f $installdir/$filename.unpacked; then 2.1344 - { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 2.1345 -$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.1346 - if test ! -d $installdir; then 2.1347 - mkdir -p $installdir 2.1348 - fi 2.1349 - if test ! -d $installdir; then 2.1350 - as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.1351 - fi 2.1352 - tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 2.1353 - touch $tmpfile 2.1354 - if test ! -f $tmpfile; then 2.1355 - as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.1356 - fi 2.1357 - 2.1358 - # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.1359 - # $tmpfile is the local file name for the downloaded file. 2.1360 - VALID_TOOL=no 2.1361 - if test "x$BDEPS_FTP" = xwget; then 2.1362 - VALID_TOOL=yes 2.1363 - wget -O $tmpfile $with_builddeps_server/$resource 2.1364 - fi 2.1365 - if test "x$BDEPS_FTP" = xlftp; then 2.1366 - VALID_TOOL=yes 2.1367 - lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.1368 - fi 2.1369 - if test "x$BDEPS_FTP" = xftp; then 2.1370 - VALID_TOOL=yes 2.1371 - FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.1372 - FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.1373 - FTPUSERPWD=${FTPSERVER%%@*} 2.1374 - if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.1375 - FTPUSER=${userpwd%%:*} 2.1376 - FTPPWD=${userpwd#*@} 2.1377 - FTPSERVER=${FTPSERVER#*@} 2.1378 - else 2.1379 - FTPUSER=ftp 2.1380 - FTPPWD=ftp 2.1381 - fi 2.1382 - # the "pass" command does not work on some 2.1383 - # ftp clients (read ftp.exe) but if it works, 2.1384 - # passive mode is better! 2.1385 - ( \ 2.1386 - echo "user $FTPUSER $FTPPWD" ; \ 2.1387 - echo "pass" ; \ 2.1388 - echo "bin" ; \ 2.1389 - echo "get $FTPPATH $tmpfile" ; \ 2.1390 - ) | ftp -in $FTPSERVER 2.1391 - fi 2.1392 - if test "x$VALID_TOOL" != xyes; then 2.1393 - as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.1394 - fi 2.1395 - 2.1396 - mv $tmpfile $installdir/$filename 2.1397 - if test ! -s $installdir/$filename; then 2.1398 - as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.1399 - fi 2.1400 - case "$extension" in 2.1401 - zip) echo "Unzipping $installdir/$filename..." 2.1402 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.1403 - ;; 2.1404 - tar.gz) echo "Untaring $installdir/$filename..." 2.1405 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.1406 - ;; 2.1407 - tgz) echo "Untaring $installdir/$filename..." 2.1408 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.1409 - ;; 2.1410 - *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.1411 - ;; 2.1412 - esac 2.1413 - fi 2.1414 - if test -f $installdir/$filename.unpacked; then 2.1415 - depdir=$installdir 2.1416 - fi 2.1417 - 2.1418 - fi 2.1419 - # Source the builddeps file again, because in the previous command, the depdir 2.1420 - # was updated to point at the current build dependency install directory. 2.1421 - . $builddepsfile 2.1422 - # Now extract variables from the builddeps.conf files. 2.1423 - theroot=${builddep_cups_ROOT} 2.1424 - thecflags=${builddep_cups_CFLAGS} 2.1425 - thelibs=${builddep_cups_LIBS} 2.1426 - if test "x$depdir" = x; then 2.1427 - as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 2.1428 - fi 2.1429 - CUPS=$depdir 2.1430 - if test "x$theroot" != x; then 2.1431 - CUPS="$theroot" 2.1432 - fi 2.1433 - if test "x$thecflags" != x; then 2.1434 - CUPS_CFLAGS="$thecflags" 2.1435 - fi 2.1436 - if test "x$thelibs" != x; then 2.1437 - CUPS_LIBS="$thelibs" 2.1438 - fi 2.1439 - CUPS_FOUND=yes 2.1440 - 2.1441 - fi 2.1442 - 2.1443 - fi 2.1444 - 2.1445 - fi 2.1446 - if test "x$CUPS_FOUND" = xno; then 2.1447 - # Are the cups headers installed in the default /usr/include location? 2.1448 - for ac_header in cups/cups.h cups/ppd.h 2.1449 -do : 2.1450 - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 2.1451 -ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 2.1452 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 2.1453 - cat >>confdefs.h <<_ACEOF 2.1454 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 2.1455 -_ACEOF 2.1456 - 2.1457 - CUPS_FOUND=yes 2.1458 - CUPS_CFLAGS= 2.1459 - DEFAULT_CUPS=yes 2.1460 - 2.1461 - 2.1462 -fi 2.1463 - 2.1464 -done 2.1465 - 2.1466 - fi 2.1467 - if test "x$CUPS_FOUND" = xno; then 2.1468 - # Getting nervous now? Lets poke around for standard Solaris third-party 2.1469 - # package installation locations. 2.1470 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 2.1471 -$as_echo_n "checking for cups headers... " >&6; } 2.1472 - if test -s /opt/sfw/cups/include/cups/cups.h; then 2.1473 - # An SFW package seems to be installed! 2.1474 - CUPS_FOUND=yes 2.1475 - CUPS_CFLAGS="-I/opt/sfw/cups/include" 2.1476 - elif test -s /opt/csw/include/cups/cups.h; then 2.1477 - # A CSW package seems to be installed! 2.1478 - CUPS_FOUND=yes 2.1479 - CUPS_CFLAGS="-I/opt/csw/include" 2.1480 - fi 2.1481 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 2.1482 -$as_echo "$CUPS_FOUND" >&6; } 2.1483 - fi 2.1484 - if test "x$CUPS_FOUND" = xno; then 2.1485 - 2.1486 - # Print a helpful message on how to acquire the necessary build dependency. 2.1487 - # cups is the help tag: freetyp2, cups, pulse, alsa etc 2.1488 - MISSING_DEPENDENCY=cups 2.1489 - 2.1490 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1491 - cygwin_help $MISSING_DEPENDENCY 2.1492 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1493 - msys_help $MISSING_DEPENDENCY 2.1494 - else 2.1495 - PKGHANDLER_COMMAND= 2.1496 - 2.1497 - case $PKGHANDLER in 2.1498 - apt-get) 2.1499 - apt_help $MISSING_DEPENDENCY ;; 2.1500 - yum) 2.1501 - yum_help $MISSING_DEPENDENCY ;; 2.1502 - port) 2.1503 - port_help $MISSING_DEPENDENCY ;; 2.1504 - pkgutil) 2.1505 - pkgutil_help $MISSING_DEPENDENCY ;; 2.1506 - pkgadd) 2.1507 - pkgadd_help $MISSING_DEPENDENCY ;; 2.1508 - * ) 2.1509 - break ;; 2.1510 - esac 2.1511 - 2.1512 - if test "x$PKGHANDLER_COMMAND" != x; then 2.1513 - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.1514 - fi 2.1515 - fi 2.1516 - 2.1517 - as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 2.1518 - fi 2.1519 - fi 2.1520 - 2.1521 - 2.1522 - 2.1523 - 2.1524 - 2.1525 - 2.1526 - ############################################################################### 2.1527 - # 2.1528 - # The ubiquitous freetype2 library is used to render fonts. 2.1529 - # 2.1530 - 2.1531 -# Check whether --with-freetype was given. 2.1532 -if test "${with_freetype+set}" = set; then : 2.1533 - withval=$with_freetype; 2.1534 -fi 2.1535 - 2.1536 - 2.1537 - # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 2.1538 - USING_SYSTEM_FT_LIB=false 2.1539 - 2.1540 - if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 2.1541 - if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 2.1542 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 2.1543 -$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 2.1544 - fi 2.1545 - FREETYPE2_CFLAGS= 2.1546 - FREETYPE2_LIBS= 2.1547 - FREETYPE2_LIB_PATH= 2.1548 - else 2.1549 - FREETYPE2_FOUND=no 2.1550 - 2.1551 - if test "x$with_freetype" != x; then 2.1552 - 2.1553 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1554 - 2.1555 - # Input might be given as Windows format, start by converting to 2.1556 - # unix format. 2.1557 - path="$with_freetype" 2.1558 - new_path=`$CYGPATH -u "$path"` 2.1559 - 2.1560 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.1561 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.1562 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.1563 - # "foo.exe" is OK but "foo" is an error. 2.1564 - # 2.1565 - # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.1566 - # It is also a way to make sure we got the proper file name for the real test later on. 2.1567 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.1568 - if test "x$test_shortpath" = x; then 2.1569 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 2.1570 -$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 2.1571 - as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5 2.1572 - fi 2.1573 - 2.1574 - # Call helper function which possibly converts this using DOS-style short mode. 2.1575 - # If so, the updated path is stored in $new_path. 2.1576 - 2.1577 - input_path="$new_path" 2.1578 - # Check if we need to convert this using DOS-style short mode. If the path 2.1579 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.1580 - # take no chances and rewrite it. 2.1581 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.1582 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.1583 - if test "x$has_forbidden_chars" != x; then 2.1584 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.1585 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.1586 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.1587 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.1588 - # Going to short mode and back again did indeed matter. Since short mode is 2.1589 - # case insensitive, let's make it lowercase to improve readability. 2.1590 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.1591 - # Now convert it back to Unix-stile (cygpath) 2.1592 - input_path=`$CYGPATH -u "$shortmode_path"` 2.1593 - new_path="$input_path" 2.1594 - fi 2.1595 - fi 2.1596 - 2.1597 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.1598 - if test "x$test_cygdrive_prefix" = x; then 2.1599 - # As a simple fix, exclude /usr/bin since it's not a real path. 2.1600 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.1601 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.1602 - # a path prefixed by /cygdrive for fixpath to work. 2.1603 - new_path="$CYGWIN_ROOT_PATH$input_path" 2.1604 - fi 2.1605 - fi 2.1606 - 2.1607 - 2.1608 - if test "x$path" != "x$new_path"; then 2.1609 - with_freetype="$new_path" 2.1610 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 2.1611 -$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 2.1612 - fi 2.1613 - 2.1614 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1615 - 2.1616 - path="$with_freetype" 2.1617 - has_colon=`$ECHO $path | $GREP ^.:` 2.1618 - new_path="$path" 2.1619 - if test "x$has_colon" = x; then 2.1620 - # Not in mixed or Windows style, start by that. 2.1621 - new_path=`cmd //c echo $path` 2.1622 - fi 2.1623 - 2.1624 - 2.1625 - input_path="$new_path" 2.1626 - # Check if we need to convert this using DOS-style short mode. If the path 2.1627 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.1628 - # take no chances and rewrite it. 2.1629 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.1630 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.1631 - if test "x$has_forbidden_chars" != x; then 2.1632 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.1633 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.1634 - fi 2.1635 - 2.1636 - 2.1637 - windows_path="$new_path" 2.1638 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1639 - unix_path=`$CYGPATH -u "$windows_path"` 2.1640 - new_path="$unix_path" 2.1641 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1642 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.1643 - new_path="$unix_path" 2.1644 - fi 2.1645 - 2.1646 - if test "x$path" != "x$new_path"; then 2.1647 - with_freetype="$new_path" 2.1648 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5 2.1649 -$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;} 2.1650 - fi 2.1651 - 2.1652 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.1653 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.1654 - 2.1655 - else 2.1656 - # We're on a posix platform. Hooray! :) 2.1657 - path="$with_freetype" 2.1658 - has_space=`$ECHO "$path" | $GREP " "` 2.1659 - if test "x$has_space" != x; then 2.1660 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5 2.1661 -$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;} 2.1662 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.1663 - fi 2.1664 - 2.1665 - # Use eval to expand a potential ~ 2.1666 - eval path="$path" 2.1667 - if test ! -f "$path" && test ! -d "$path"; then 2.1668 - as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5 2.1669 - fi 2.1670 - 2.1671 - with_freetype="`cd "$path"; $THEPWDCMD -L`" 2.1672 - fi 2.1673 - 2.1674 - FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 2.1675 - FREETYPE2_LIB_PATH="$with_freetype/lib" 2.1676 - if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 2.1677 - FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 2.1678 - FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 2.1679 - fi 2.1680 - if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.1681 - FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 2.1682 - fi 2.1683 - FREETYPE2_CFLAGS="-I$with_freetype/include" 2.1684 - if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 2.1685 - FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 2.1686 - fi 2.1687 - FREETYPE2_FOUND=yes 2.1688 - if test "x$FREETYPE2_FOUND" = xyes; then 2.1689 - # Verify that the directories exist 2.1690 - if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 2.1691 - as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5 2.1692 - fi 2.1693 - # List the contents of the lib. 2.1694 - FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 2.1695 - if test "x$FREETYPELIB" = x; then 2.1696 - as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5 2.1697 - fi 2.1698 - # Check one h-file 2.1699 - if ! test -s "$with_freetype/include/ft2build.h"; then 2.1700 - as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5 2.1701 - fi 2.1702 - fi 2.1703 - fi 2.1704 - if test "x$FREETYPE2_FOUND" = xno; then 2.1705 - 2.1706 - 2.1707 - if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.1708 - # Source the builddeps file again, to make sure it uses the latest variables! 2.1709 - . $builddepsfile 2.1710 - # Look for a target and build machine specific resource! 2.1711 - eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.1712 - if test "x$resource" = x; then 2.1713 - # Ok, lets instead look for a target specific resource 2.1714 - eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 2.1715 - fi 2.1716 - if test "x$resource" = x; then 2.1717 - # Ok, lets instead look for a build specific resource 2.1718 - eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 2.1719 - fi 2.1720 - if test "x$resource" = x; then 2.1721 - # Ok, lets instead look for a generic resource 2.1722 - # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 2.1723 - resource=${builddep_freetype2} 2.1724 - fi 2.1725 - if test "x$resource" != x; then 2.1726 - { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 2.1727 -$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 2.1728 - # If the resource in the builddeps.conf file is an existing directory, 2.1729 - # for example /java/linux/cups 2.1730 - if test -d ${resource}; then 2.1731 - depdir=${resource} 2.1732 - else 2.1733 - 2.1734 - # freetype2 is for example mymodule 2.1735 - # $resource is for example libs/general/libmymod_1_2_3.zip 2.1736 - # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.1737 - # $with_builddeps_dir is for example /localhome/builddeps 2.1738 - # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.1739 - # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.1740 - # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.1741 - filename=`basename $resource` 2.1742 - filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.1743 - filebase=${filename%%.*} 2.1744 - extension=${filename#*.} 2.1745 - installdir=$with_builddeps_dir/$filebase 2.1746 - if test ! -f $installdir/$filename.unpacked; then 2.1747 - { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 2.1748 -$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.1749 - if test ! -d $installdir; then 2.1750 - mkdir -p $installdir 2.1751 - fi 2.1752 - if test ! -d $installdir; then 2.1753 - as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.1754 - fi 2.1755 - tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 2.1756 - touch $tmpfile 2.1757 - if test ! -f $tmpfile; then 2.1758 - as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.1759 - fi 2.1760 - 2.1761 - # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.1762 - # $tmpfile is the local file name for the downloaded file. 2.1763 - VALID_TOOL=no 2.1764 - if test "x$BDEPS_FTP" = xwget; then 2.1765 - VALID_TOOL=yes 2.1766 - wget -O $tmpfile $with_builddeps_server/$resource 2.1767 - fi 2.1768 - if test "x$BDEPS_FTP" = xlftp; then 2.1769 - VALID_TOOL=yes 2.1770 - lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.1771 - fi 2.1772 - if test "x$BDEPS_FTP" = xftp; then 2.1773 - VALID_TOOL=yes 2.1774 - FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.1775 - FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.1776 - FTPUSERPWD=${FTPSERVER%%@*} 2.1777 - if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.1778 - FTPUSER=${userpwd%%:*} 2.1779 - FTPPWD=${userpwd#*@} 2.1780 - FTPSERVER=${FTPSERVER#*@} 2.1781 - else 2.1782 - FTPUSER=ftp 2.1783 - FTPPWD=ftp 2.1784 - fi 2.1785 - # the "pass" command does not work on some 2.1786 - # ftp clients (read ftp.exe) but if it works, 2.1787 - # passive mode is better! 2.1788 - ( \ 2.1789 - echo "user $FTPUSER $FTPPWD" ; \ 2.1790 - echo "pass" ; \ 2.1791 - echo "bin" ; \ 2.1792 - echo "get $FTPPATH $tmpfile" ; \ 2.1793 - ) | ftp -in $FTPSERVER 2.1794 - fi 2.1795 - if test "x$VALID_TOOL" != xyes; then 2.1796 - as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.1797 - fi 2.1798 - 2.1799 - mv $tmpfile $installdir/$filename 2.1800 - if test ! -s $installdir/$filename; then 2.1801 - as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.1802 - fi 2.1803 - case "$extension" in 2.1804 - zip) echo "Unzipping $installdir/$filename..." 2.1805 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.1806 - ;; 2.1807 - tar.gz) echo "Untaring $installdir/$filename..." 2.1808 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.1809 - ;; 2.1810 - tgz) echo "Untaring $installdir/$filename..." 2.1811 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.1812 - ;; 2.1813 - *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.1814 - ;; 2.1815 - esac 2.1816 - fi 2.1817 - if test -f $installdir/$filename.unpacked; then 2.1818 - depdir=$installdir 2.1819 - fi 2.1820 - 2.1821 - fi 2.1822 - # Source the builddeps file again, because in the previous command, the depdir 2.1823 - # was updated to point at the current build dependency install directory. 2.1824 - . $builddepsfile 2.1825 - # Now extract variables from the builddeps.conf files. 2.1826 - theroot=${builddep_freetype2_ROOT} 2.1827 - thecflags=${builddep_freetype2_CFLAGS} 2.1828 - thelibs=${builddep_freetype2_LIBS} 2.1829 - if test "x$depdir" = x; then 2.1830 - as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 2.1831 - fi 2.1832 - FREETYPE2=$depdir 2.1833 - if test "x$theroot" != x; then 2.1834 - FREETYPE2="$theroot" 2.1835 - fi 2.1836 - if test "x$thecflags" != x; then 2.1837 - FREETYPE2_CFLAGS="$thecflags" 2.1838 - fi 2.1839 - if test "x$thelibs" != x; then 2.1840 - FREETYPE2_LIBS="$thelibs" 2.1841 - fi 2.1842 - FREETYPE2_FOUND=yes 2.1843 - else FREETYPE2_FOUND=no 2.1844 - 2.1845 - fi 2.1846 - else FREETYPE2_FOUND=no 2.1847 - 2.1848 - fi 2.1849 - 2.1850 - USING_SYSTEM_FT_LIB=true 2.1851 - fi 2.1852 - if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 2.1853 - FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 2.1854 - 2.1855 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1856 - 2.1857 - # Input might be given as Windows format, start by converting to 2.1858 - # unix format. 2.1859 - path="$FREETYPELOCATION" 2.1860 - new_path=`$CYGPATH -u "$path"` 2.1861 - 2.1862 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.1863 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.1864 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.1865 - # "foo.exe" is OK but "foo" is an error. 2.1866 - # 2.1867 - # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.1868 - # It is also a way to make sure we got the proper file name for the real test later on. 2.1869 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.1870 - if test "x$test_shortpath" = x; then 2.1871 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 2.1872 -$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 2.1873 - as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5 2.1874 - fi 2.1875 - 2.1876 - # Call helper function which possibly converts this using DOS-style short mode. 2.1877 - # If so, the updated path is stored in $new_path. 2.1878 - 2.1879 - input_path="$new_path" 2.1880 - # Check if we need to convert this using DOS-style short mode. If the path 2.1881 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.1882 - # take no chances and rewrite it. 2.1883 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.1884 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.1885 - if test "x$has_forbidden_chars" != x; then 2.1886 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.1887 - shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.1888 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.1889 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.1890 - # Going to short mode and back again did indeed matter. Since short mode is 2.1891 - # case insensitive, let's make it lowercase to improve readability. 2.1892 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.1893 - # Now convert it back to Unix-stile (cygpath) 2.1894 - input_path=`$CYGPATH -u "$shortmode_path"` 2.1895 - new_path="$input_path" 2.1896 - fi 2.1897 - fi 2.1898 - 2.1899 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.1900 - if test "x$test_cygdrive_prefix" = x; then 2.1901 - # As a simple fix, exclude /usr/bin since it's not a real path. 2.1902 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.1903 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.1904 - # a path prefixed by /cygdrive for fixpath to work. 2.1905 - new_path="$CYGWIN_ROOT_PATH$input_path" 2.1906 - fi 2.1907 - fi 2.1908 - 2.1909 - 2.1910 - if test "x$path" != "x$new_path"; then 2.1911 - FREETYPELOCATION="$new_path" 2.1912 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 2.1913 -$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 2.1914 - fi 2.1915 - 2.1916 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1917 - 2.1918 - path="$FREETYPELOCATION" 2.1919 - has_colon=`$ECHO $path | $GREP ^.:` 2.1920 - new_path="$path" 2.1921 - if test "x$has_colon" = x; then 2.1922 - # Not in mixed or Windows style, start by that. 2.1923 - new_path=`cmd //c echo $path` 2.1924 - fi 2.1925 - 2.1926 - 2.1927 - input_path="$new_path" 2.1928 - # Check if we need to convert this using DOS-style short mode. If the path 2.1929 - # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.1930 - # take no chances and rewrite it. 2.1931 - # Note: m4 eats our [], so we need to use [ and ] instead. 2.1932 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.1933 - if test "x$has_forbidden_chars" != x; then 2.1934 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.1935 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.1936 - fi 2.1937 - 2.1938 - 2.1939 - windows_path="$new_path" 2.1940 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.1941 - unix_path=`$CYGPATH -u "$windows_path"` 2.1942 - new_path="$unix_path" 2.1943 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.1944 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.1945 - new_path="$unix_path" 2.1946 - fi 2.1947 - 2.1948 - if test "x$path" != "x$new_path"; then 2.1949 - FREETYPELOCATION="$new_path" 2.1950 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5 2.1951 -$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;} 2.1952 - fi 2.1953 - 2.1954 - # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.1955 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.1956 - 2.1957 - else 2.1958 - # We're on a posix platform. Hooray! :) 2.1959 - path="$FREETYPELOCATION" 2.1960 - has_space=`$ECHO "$path" | $GREP " "` 2.1961 - if test "x$has_space" != x; then 2.1962 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5 2.1963 -$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;} 2.1964 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.1965 - fi 2.1966 - 2.1967 - # Use eval to expand a potential ~ 2.1968 - eval path="$path" 2.1969 - if test ! -f "$path" && test ! -d "$path"; then 2.1970 - as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5 2.1971 - fi 2.1972 - 2.1973 - FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`" 2.1974 - fi 2.1975 - 2.1976 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5 2.1977 -$as_echo_n "checking for freetype in some standard windows locations... " >&6; } 2.1978 - if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 2.1979 - FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 2.1980 - FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 2.1981 - FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 2.1982 - if ! test -s "$FREETYPE2_LIBS"; then 2.1983 - as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5 2.1984 - fi 2.1985 - if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 2.1986 - as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5 2.1987 - fi 2.1988 - USING_SYSTEM_FT_LIB=true 2.1989 - FREETYPE2_FOUND=yes 2.1990 - fi 2.1991 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 2.1992 -$as_echo "$FREETYPE2_FOUND" >&6; } 2.1993 - fi 2.1994 - if test "x$FREETYPE2_FOUND" = xno; then 2.1995 - 2.1996 -pkg_failed=no 2.1997 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5 2.1998 -$as_echo_n "checking for FREETYPE2... " >&6; } 2.1999 - 2.2000 -if test -n "$FREETYPE2_CFLAGS"; then 2.2001 - pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS" 2.2002 - elif test -n "$PKG_CONFIG"; then 2.2003 - if test -n "$PKG_CONFIG" && \ 2.2004 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 2.2005 - ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 2.2006 - ac_status=$? 2.2007 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.2008 - test $ac_status = 0; }; then 2.2009 - pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 2.2010 -else 2.2011 - pkg_failed=yes 2.2012 -fi 2.2013 - else 2.2014 - pkg_failed=untried 2.2015 -fi 2.2016 -if test -n "$FREETYPE2_LIBS"; then 2.2017 - pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS" 2.2018 - elif test -n "$PKG_CONFIG"; then 2.2019 - if test -n "$PKG_CONFIG" && \ 2.2020 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 2.2021 - ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 2.2022 - ac_status=$? 2.2023 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.2024 - test $ac_status = 0; }; then 2.2025 - pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 2.2026 -else 2.2027 - pkg_failed=yes 2.2028 -fi 2.2029 - else 2.2030 - pkg_failed=untried 2.2031 -fi 2.2032 - 2.2033 - 2.2034 - 2.2035 -if test $pkg_failed = yes; then 2.2036 - 2.2037 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.2038 - _pkg_short_errors_supported=yes 2.2039 -else 2.2040 - _pkg_short_errors_supported=no 2.2041 -fi 2.2042 - if test $_pkg_short_errors_supported = yes; then 2.2043 - FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 2.2044 - else 2.2045 - FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 2.2046 - fi 2.2047 - # Put the nasty error message in config.log where it belongs 2.2048 - echo "$FREETYPE2_PKG_ERRORS" >&5 2.2049 - 2.2050 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.2051 -$as_echo "no" >&6; } 2.2052 - FREETYPE2_FOUND=no 2.2053 -elif test $pkg_failed = untried; then 2.2054 - FREETYPE2_FOUND=no 2.2055 -else 2.2056 - FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS 2.2057 - FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS 2.2058 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.2059 -$as_echo "yes" >&6; } 2.2060 - FREETYPE2_FOUND=yes 2.2061 -fi 2.2062 - # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 2.2063 - FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 2.2064 - USING_SYSTEM_FT_LIB=true 2.2065 - # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 2.2066 - if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 2.2067 - FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 2.2068 - fi 2.2069 - fi 2.2070 - if test "x$FREETYPE2_FOUND" = xno; then 2.2071 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5 2.2072 -$as_echo_n "checking for freetype in some standard locations... " >&6; } 2.2073 - 2.2074 - if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then 2.2075 - DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" 2.2076 - DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" 2.2077 - fi 2.2078 - if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then 2.2079 - DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" 2.2080 - DEFAULT_FREETYPE_LIBS="-lfreetype" 2.2081 - fi 2.2082 - 2.2083 - PREV_CXXCFLAGS="$CXXFLAGS" 2.2084 - PREV_LDFLAGS="$LDFLAGS" 2.2085 - CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 2.2086 - LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 2.2087 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2088 -/* end confdefs.h. */ 2.2089 - 2.2090 - #include<ft2build.h> 2.2091 - #include FT_FREETYPE_H 2.2092 - int main() { return 0; } 2.2093 - 2.2094 -_ACEOF 2.2095 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2096 - 2.2097 - # Yes, the default cflags and libs did the trick. 2.2098 - FREETYPE2_FOUND=yes 2.2099 - FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 2.2100 - FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 2.2101 - 2.2102 -else 2.2103 - 2.2104 - FREETYPE2_FOUND=no 2.2105 - 2.2106 - 2.2107 -fi 2.2108 -rm -f core conftest.err conftest.$ac_objext \ 2.2109 - conftest$ac_exeext conftest.$ac_ext 2.2110 - CXXCFLAGS="$PREV_CXXFLAGS" 2.2111 - LDFLAGS="$PREV_LDFLAGS" 2.2112 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5 2.2113 -$as_echo "$FREETYPE2_FOUND" >&6; } 2.2114 - USING_SYSTEM_FT_LIB=true 2.2115 - fi 2.2116 - if test "x$FREETYPE2_FOUND" = xno; then 2.2117 - 2.2118 - # Print a helpful message on how to acquire the necessary build dependency. 2.2119 - # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc 2.2120 - MISSING_DEPENDENCY=freetype2 2.2121 - 2.2122 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.2123 - cygwin_help $MISSING_DEPENDENCY 2.2124 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.2125 - msys_help $MISSING_DEPENDENCY 2.2126 - else 2.2127 - PKGHANDLER_COMMAND= 2.2128 - 2.2129 - case $PKGHANDLER in 2.2130 - apt-get) 2.2131 - apt_help $MISSING_DEPENDENCY ;; 2.2132 - yum) 2.2133 - yum_help $MISSING_DEPENDENCY ;; 2.2134 - port) 2.2135 - port_help $MISSING_DEPENDENCY ;; 2.2136 - pkgutil) 2.2137 - pkgutil_help $MISSING_DEPENDENCY ;; 2.2138 - pkgadd) 2.2139 - pkgadd_help $MISSING_DEPENDENCY ;; 2.2140 - * ) 2.2141 - break ;; 2.2142 - esac 2.2143 - 2.2144 - if test "x$PKGHANDLER_COMMAND" != x; then 2.2145 - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.2146 - fi 2.2147 - fi 2.2148 - 2.2149 - as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 2.2150 - fi 2.2151 - 2.2152 - if test "x$OPENJDK_TARGET_OS" != xwindows; then 2.2153 - # AC_CHECK_LIB does not support use of cl.exe 2.2154 - PREV_LDFLAGS="$LDFLAGS" 2.2155 - LDFLAGS="$FREETYPE2_LIBS" 2.2156 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5 2.2157 -$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; } 2.2158 -if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then : 2.2159 - $as_echo_n "(cached) " >&6 2.2160 -else 2.2161 - ac_check_lib_save_LIBS=$LIBS 2.2162 -LIBS="-lfreetype $LIBS" 2.2163 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2164 -/* end confdefs.h. */ 2.2165 - 2.2166 -/* Override any GCC internal prototype to avoid an error. 2.2167 - Use char because int might match the return type of a GCC 2.2168 - builtin and then its argument prototype would still apply. */ 2.2169 -#ifdef __cplusplus 2.2170 -extern "C" 2.2171 -#endif 2.2172 -char FT_Init_FreeType (); 2.2173 -int 2.2174 -main () 2.2175 -{ 2.2176 -return FT_Init_FreeType (); 2.2177 - ; 2.2178 - return 0; 2.2179 -} 2.2180 -_ACEOF 2.2181 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2182 - ac_cv_lib_freetype_FT_Init_FreeType=yes 2.2183 -else 2.2184 - ac_cv_lib_freetype_FT_Init_FreeType=no 2.2185 -fi 2.2186 -rm -f core conftest.err conftest.$ac_objext \ 2.2187 - conftest$ac_exeext conftest.$ac_ext 2.2188 -LIBS=$ac_check_lib_save_LIBS 2.2189 -fi 2.2190 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5 2.2191 -$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; } 2.2192 -if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then : 2.2193 - FREETYPE2_FOUND=true 2.2194 -else 2.2195 - as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5 2.2196 -fi 2.2197 - 2.2198 - LDFLAGS="$PREV_LDFLAGS" 2.2199 - fi 2.2200 - fi 2.2201 - 2.2202 - 2.2203 - 2.2204 - 2.2205 - 2.2206 - 2.2207 - 2.2208 - 2.2209 - ############################################################################### 2.2210 - # 2.2211 - # Check for alsa headers and libraries. Used on Linux/GNU systems. 2.2212 - # 2.2213 - 2.2214 -# Check whether --with-alsa was given. 2.2215 -if test "${with_alsa+set}" = set; then : 2.2216 - withval=$with_alsa; 2.2217 -fi 2.2218 - 2.2219 - 2.2220 -# Check whether --with-alsa-include was given. 2.2221 -if test "${with_alsa_include+set}" = set; then : 2.2222 - withval=$with_alsa_include; 2.2223 -fi 2.2224 - 2.2225 - 2.2226 -# Check whether --with-alsa-lib was given. 2.2227 -if test "${with_alsa_lib+set}" = set; then : 2.2228 - withval=$with_alsa_lib; 2.2229 -fi 2.2230 - 2.2231 - 2.2232 - if test "x$ALSA_NOT_NEEDED" = xyes; then 2.2233 - if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 2.2234 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 2.2235 -$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 2.2236 - fi 2.2237 - ALSA_CFLAGS= 2.2238 - ALSA_LIBS= 2.2239 - else 2.2240 - ALSA_FOUND=no 2.2241 - 2.2242 - if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 2.2243 - as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 2.2244 - fi 2.2245 - 2.2246 - if test "x${with_alsa}" != x; then 2.2247 - ALSA_LIBS="-L${with_alsa}/lib -lalsa" 2.2248 - ALSA_CFLAGS="-I${with_alsa}/include" 2.2249 - ALSA_FOUND=yes 2.2250 - fi 2.2251 - if test "x${with_alsa_include}" != x; then 2.2252 - ALSA_CFLAGS="-I${with_alsa_include}" 2.2253 - ALSA_FOUND=yes 2.2254 - fi 2.2255 - if test "x${with_alsa_lib}" != x; then 2.2256 - ALSA_LIBS="-L${with_alsa_lib} -lalsa" 2.2257 - ALSA_FOUND=yes 2.2258 - fi 2.2259 - if test "x$ALSA_FOUND" = xno; then 2.2260 - 2.2261 - 2.2262 - if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.2263 - # Source the builddeps file again, to make sure it uses the latest variables! 2.2264 - . $builddepsfile 2.2265 - # Look for a target and build machine specific resource! 2.2266 - eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.2267 - if test "x$resource" = x; then 2.2268 - # Ok, lets instead look for a target specific resource 2.2269 - eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 2.2270 - fi 2.2271 - if test "x$resource" = x; then 2.2272 - # Ok, lets instead look for a build specific resource 2.2273 - eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 2.2274 - fi 2.2275 - if test "x$resource" = x; then 2.2276 - # Ok, lets instead look for a generic resource 2.2277 - # (The alsa comes from M4 and not the shell, thus no need for eval here.) 2.2278 - resource=${builddep_alsa} 2.2279 - fi 2.2280 - if test "x$resource" != x; then 2.2281 - { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 2.2282 -$as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 2.2283 - # If the resource in the builddeps.conf file is an existing directory, 2.2284 - # for example /java/linux/cups 2.2285 - if test -d ${resource}; then 2.2286 - depdir=${resource} 2.2287 - else 2.2288 - 2.2289 - # alsa is for example mymodule 2.2290 - # $resource is for example libs/general/libmymod_1_2_3.zip 2.2291 - # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.2292 - # $with_builddeps_dir is for example /localhome/builddeps 2.2293 - # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.2294 - # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.2295 - # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.2296 - filename=`basename $resource` 2.2297 - filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.2298 - filebase=${filename%%.*} 2.2299 - extension=${filename#*.} 2.2300 - installdir=$with_builddeps_dir/$filebase 2.2301 - if test ! -f $installdir/$filename.unpacked; then 2.2302 - { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 2.2303 -$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.2304 - if test ! -d $installdir; then 2.2305 - mkdir -p $installdir 2.2306 - fi 2.2307 - if test ! -d $installdir; then 2.2308 - as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.2309 - fi 2.2310 - tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 2.2311 - touch $tmpfile 2.2312 - if test ! -f $tmpfile; then 2.2313 - as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.2314 - fi 2.2315 - 2.2316 - # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.2317 - # $tmpfile is the local file name for the downloaded file. 2.2318 - VALID_TOOL=no 2.2319 - if test "x$BDEPS_FTP" = xwget; then 2.2320 - VALID_TOOL=yes 2.2321 - wget -O $tmpfile $with_builddeps_server/$resource 2.2322 - fi 2.2323 - if test "x$BDEPS_FTP" = xlftp; then 2.2324 - VALID_TOOL=yes 2.2325 - lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.2326 - fi 2.2327 - if test "x$BDEPS_FTP" = xftp; then 2.2328 - VALID_TOOL=yes 2.2329 - FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.2330 - FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.2331 - FTPUSERPWD=${FTPSERVER%%@*} 2.2332 - if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.2333 - FTPUSER=${userpwd%%:*} 2.2334 - FTPPWD=${userpwd#*@} 2.2335 - FTPSERVER=${FTPSERVER#*@} 2.2336 - else 2.2337 - FTPUSER=ftp 2.2338 - FTPPWD=ftp 2.2339 - fi 2.2340 - # the "pass" command does not work on some 2.2341 - # ftp clients (read ftp.exe) but if it works, 2.2342 - # passive mode is better! 2.2343 - ( \ 2.2344 - echo "user $FTPUSER $FTPPWD" ; \ 2.2345 - echo "pass" ; \ 2.2346 - echo "bin" ; \ 2.2347 - echo "get $FTPPATH $tmpfile" ; \ 2.2348 - ) | ftp -in $FTPSERVER 2.2349 - fi 2.2350 - if test "x$VALID_TOOL" != xyes; then 2.2351 - as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.2352 - fi 2.2353 - 2.2354 - mv $tmpfile $installdir/$filename 2.2355 - if test ! -s $installdir/$filename; then 2.2356 - as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.2357 - fi 2.2358 - case "$extension" in 2.2359 - zip) echo "Unzipping $installdir/$filename..." 2.2360 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.2361 - ;; 2.2362 - tar.gz) echo "Untaring $installdir/$filename..." 2.2363 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.2364 - ;; 2.2365 - tgz) echo "Untaring $installdir/$filename..." 2.2366 - (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.2367 - ;; 2.2368 - *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.2369 - ;; 2.2370 - esac 2.2371 - fi 2.2372 - if test -f $installdir/$filename.unpacked; then 2.2373 - depdir=$installdir 2.2374 - fi 2.2375 - 2.2376 - fi 2.2377 - # Source the builddeps file again, because in the previous command, the depdir 2.2378 - # was updated to point at the current build dependency install directory. 2.2379 - . $builddepsfile 2.2380 - # Now extract variables from the builddeps.conf files. 2.2381 - theroot=${builddep_alsa_ROOT} 2.2382 - thecflags=${builddep_alsa_CFLAGS} 2.2383 - thelibs=${builddep_alsa_LIBS} 2.2384 - if test "x$depdir" = x; then 2.2385 - as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 2.2386 - fi 2.2387 - ALSA=$depdir 2.2388 - if test "x$theroot" != x; then 2.2389 - ALSA="$theroot" 2.2390 - fi 2.2391 - if test "x$thecflags" != x; then 2.2392 - ALSA_CFLAGS="$thecflags" 2.2393 - fi 2.2394 - if test "x$thelibs" != x; then 2.2395 - ALSA_LIBS="$thelibs" 2.2396 - fi 2.2397 - ALSA_FOUND=yes 2.2398 - else ALSA_FOUND=no 2.2399 - 2.2400 - fi 2.2401 - else ALSA_FOUND=no 2.2402 - 2.2403 - fi 2.2404 - 2.2405 - fi 2.2406 - if test "x$ALSA_FOUND" = xno; then 2.2407 - 2.2408 -pkg_failed=no 2.2409 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 2.2410 -$as_echo_n "checking for ALSA... " >&6; } 2.2411 - 2.2412 -if test -n "$ALSA_CFLAGS"; then 2.2413 - pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 2.2414 - elif test -n "$PKG_CONFIG"; then 2.2415 - if test -n "$PKG_CONFIG" && \ 2.2416 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 2.2417 - ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 2.2418 - ac_status=$? 2.2419 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.2420 - test $ac_status = 0; }; then 2.2421 - pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 2.2422 -else 2.2423 - pkg_failed=yes 2.2424 -fi 2.2425 - else 2.2426 - pkg_failed=untried 2.2427 -fi 2.2428 -if test -n "$ALSA_LIBS"; then 2.2429 - pkg_cv_ALSA_LIBS="$ALSA_LIBS" 2.2430 - elif test -n "$PKG_CONFIG"; then 2.2431 - if test -n "$PKG_CONFIG" && \ 2.2432 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 2.2433 - ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 2.2434 - ac_status=$? 2.2435 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.2436 - test $ac_status = 0; }; then 2.2437 - pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 2.2438 -else 2.2439 - pkg_failed=yes 2.2440 -fi 2.2441 - else 2.2442 - pkg_failed=untried 2.2443 -fi 2.2444 - 2.2445 - 2.2446 - 2.2447 -if test $pkg_failed = yes; then 2.2448 - 2.2449 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.2450 - _pkg_short_errors_supported=yes 2.2451 -else 2.2452 - _pkg_short_errors_supported=no 2.2453 -fi 2.2454 - if test $_pkg_short_errors_supported = yes; then 2.2455 - ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 2.2456 - else 2.2457 - ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 2.2458 - fi 2.2459 - # Put the nasty error message in config.log where it belongs 2.2460 - echo "$ALSA_PKG_ERRORS" >&5 2.2461 - 2.2462 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.2463 -$as_echo "no" >&6; } 2.2464 - ALSA_FOUND=no 2.2465 -elif test $pkg_failed = untried; then 2.2466 - ALSA_FOUND=no 2.2467 -else 2.2468 - ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 2.2469 - ALSA_LIBS=$pkg_cv_ALSA_LIBS 2.2470 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.2471 -$as_echo "yes" >&6; } 2.2472 - ALSA_FOUND=yes 2.2473 -fi 2.2474 - fi 2.2475 - if test "x$ALSA_FOUND" = xno; then 2.2476 - for ac_header in alsa/asoundlib.h 2.2477 -do : 2.2478 - ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 2.2479 -if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : 2.2480 - cat >>confdefs.h <<_ACEOF 2.2481 -#define HAVE_ALSA_ASOUNDLIB_H 1 2.2482 -_ACEOF 2.2483 - 2.2484 - ALSA_FOUND=yes 2.2485 - ALSA_CFLAGS=-Iignoreme 2.2486 - ALSA_LIBS=-lasound 2.2487 - DEFAULT_ALSA=yes 2.2488 - 2.2489 -else 2.2490 - ALSA_FOUND=no 2.2491 -fi 2.2492 - 2.2493 -done 2.2494 - 2.2495 - fi 2.2496 - if test "x$ALSA_FOUND" = xno; then 2.2497 - 2.2498 - # Print a helpful message on how to acquire the necessary build dependency. 2.2499 - # alsa is the help tag: freetyp2, cups, pulse, alsa etc 2.2500 - MISSING_DEPENDENCY=alsa 2.2501 - 2.2502 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.2503 - cygwin_help $MISSING_DEPENDENCY 2.2504 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.2505 - msys_help $MISSING_DEPENDENCY 2.2506 - else 2.2507 - PKGHANDLER_COMMAND= 2.2508 - 2.2509 - case $PKGHANDLER in 2.2510 - apt-get) 2.2511 - apt_help $MISSING_DEPENDENCY ;; 2.2512 - yum) 2.2513 - yum_help $MISSING_DEPENDENCY ;; 2.2514 - port) 2.2515 - port_help $MISSING_DEPENDENCY ;; 2.2516 - pkgutil) 2.2517 - pkgutil_help $MISSING_DEPENDENCY ;; 2.2518 - pkgadd) 2.2519 - pkgadd_help $MISSING_DEPENDENCY ;; 2.2520 - * ) 2.2521 - break ;; 2.2522 - esac 2.2523 - 2.2524 - if test "x$PKGHANDLER_COMMAND" != x; then 2.2525 - HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.2526 - fi 2.2527 - fi 2.2528 - 2.2529 - as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 2.2530 - fi 2.2531 - fi 2.2532 - 2.2533 - 2.2534 - 2.2535 - 2.2536 - 2.2537 - 2.2538 - ############################################################################### 2.2539 - # 2.2540 - # Check for the jpeg library 2.2541 - # 2.2542 - 2.2543 - USE_EXTERNAL_LIBJPEG=true 2.2544 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 2.2545 -$as_echo_n "checking for main in -ljpeg... " >&6; } 2.2546 -if ${ac_cv_lib_jpeg_main+:} false; then : 2.2547 - $as_echo_n "(cached) " >&6 2.2548 -else 2.2549 - ac_check_lib_save_LIBS=$LIBS 2.2550 -LIBS="-ljpeg $LIBS" 2.2551 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2552 -/* end confdefs.h. */ 2.2553 - 2.2554 - 2.2555 -int 2.2556 -main () 2.2557 -{ 2.2558 -return main (); 2.2559 - ; 2.2560 - return 0; 2.2561 -} 2.2562 -_ACEOF 2.2563 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2564 - ac_cv_lib_jpeg_main=yes 2.2565 -else 2.2566 - ac_cv_lib_jpeg_main=no 2.2567 -fi 2.2568 -rm -f core conftest.err conftest.$ac_objext \ 2.2569 - conftest$ac_exeext conftest.$ac_ext 2.2570 -LIBS=$ac_check_lib_save_LIBS 2.2571 -fi 2.2572 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 2.2573 -$as_echo "$ac_cv_lib_jpeg_main" >&6; } 2.2574 -if test "x$ac_cv_lib_jpeg_main" = xyes; then : 2.2575 - cat >>confdefs.h <<_ACEOF 2.2576 -#define HAVE_LIBJPEG 1 2.2577 -_ACEOF 2.2578 - 2.2579 - LIBS="-ljpeg $LIBS" 2.2580 - 2.2581 -else 2.2582 - USE_EXTERNAL_LIBJPEG=false 2.2583 - { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 2.2584 -$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 2.2585 - 2.2586 -fi 2.2587 - 2.2588 - 2.2589 - 2.2590 - ############################################################################### 2.2591 - # 2.2592 - # Check for the gif library 2.2593 - # 2.2594 - 2.2595 - 2.2596 -# Check whether --with-giflib was given. 2.2597 -if test "${with_giflib+set}" = set; then : 2.2598 - withval=$with_giflib; 2.2599 -fi 2.2600 - 2.2601 - 2.2602 - 2.2603 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 2.2604 -$as_echo_n "checking for which giflib to use... " >&6; } 2.2605 - 2.2606 - # default is bundled 2.2607 - DEFAULT_GIFLIB=bundled 2.2608 - 2.2609 - # 2.2610 - # if user didn't specify, use DEFAULT_GIFLIB 2.2611 - # 2.2612 - if test "x${with_giflib}" = "x"; then 2.2613 - with_giflib=${DEFAULT_GIFLIB} 2.2614 - fi 2.2615 - 2.2616 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 2.2617 -$as_echo "${with_giflib}" >&6; } 2.2618 - 2.2619 - if test "x${with_giflib}" = "xbundled"; then 2.2620 - USE_EXTERNAL_LIBGIF=false 2.2621 - elif test "x${with_giflib}" = "xsystem"; then 2.2622 - ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 2.2623 -if test "x$ac_cv_header_gif_lib_h" = xyes; then : 2.2624 - 2.2625 -else 2.2626 - as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 2.2627 -fi 2.2628 - 2.2629 - 2.2630 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 2.2631 -$as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 2.2632 -if ${ac_cv_lib_gif_DGifGetCode+:} false; then : 2.2633 - $as_echo_n "(cached) " >&6 2.2634 -else 2.2635 - ac_check_lib_save_LIBS=$LIBS 2.2636 -LIBS="-lgif $LIBS" 2.2637 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2638 -/* end confdefs.h. */ 2.2639 - 2.2640 -/* Override any GCC internal prototype to avoid an error. 2.2641 - Use char because int might match the return type of a GCC 2.2642 - builtin and then its argument prototype would still apply. */ 2.2643 -#ifdef __cplusplus 2.2644 -extern "C" 2.2645 -#endif 2.2646 -char DGifGetCode (); 2.2647 -int 2.2648 -main () 2.2649 -{ 2.2650 -return DGifGetCode (); 2.2651 - ; 2.2652 - return 0; 2.2653 -} 2.2654 -_ACEOF 2.2655 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2656 - ac_cv_lib_gif_DGifGetCode=yes 2.2657 -else 2.2658 - ac_cv_lib_gif_DGifGetCode=no 2.2659 -fi 2.2660 -rm -f core conftest.err conftest.$ac_objext \ 2.2661 - conftest$ac_exeext conftest.$ac_ext 2.2662 -LIBS=$ac_check_lib_save_LIBS 2.2663 -fi 2.2664 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 2.2665 -$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 2.2666 -if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then : 2.2667 - cat >>confdefs.h <<_ACEOF 2.2668 -#define HAVE_LIBGIF 1 2.2669 -_ACEOF 2.2670 - 2.2671 - LIBS="-lgif $LIBS" 2.2672 - 2.2673 -else 2.2674 - as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 2.2675 -fi 2.2676 - 2.2677 - 2.2678 - USE_EXTERNAL_LIBGIF=true 2.2679 - else 2.2680 - as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 2.2681 - fi 2.2682 - 2.2683 - 2.2684 - ############################################################################### 2.2685 - # 2.2686 - # Check for the zlib library 2.2687 - # 2.2688 - 2.2689 - 2.2690 -# Check whether --with-zlib was given. 2.2691 -if test "${with_zlib+set}" = set; then : 2.2692 - withval=$with_zlib; 2.2693 -fi 2.2694 - 2.2695 - 2.2696 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 2.2697 -$as_echo_n "checking for compress in -lz... " >&6; } 2.2698 -if ${ac_cv_lib_z_compress+:} false; then : 2.2699 - $as_echo_n "(cached) " >&6 2.2700 -else 2.2701 - ac_check_lib_save_LIBS=$LIBS 2.2702 -LIBS="-lz $LIBS" 2.2703 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2704 -/* end confdefs.h. */ 2.2705 - 2.2706 -/* Override any GCC internal prototype to avoid an error. 2.2707 - Use char because int might match the return type of a GCC 2.2708 - builtin and then its argument prototype would still apply. */ 2.2709 -#ifdef __cplusplus 2.2710 -extern "C" 2.2711 -#endif 2.2712 -char compress (); 2.2713 -int 2.2714 -main () 2.2715 -{ 2.2716 -return compress (); 2.2717 - ; 2.2718 - return 0; 2.2719 -} 2.2720 -_ACEOF 2.2721 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2722 - ac_cv_lib_z_compress=yes 2.2723 -else 2.2724 - ac_cv_lib_z_compress=no 2.2725 -fi 2.2726 -rm -f core conftest.err conftest.$ac_objext \ 2.2727 - conftest$ac_exeext conftest.$ac_ext 2.2728 -LIBS=$ac_check_lib_save_LIBS 2.2729 -fi 2.2730 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 2.2731 -$as_echo "$ac_cv_lib_z_compress" >&6; } 2.2732 -if test "x$ac_cv_lib_z_compress" = xyes; then : 2.2733 - ZLIB_FOUND=yes 2.2734 -else 2.2735 - ZLIB_FOUND=no 2.2736 -fi 2.2737 - 2.2738 - 2.2739 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 2.2740 -$as_echo_n "checking for which zlib to use... " >&6; } 2.2741 - 2.2742 - DEFAULT_ZLIB=bundled 2.2743 - if test "x$OPENJDK_TARGET_OS" = xmacosx; then 2.2744 - # 2.2745 - # On macosx default is system...on others default is 2.2746 - # 2.2747 - DEFAULT_ZLIB=system 2.2748 - fi 2.2749 - 2.2750 - if test "x${ZLIB_FOUND}" != "xyes"; then 2.2751 - # 2.2752 - # If we don't find any system...set default to bundled 2.2753 - # 2.2754 - DEFAULT_ZLIB=bundled 2.2755 - fi 2.2756 - 2.2757 - # 2.2758 - # If user didn't specify, use DEFAULT_ZLIB 2.2759 - # 2.2760 - if test "x${with_zlib}" = "x"; then 2.2761 - with_zlib=${DEFAULT_ZLIB} 2.2762 - fi 2.2763 - 2.2764 - if test "x${with_zlib}" = "xbundled"; then 2.2765 - USE_EXTERNAL_LIBZ=false 2.2766 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 2.2767 -$as_echo "bundled" >&6; } 2.2768 - elif test "x${with_zlib}" = "xsystem"; then 2.2769 - if test "x${ZLIB_FOUND}" = "xyes"; then 2.2770 - USE_EXTERNAL_LIBZ=true 2.2771 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 2.2772 -$as_echo "system" >&6; } 2.2773 - else 2.2774 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 2.2775 -$as_echo "system not found" >&6; } 2.2776 - as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 2.2777 - fi 2.2778 - else 2.2779 - as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 2.2780 - fi 2.2781 - 2.2782 - 2.2783 - 2.2784 - ############################################################################### 2.2785 - LIBZIP_CAN_USE_MMAP=true 2.2786 - 2.2787 - 2.2788 - 2.2789 - ############################################################################### 2.2790 - # 2.2791 - # Check if altzone exists in time.h 2.2792 - # 2.2793 - 2.2794 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2795 -/* end confdefs.h. */ 2.2796 -#include <time.h> 2.2797 -int 2.2798 -main () 2.2799 -{ 2.2800 -return (int)altzone; 2.2801 - ; 2.2802 - return 0; 2.2803 -} 2.2804 -_ACEOF 2.2805 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2806 - has_altzone=yes 2.2807 -else 2.2808 - has_altzone=no 2.2809 -fi 2.2810 -rm -f core conftest.err conftest.$ac_objext \ 2.2811 - conftest$ac_exeext conftest.$ac_ext 2.2812 - if test "x$has_altzone" = xyes; then 2.2813 - 2.2814 -$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 2.2815 - 2.2816 - fi 2.2817 - 2.2818 - ############################################################################### 2.2819 - # 2.2820 - # Check the maths library 2.2821 - # 2.2822 - 2.2823 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 2.2824 -$as_echo_n "checking for cos in -lm... " >&6; } 2.2825 -if ${ac_cv_lib_m_cos+:} false; then : 2.2826 - $as_echo_n "(cached) " >&6 2.2827 -else 2.2828 - ac_check_lib_save_LIBS=$LIBS 2.2829 -LIBS="-lm $LIBS" 2.2830 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2831 -/* end confdefs.h. */ 2.2832 - 2.2833 -/* Override any GCC internal prototype to avoid an error. 2.2834 - Use char because int might match the return type of a GCC 2.2835 - builtin and then its argument prototype would still apply. */ 2.2836 -#ifdef __cplusplus 2.2837 -extern "C" 2.2838 -#endif 2.2839 -char cos (); 2.2840 -int 2.2841 -main () 2.2842 -{ 2.2843 -return cos (); 2.2844 - ; 2.2845 - return 0; 2.2846 -} 2.2847 -_ACEOF 2.2848 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2849 - ac_cv_lib_m_cos=yes 2.2850 -else 2.2851 - ac_cv_lib_m_cos=no 2.2852 -fi 2.2853 -rm -f core conftest.err conftest.$ac_objext \ 2.2854 - conftest$ac_exeext conftest.$ac_ext 2.2855 -LIBS=$ac_check_lib_save_LIBS 2.2856 -fi 2.2857 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 2.2858 -$as_echo "$ac_cv_lib_m_cos" >&6; } 2.2859 -if test "x$ac_cv_lib_m_cos" = xyes; then : 2.2860 - cat >>confdefs.h <<_ACEOF 2.2861 -#define HAVE_LIBM 1 2.2862 -_ACEOF 2.2863 - 2.2864 - LIBS="-lm $LIBS" 2.2865 - 2.2866 -else 2.2867 - 2.2868 - { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 2.2869 -$as_echo "$as_me: Maths library was not found" >&6;} 2.2870 - 2.2871 - 2.2872 -fi 2.2873 - 2.2874 - 2.2875 - 2.2876 - ############################################################################### 2.2877 - # 2.2878 - # Check for libdl.so 2.2879 - 2.2880 - save_LIBS="$LIBS" 2.2881 - LIBS="" 2.2882 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 2.2883 -$as_echo_n "checking for dlopen in -ldl... " >&6; } 2.2884 -if ${ac_cv_lib_dl_dlopen+:} false; then : 2.2885 - $as_echo_n "(cached) " >&6 2.2886 -else 2.2887 - ac_check_lib_save_LIBS=$LIBS 2.2888 -LIBS="-ldl $LIBS" 2.2889 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2890 -/* end confdefs.h. */ 2.2891 - 2.2892 -/* Override any GCC internal prototype to avoid an error. 2.2893 - Use char because int might match the return type of a GCC 2.2894 - builtin and then its argument prototype would still apply. */ 2.2895 -#ifdef __cplusplus 2.2896 -extern "C" 2.2897 -#endif 2.2898 -char dlopen (); 2.2899 -int 2.2900 -main () 2.2901 -{ 2.2902 -return dlopen (); 2.2903 - ; 2.2904 - return 0; 2.2905 -} 2.2906 -_ACEOF 2.2907 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2908 - ac_cv_lib_dl_dlopen=yes 2.2909 -else 2.2910 - ac_cv_lib_dl_dlopen=no 2.2911 -fi 2.2912 -rm -f core conftest.err conftest.$ac_objext \ 2.2913 - conftest$ac_exeext conftest.$ac_ext 2.2914 -LIBS=$ac_check_lib_save_LIBS 2.2915 -fi 2.2916 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 2.2917 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } 2.2918 -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 2.2919 - cat >>confdefs.h <<_ACEOF 2.2920 -#define HAVE_LIBDL 1 2.2921 -_ACEOF 2.2922 - 2.2923 - LIBS="-ldl $LIBS" 2.2924 - 2.2925 -fi 2.2926 - 2.2927 - LIBDL="$LIBS" 2.2928 - 2.2929 - LIBS="$save_LIBS" 2.2930 - 2.2931 - 2.2932 - ############################################################################### 2.2933 - # 2.2934 - # statically link libstdc++ before C++ ABI is stablized on Linux unless 2.2935 - # dynamic build is configured on command line. 2.2936 - # 2.2937 - 2.2938 -# Check whether --with-stdc++lib was given. 2.2939 -if test "${with_stdc__lib+set}" = set; then : 2.2940 - withval=$with_stdc__lib; 2.2941 - if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 2.2942 - && test "x$with_stdc__lib" != xdefault; then 2.2943 - as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 2.2944 - fi 2.2945 - 2.2946 -else 2.2947 - with_stdc__lib=default 2.2948 - 2.2949 -fi 2.2950 - 2.2951 - 2.2952 - if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.2953 - # Test if -lstdc++ works. 2.2954 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 2.2955 -$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 2.2956 - ac_ext=cpp 2.2957 -ac_cpp='$CXXCPP $CPPFLAGS' 2.2958 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.2959 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.2960 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.2961 - 2.2962 - OLD_CXXFLAGS="$CXXFLAGS" 2.2963 - CXXFLAGS="$CXXFLAGS -lstdc++" 2.2964 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.2965 -/* end confdefs.h. */ 2.2966 - 2.2967 -int 2.2968 -main () 2.2969 -{ 2.2970 -return 0; 2.2971 - ; 2.2972 - return 0; 2.2973 -} 2.2974 -_ACEOF 2.2975 -if ac_fn_cxx_try_link "$LINENO"; then : 2.2976 - has_dynamic_libstdcxx=yes 2.2977 -else 2.2978 - has_dynamic_libstdcxx=no 2.2979 -fi 2.2980 -rm -f core conftest.err conftest.$ac_objext \ 2.2981 - conftest$ac_exeext conftest.$ac_ext 2.2982 - CXXFLAGS="$OLD_CXXFLAGS" 2.2983 - ac_ext=cpp 2.2984 -ac_cpp='$CXXCPP $CPPFLAGS' 2.2985 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.2986 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.2987 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.2988 - 2.2989 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 2.2990 -$as_echo "$has_dynamic_libstdcxx" >&6; } 2.2991 - 2.2992 - # Test if stdc++ can be linked statically. 2.2993 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 2.2994 -$as_echo_n "checking if static link of stdc++ is possible... " >&6; } 2.2995 - STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 2.2996 - ac_ext=cpp 2.2997 -ac_cpp='$CXXCPP $CPPFLAGS' 2.2998 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.2999 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.3000 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.3001 - 2.3002 - OLD_LIBS="$LIBS" 2.3003 - OLD_CXX="$CXX" 2.3004 - LIBS="$STATIC_STDCXX_FLAGS" 2.3005 - CXX="$CC" 2.3006 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3007 -/* end confdefs.h. */ 2.3008 - 2.3009 -int 2.3010 -main () 2.3011 -{ 2.3012 -return 0; 2.3013 - ; 2.3014 - return 0; 2.3015 -} 2.3016 -_ACEOF 2.3017 -if ac_fn_cxx_try_link "$LINENO"; then : 2.3018 - has_static_libstdcxx=yes 2.3019 -else 2.3020 - has_static_libstdcxx=no 2.3021 -fi 2.3022 -rm -f core conftest.err conftest.$ac_objext \ 2.3023 - conftest$ac_exeext conftest.$ac_ext 2.3024 - LIBS="$OLD_LIBS" 2.3025 - CXX="$OLD_CXX" 2.3026 - ac_ext=cpp 2.3027 -ac_cpp='$CXXCPP $CPPFLAGS' 2.3028 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.3029 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.3030 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.3031 - 2.3032 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 2.3033 -$as_echo "$has_static_libstdcxx" >&6; } 2.3034 - 2.3035 - if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 2.3036 - as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 2.3037 - fi 2.3038 - 2.3039 - if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 2.3040 - as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 2.3041 - fi 2.3042 - 2.3043 - if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 2.3044 - as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 2.3045 - fi 2.3046 - 2.3047 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 2.3048 -$as_echo_n "checking how to link with libstdc++... " >&6; } 2.3049 - # If dynamic was requested, it's available since it would fail above otherwise. 2.3050 - # If dynamic wasn't requested, go with static unless it isn't available. 2.3051 - if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.3052 - LIBCXX="$LIBCXX -lstdc++" 2.3053 - LDCXX="$CXX" 2.3054 - STATIC_CXX_SETTING="STATIC_CXX=false" 2.3055 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 2.3056 -$as_echo "dynamic" >&6; } 2.3057 - else 2.3058 - LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 2.3059 - LDCXX="$CC" 2.3060 - STATIC_CXX_SETTING="STATIC_CXX=true" 2.3061 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 2.3062 -$as_echo "static" >&6; } 2.3063 - fi 2.3064 - fi 2.3065 - 2.3066 - 2.3067 - if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.3068 - # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 2.3069 - 2.3070 -pkg_failed=no 2.3071 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 2.3072 -$as_echo_n "checking for LIBFFI... " >&6; } 2.3073 - 2.3074 -if test -n "$LIBFFI_CFLAGS"; then 2.3075 - pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 2.3076 - elif test -n "$PKG_CONFIG"; then 2.3077 - if test -n "$PKG_CONFIG" && \ 2.3078 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 2.3079 - ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 2.3080 - ac_status=$? 2.3081 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.3082 - test $ac_status = 0; }; then 2.3083 - pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 2.3084 -else 2.3085 - pkg_failed=yes 2.3086 -fi 2.3087 - else 2.3088 - pkg_failed=untried 2.3089 -fi 2.3090 -if test -n "$LIBFFI_LIBS"; then 2.3091 - pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 2.3092 - elif test -n "$PKG_CONFIG"; then 2.3093 - if test -n "$PKG_CONFIG" && \ 2.3094 - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 2.3095 - ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 2.3096 - ac_status=$? 2.3097 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.3098 - test $ac_status = 0; }; then 2.3099 - pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 2.3100 -else 2.3101 - pkg_failed=yes 2.3102 -fi 2.3103 - else 2.3104 - pkg_failed=untried 2.3105 -fi 2.3106 - 2.3107 - 2.3108 - 2.3109 -if test $pkg_failed = yes; then 2.3110 - 2.3111 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.3112 - _pkg_short_errors_supported=yes 2.3113 -else 2.3114 - _pkg_short_errors_supported=no 2.3115 -fi 2.3116 - if test $_pkg_short_errors_supported = yes; then 2.3117 - LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 2.3118 - else 2.3119 - LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 2.3120 - fi 2.3121 - # Put the nasty error message in config.log where it belongs 2.3122 - echo "$LIBFFI_PKG_ERRORS" >&5 2.3123 - 2.3124 - as_fn_error $? "Package requirements (libffi) were not met: 2.3125 - 2.3126 -$LIBFFI_PKG_ERRORS 2.3127 - 2.3128 -Consider adjusting the PKG_CONFIG_PATH environment variable if you 2.3129 -installed software in a non-standard prefix. 2.3130 - 2.3131 -Alternatively, you may set the environment variables LIBFFI_CFLAGS 2.3132 -and LIBFFI_LIBS to avoid the need to call pkg-config. 2.3133 -See the pkg-config man page for more details. 2.3134 -" "$LINENO" 5 2.3135 -elif test $pkg_failed = untried; then 2.3136 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2.3137 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2.3138 -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 2.3139 -is in your PATH or set the PKG_CONFIG environment variable to the full 2.3140 -path to pkg-config. 2.3141 - 2.3142 -Alternatively, you may set the environment variables LIBFFI_CFLAGS 2.3143 -and LIBFFI_LIBS to avoid the need to call pkg-config. 2.3144 -See the pkg-config man page for more details. 2.3145 - 2.3146 -To get pkg-config, see <http://pkg-config.freedesktop.org/>. 2.3147 -See \`config.log' for more details" "$LINENO" 5; } 2.3148 -else 2.3149 - LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 2.3150 - LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 2.3151 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.3152 -$as_echo "yes" >&6; } 2.3153 - : 2.3154 -fi 2.3155 - 2.3156 - fi 2.3157 - 2.3158 - if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.3159 - # Extract the first word of "llvm-config", so it can be a program name with args. 2.3160 -set dummy llvm-config; ac_word=$2 2.3161 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.3162 -$as_echo_n "checking for $ac_word... " >&6; } 2.3163 -if ${ac_cv_prog_LLVM_CONFIG+:} false; then : 2.3164 - $as_echo_n "(cached) " >&6 2.3165 -else 2.3166 - if test -n "$LLVM_CONFIG"; then 2.3167 - ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 2.3168 -else 2.3169 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.3170 -for as_dir in $PATH 2.3171 -do 2.3172 - IFS=$as_save_IFS 2.3173 - test -z "$as_dir" && as_dir=. 2.3174 - for ac_exec_ext in '' $ac_executable_extensions; do 2.3175 - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.3176 - ac_cv_prog_LLVM_CONFIG="llvm-config" 2.3177 - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.3178 - break 2 2.3179 - fi 2.3180 -done 2.3181 - done 2.3182 -IFS=$as_save_IFS 2.3183 - 2.3184 -fi 2.3185 -fi 2.3186 -LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 2.3187 -if test -n "$LLVM_CONFIG"; then 2.3188 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 2.3189 -$as_echo "$LLVM_CONFIG" >&6; } 2.3190 -else 2.3191 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.3192 -$as_echo "no" >&6; } 2.3193 -fi 2.3194 - 2.3195 - 2.3196 - 2.3197 - if test "x$LLVM_CONFIG" != xllvm-config; then 2.3198 - as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 2.3199 - fi 2.3200 - 2.3201 - llvm_components="jit mcjit engine nativecodegen native" 2.3202 - unset LLVM_CFLAGS 2.3203 - for flag in $("$LLVM_CONFIG" --cxxflags); do 2.3204 - if echo "${flag}" | grep -q '^-[ID]'; then 2.3205 - if test "${flag}" != "-D_DEBUG" ; then 2.3206 - if test "${LLVM_CFLAGS}" != "" ; then 2.3207 - LLVM_CFLAGS="${LLVM_CFLAGS} " 2.3208 - fi 2.3209 - LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 2.3210 - fi 2.3211 - fi 2.3212 - done 2.3213 - llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 2.3214 - LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 2.3215 - 2.3216 - unset LLVM_LDFLAGS 2.3217 - for flag in $("${LLVM_CONFIG}" --ldflags); do 2.3218 - if echo "${flag}" | grep -q '^-L'; then 2.3219 - if test "${LLVM_LDFLAGS}" != ""; then 2.3220 - LLVM_LDFLAGS="${LLVM_LDFLAGS} " 2.3221 - fi 2.3222 - LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 2.3223 - fi 2.3224 - done 2.3225 - 2.3226 - unset LLVM_LIBS 2.3227 - for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 2.3228 - if echo "${flag}" | grep -q '^-l'; then 2.3229 - if test "${LLVM_LIBS}" != ""; then 2.3230 - LLVM_LIBS="${LLVM_LIBS} " 2.3231 - fi 2.3232 - LLVM_LIBS="${LLVM_LIBS}${flag}" 2.3233 - fi 2.3234 - done 2.3235 - 2.3236 - 2.3237 - 2.3238 - 2.3239 - fi 2.3240 - 2.3241 - # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 2.3242 - if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 2.3243 - LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 2.3244 - fi 2.3245 - 2.3246 - # TODO better (platform agnostic) test 2.3247 - if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 2.3248 - LIBCXX="-lstdc++" 2.3249 - fi 2.3250 - 2.3251 - 2.3252 - 2.3253 - 2.3254 -# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper 2.3255 +# After we have toolchain, we can compile fixpath. It's needed by the lib checks. 2.3256 2.3257 # When using cygwin or msys, we need a wrapper binary that renames 2.3258 # /cygdrive/c/ arguments into c:/ arguments and peeks into 2.3259 @@ -32945,6 +30012,5390 @@ 2.3260 2.3261 2.3262 2.3263 + 2.3264 + 2.3265 + ############################################################################### 2.3266 + # 2.3267 + # OS specific settings that we never will need to probe. 2.3268 + # 2.3269 + if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.3270 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5 2.3271 +$as_echo_n "checking what is not needed on Linux?... " >&6; } 2.3272 + PULSE_NOT_NEEDED=yes 2.3273 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5 2.3274 +$as_echo "pulse" >&6; } 2.3275 + fi 2.3276 + 2.3277 + if test "x$OPENJDK_TARGET_OS" = xsolaris; then 2.3278 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5 2.3279 +$as_echo_n "checking what is not needed on Solaris?... " >&6; } 2.3280 + ALSA_NOT_NEEDED=yes 2.3281 + PULSE_NOT_NEEDED=yes 2.3282 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5 2.3283 +$as_echo "alsa pulse" >&6; } 2.3284 + fi 2.3285 + 2.3286 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.3287 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5 2.3288 +$as_echo_n "checking what is not needed on Windows?... " >&6; } 2.3289 + CUPS_NOT_NEEDED=yes 2.3290 + ALSA_NOT_NEEDED=yes 2.3291 + PULSE_NOT_NEEDED=yes 2.3292 + X11_NOT_NEEDED=yes 2.3293 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5 2.3294 +$as_echo "alsa cups pulse x11" >&6; } 2.3295 + fi 2.3296 + 2.3297 + if test "x$OPENJDK_TARGET_OS" = xmacosx; then 2.3298 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5 2.3299 +$as_echo_n "checking what is not needed on MacOSX?... " >&6; } 2.3300 + ALSA_NOT_NEEDED=yes 2.3301 + PULSE_NOT_NEEDED=yes 2.3302 + X11_NOT_NEEDED=yes 2.3303 + # If the java runtime framework is disabled, then we need X11. 2.3304 + # This will be adjusted below. 2.3305 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5 2.3306 +$as_echo "alsa pulse x11" >&6; } 2.3307 + fi 2.3308 + 2.3309 + if test "x$OPENJDK_TARGET_OS" = xbsd; then 2.3310 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5 2.3311 +$as_echo_n "checking what is not needed on bsd?... " >&6; } 2.3312 + ALSA_NOT_NEEDED=yes 2.3313 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5 2.3314 +$as_echo "alsa" >&6; } 2.3315 + fi 2.3316 + 2.3317 + if test "x$OPENJDK" = "xfalse"; then 2.3318 + FREETYPE_NOT_NEEDED=yes 2.3319 + fi 2.3320 + 2.3321 + if test "x$SUPPORT_HEADFUL" = xno; then 2.3322 + X11_NOT_NEEDED=yes 2.3323 + fi 2.3324 + 2.3325 + ############################################################################### 2.3326 + # 2.3327 + # Check for MacOSX support for OpenJDK. 2.3328 + # 2.3329 + 2.3330 + 2.3331 + # Check whether --enable-macosx-runtime-support was given. 2.3332 +if test "${enable_macosx_runtime_support+set}" = set; then : 2.3333 + enableval=$enable_macosx_runtime_support; 2.3334 +fi 2.3335 + 2.3336 + if test "x$enable_macosx_runtime_support" != x; then 2.3337 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5 2.3338 +$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;} 2.3339 + fi 2.3340 + 2.3341 + 2.3342 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5 2.3343 +$as_echo_n "checking for Mac OS X Java Framework... " >&6; } 2.3344 + if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 2.3345 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5 2.3346 +$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; } 2.3347 + else 2.3348 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.3349 +$as_echo "no" >&6; } 2.3350 + fi 2.3351 + 2.3352 + 2.3353 + 2.3354 + ############################################################################### 2.3355 + # 2.3356 + # Check for X Windows 2.3357 + # 2.3358 + 2.3359 + # Check if the user has specified sysroot, but not --x-includes or --x-libraries. 2.3360 + # Make a simple check for the libraries at the sysroot, and setup --x-includes and 2.3361 + # --x-libraries for the sysroot, if that seems to be correct. 2.3362 + if test "x$SYS_ROOT" != "x/"; then 2.3363 + if test "x$x_includes" = xNONE; then 2.3364 + if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then 2.3365 + x_includes="$SYS_ROOT/usr/X11R6/include" 2.3366 + elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then 2.3367 + x_includes="$SYS_ROOT/usr/include" 2.3368 + fi 2.3369 + fi 2.3370 + if test "x$x_libraries" = xNONE; then 2.3371 + if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then 2.3372 + x_libraries="$SYS_ROOT/usr/X11R6/lib" 2.3373 + elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 2.3374 + x_libraries="$SYS_ROOT/usr/lib64" 2.3375 + elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then 2.3376 + x_libraries="$SYS_ROOT/usr/lib" 2.3377 + fi 2.3378 + fi 2.3379 + fi 2.3380 + 2.3381 + # Now let autoconf do it's magic 2.3382 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 2.3383 +$as_echo_n "checking for X... " >&6; } 2.3384 + 2.3385 + 2.3386 +# Check whether --with-x was given. 2.3387 +if test "${with_x+set}" = set; then : 2.3388 + withval=$with_x; 2.3389 +fi 2.3390 + 2.3391 +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. 2.3392 +if test "x$with_x" = xno; then 2.3393 + # The user explicitly disabled X. 2.3394 + have_x=disabled 2.3395 +else 2.3396 + case $x_includes,$x_libraries in #( 2.3397 + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( 2.3398 + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : 2.3399 + $as_echo_n "(cached) " >&6 2.3400 +else 2.3401 + # One or both of the vars are not set, and there is no cached value. 2.3402 +ac_x_includes=no ac_x_libraries=no 2.3403 +rm -f -r conftest.dir 2.3404 +if mkdir conftest.dir; then 2.3405 + cd conftest.dir 2.3406 + cat >Imakefile <<'_ACEOF' 2.3407 +incroot: 2.3408 + @echo incroot='${INCROOT}' 2.3409 +usrlibdir: 2.3410 + @echo usrlibdir='${USRLIBDIR}' 2.3411 +libdir: 2.3412 + @echo libdir='${LIBDIR}' 2.3413 +_ACEOF 2.3414 + if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 2.3415 + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 2.3416 + for ac_var in incroot usrlibdir libdir; do 2.3417 + eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 2.3418 + done 2.3419 + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 2.3420 + for ac_extension in a so sl dylib la dll; do 2.3421 + if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && 2.3422 + test -f "$ac_im_libdir/libX11.$ac_extension"; then 2.3423 + ac_im_usrlibdir=$ac_im_libdir; break 2.3424 + fi 2.3425 + done 2.3426 + # Screen out bogus values from the imake configuration. They are 2.3427 + # bogus both because they are the default anyway, and because 2.3428 + # using them would break gcc on systems where it needs fixed includes. 2.3429 + case $ac_im_incroot in 2.3430 + /usr/include) ac_x_includes= ;; 2.3431 + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; 2.3432 + esac 2.3433 + case $ac_im_usrlibdir in 2.3434 + /usr/lib | /usr/lib64 | /lib | /lib64) ;; 2.3435 + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; 2.3436 + esac 2.3437 + fi 2.3438 + cd .. 2.3439 + rm -f -r conftest.dir 2.3440 +fi 2.3441 + 2.3442 +# Standard set of common directories for X headers. 2.3443 +# Check X11 before X11Rn because it is often a symlink to the current release. 2.3444 +ac_x_header_dirs=' 2.3445 +/usr/X11/include 2.3446 +/usr/X11R7/include 2.3447 +/usr/X11R6/include 2.3448 +/usr/X11R5/include 2.3449 +/usr/X11R4/include 2.3450 + 2.3451 +/usr/include/X11 2.3452 +/usr/include/X11R7 2.3453 +/usr/include/X11R6 2.3454 +/usr/include/X11R5 2.3455 +/usr/include/X11R4 2.3456 + 2.3457 +/usr/local/X11/include 2.3458 +/usr/local/X11R7/include 2.3459 +/usr/local/X11R6/include 2.3460 +/usr/local/X11R5/include 2.3461 +/usr/local/X11R4/include 2.3462 + 2.3463 +/usr/local/include/X11 2.3464 +/usr/local/include/X11R7 2.3465 +/usr/local/include/X11R6 2.3466 +/usr/local/include/X11R5 2.3467 +/usr/local/include/X11R4 2.3468 + 2.3469 +/usr/X386/include 2.3470 +/usr/x386/include 2.3471 +/usr/XFree86/include/X11 2.3472 + 2.3473 +/usr/include 2.3474 +/usr/local/include 2.3475 +/usr/unsupported/include 2.3476 +/usr/athena/include 2.3477 +/usr/local/x11r5/include 2.3478 +/usr/lpp/Xamples/include 2.3479 + 2.3480 +/usr/openwin/include 2.3481 +/usr/openwin/share/include' 2.3482 + 2.3483 +if test "$ac_x_includes" = no; then 2.3484 + # Guess where to find include files, by looking for Xlib.h. 2.3485 + # First, try using that file with no special directory specified. 2.3486 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3487 +/* end confdefs.h. */ 2.3488 +#include <X11/Xlib.h> 2.3489 +_ACEOF 2.3490 +if ac_fn_cxx_try_cpp "$LINENO"; then : 2.3491 + # We can compile using X headers with no special include directory. 2.3492 +ac_x_includes= 2.3493 +else 2.3494 + for ac_dir in $ac_x_header_dirs; do 2.3495 + if test -r "$ac_dir/X11/Xlib.h"; then 2.3496 + ac_x_includes=$ac_dir 2.3497 + break 2.3498 + fi 2.3499 +done 2.3500 +fi 2.3501 +rm -f conftest.err conftest.i conftest.$ac_ext 2.3502 +fi # $ac_x_includes = no 2.3503 + 2.3504 +if test "$ac_x_libraries" = no; then 2.3505 + # Check for the libraries. 2.3506 + # See if we find them without any special options. 2.3507 + # Don't add to $LIBS permanently. 2.3508 + ac_save_LIBS=$LIBS 2.3509 + LIBS="-lX11 $LIBS" 2.3510 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3511 +/* end confdefs.h. */ 2.3512 +#include <X11/Xlib.h> 2.3513 +int 2.3514 +main () 2.3515 +{ 2.3516 +XrmInitialize () 2.3517 + ; 2.3518 + return 0; 2.3519 +} 2.3520 +_ACEOF 2.3521 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3522 + LIBS=$ac_save_LIBS 2.3523 +# We can link X programs with no special library path. 2.3524 +ac_x_libraries= 2.3525 +else 2.3526 + LIBS=$ac_save_LIBS 2.3527 +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 2.3528 +do 2.3529 + # Don't even attempt the hair of trying to link an X program! 2.3530 + for ac_extension in a so sl dylib la dll; do 2.3531 + if test -r "$ac_dir/libX11.$ac_extension"; then 2.3532 + ac_x_libraries=$ac_dir 2.3533 + break 2 2.3534 + fi 2.3535 + done 2.3536 +done 2.3537 +fi 2.3538 +rm -f core conftest.err conftest.$ac_objext \ 2.3539 + conftest$ac_exeext conftest.$ac_ext 2.3540 +fi # $ac_x_libraries = no 2.3541 + 2.3542 +case $ac_x_includes,$ac_x_libraries in #( 2.3543 + no,* | *,no | *\'*) 2.3544 + # Didn't find X, or a directory has "'" in its name. 2.3545 + ac_cv_have_x="have_x=no";; #( 2.3546 + *) 2.3547 + # Record where we found X for the cache. 2.3548 + ac_cv_have_x="have_x=yes\ 2.3549 + ac_x_includes='$ac_x_includes'\ 2.3550 + ac_x_libraries='$ac_x_libraries'" 2.3551 +esac 2.3552 +fi 2.3553 +;; #( 2.3554 + *) have_x=yes;; 2.3555 + esac 2.3556 + eval "$ac_cv_have_x" 2.3557 +fi # $with_x != no 2.3558 + 2.3559 +if test "$have_x" != yes; then 2.3560 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 2.3561 +$as_echo "$have_x" >&6; } 2.3562 + no_x=yes 2.3563 +else 2.3564 + # If each of the values was on the command line, it overrides each guess. 2.3565 + test "x$x_includes" = xNONE && x_includes=$ac_x_includes 2.3566 + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries 2.3567 + # Update the cache value to reflect the command line values. 2.3568 + ac_cv_have_x="have_x=yes\ 2.3569 + ac_x_includes='$x_includes'\ 2.3570 + ac_x_libraries='$x_libraries'" 2.3571 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 2.3572 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } 2.3573 +fi 2.3574 + 2.3575 + if test "$no_x" = yes; then 2.3576 + # Not all programs may use this symbol, but it does not hurt to define it. 2.3577 + 2.3578 +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h 2.3579 + 2.3580 + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= 2.3581 +else 2.3582 + if test -n "$x_includes"; then 2.3583 + X_CFLAGS="$X_CFLAGS -I$x_includes" 2.3584 + fi 2.3585 + 2.3586 + # It would also be nice to do this for all -L options, not just this one. 2.3587 + if test -n "$x_libraries"; then 2.3588 + X_LIBS="$X_LIBS -L$x_libraries" 2.3589 + # For Solaris; some versions of Sun CC require a space after -R and 2.3590 + # others require no space. Words are not sufficient . . . . 2.3591 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 2.3592 +$as_echo_n "checking whether -R must be followed by a space... " >&6; } 2.3593 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" 2.3594 + ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag 2.3595 + ac_cxx_werror_flag=yes 2.3596 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3597 +/* end confdefs.h. */ 2.3598 + 2.3599 +int 2.3600 +main () 2.3601 +{ 2.3602 + 2.3603 + ; 2.3604 + return 0; 2.3605 +} 2.3606 +_ACEOF 2.3607 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3608 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.3609 +$as_echo "no" >&6; } 2.3610 + X_LIBS="$X_LIBS -R$x_libraries" 2.3611 +else 2.3612 + LIBS="$ac_xsave_LIBS -R $x_libraries" 2.3613 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3614 +/* end confdefs.h. */ 2.3615 + 2.3616 +int 2.3617 +main () 2.3618 +{ 2.3619 + 2.3620 + ; 2.3621 + return 0; 2.3622 +} 2.3623 +_ACEOF 2.3624 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3625 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.3626 +$as_echo "yes" >&6; } 2.3627 + X_LIBS="$X_LIBS -R $x_libraries" 2.3628 +else 2.3629 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 2.3630 +$as_echo "neither works" >&6; } 2.3631 +fi 2.3632 +rm -f core conftest.err conftest.$ac_objext \ 2.3633 + conftest$ac_exeext conftest.$ac_ext 2.3634 +fi 2.3635 +rm -f core conftest.err conftest.$ac_objext \ 2.3636 + conftest$ac_exeext conftest.$ac_ext 2.3637 + ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag 2.3638 + LIBS=$ac_xsave_LIBS 2.3639 + fi 2.3640 + 2.3641 + # Check for system-dependent libraries X programs must link with. 2.3642 + # Do this before checking for the system-independent R6 libraries 2.3643 + # (-lICE), since we may need -lsocket or whatever for X linking. 2.3644 + 2.3645 + if test "$ISC" = yes; then 2.3646 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" 2.3647 + else 2.3648 + # Martyn Johnson says this is needed for Ultrix, if the X 2.3649 + # libraries were built with DECnet support. And Karl Berry says 2.3650 + # the Alpha needs dnet_stub (dnet does not exist). 2.3651 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 2.3652 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3653 +/* end confdefs.h. */ 2.3654 + 2.3655 +/* Override any GCC internal prototype to avoid an error. 2.3656 + Use char because int might match the return type of a GCC 2.3657 + builtin and then its argument prototype would still apply. */ 2.3658 +#ifdef __cplusplus 2.3659 +extern "C" 2.3660 +#endif 2.3661 +char XOpenDisplay (); 2.3662 +int 2.3663 +main () 2.3664 +{ 2.3665 +return XOpenDisplay (); 2.3666 + ; 2.3667 + return 0; 2.3668 +} 2.3669 +_ACEOF 2.3670 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3671 + 2.3672 +else 2.3673 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 2.3674 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } 2.3675 +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : 2.3676 + $as_echo_n "(cached) " >&6 2.3677 +else 2.3678 + ac_check_lib_save_LIBS=$LIBS 2.3679 +LIBS="-ldnet $LIBS" 2.3680 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3681 +/* end confdefs.h. */ 2.3682 + 2.3683 +/* Override any GCC internal prototype to avoid an error. 2.3684 + Use char because int might match the return type of a GCC 2.3685 + builtin and then its argument prototype would still apply. */ 2.3686 +#ifdef __cplusplus 2.3687 +extern "C" 2.3688 +#endif 2.3689 +char dnet_ntoa (); 2.3690 +int 2.3691 +main () 2.3692 +{ 2.3693 +return dnet_ntoa (); 2.3694 + ; 2.3695 + return 0; 2.3696 +} 2.3697 +_ACEOF 2.3698 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3699 + ac_cv_lib_dnet_dnet_ntoa=yes 2.3700 +else 2.3701 + ac_cv_lib_dnet_dnet_ntoa=no 2.3702 +fi 2.3703 +rm -f core conftest.err conftest.$ac_objext \ 2.3704 + conftest$ac_exeext conftest.$ac_ext 2.3705 +LIBS=$ac_check_lib_save_LIBS 2.3706 +fi 2.3707 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 2.3708 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } 2.3709 +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : 2.3710 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" 2.3711 +fi 2.3712 + 2.3713 + if test $ac_cv_lib_dnet_dnet_ntoa = no; then 2.3714 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 2.3715 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } 2.3716 +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : 2.3717 + $as_echo_n "(cached) " >&6 2.3718 +else 2.3719 + ac_check_lib_save_LIBS=$LIBS 2.3720 +LIBS="-ldnet_stub $LIBS" 2.3721 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3722 +/* end confdefs.h. */ 2.3723 + 2.3724 +/* Override any GCC internal prototype to avoid an error. 2.3725 + Use char because int might match the return type of a GCC 2.3726 + builtin and then its argument prototype would still apply. */ 2.3727 +#ifdef __cplusplus 2.3728 +extern "C" 2.3729 +#endif 2.3730 +char dnet_ntoa (); 2.3731 +int 2.3732 +main () 2.3733 +{ 2.3734 +return dnet_ntoa (); 2.3735 + ; 2.3736 + return 0; 2.3737 +} 2.3738 +_ACEOF 2.3739 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3740 + ac_cv_lib_dnet_stub_dnet_ntoa=yes 2.3741 +else 2.3742 + ac_cv_lib_dnet_stub_dnet_ntoa=no 2.3743 +fi 2.3744 +rm -f core conftest.err conftest.$ac_objext \ 2.3745 + conftest$ac_exeext conftest.$ac_ext 2.3746 +LIBS=$ac_check_lib_save_LIBS 2.3747 +fi 2.3748 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 2.3749 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } 2.3750 +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : 2.3751 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" 2.3752 +fi 2.3753 + 2.3754 + fi 2.3755 +fi 2.3756 +rm -f core conftest.err conftest.$ac_objext \ 2.3757 + conftest$ac_exeext conftest.$ac_ext 2.3758 + LIBS="$ac_xsave_LIBS" 2.3759 + 2.3760 + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, 2.3761 + # to get the SysV transport functions. 2.3762 + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) 2.3763 + # needs -lnsl. 2.3764 + # The nsl library prevents programs from opening the X display 2.3765 + # on Irix 5.2, according to T.E. Dickey. 2.3766 + # The functions gethostbyname, getservbyname, and inet_addr are 2.3767 + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 2.3768 + ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 2.3769 +if test "x$ac_cv_func_gethostbyname" = xyes; then : 2.3770 + 2.3771 +fi 2.3772 + 2.3773 + if test $ac_cv_func_gethostbyname = no; then 2.3774 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 2.3775 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } 2.3776 +if ${ac_cv_lib_nsl_gethostbyname+:} false; then : 2.3777 + $as_echo_n "(cached) " >&6 2.3778 +else 2.3779 + ac_check_lib_save_LIBS=$LIBS 2.3780 +LIBS="-lnsl $LIBS" 2.3781 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3782 +/* end confdefs.h. */ 2.3783 + 2.3784 +/* Override any GCC internal prototype to avoid an error. 2.3785 + Use char because int might match the return type of a GCC 2.3786 + builtin and then its argument prototype would still apply. */ 2.3787 +#ifdef __cplusplus 2.3788 +extern "C" 2.3789 +#endif 2.3790 +char gethostbyname (); 2.3791 +int 2.3792 +main () 2.3793 +{ 2.3794 +return gethostbyname (); 2.3795 + ; 2.3796 + return 0; 2.3797 +} 2.3798 +_ACEOF 2.3799 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3800 + ac_cv_lib_nsl_gethostbyname=yes 2.3801 +else 2.3802 + ac_cv_lib_nsl_gethostbyname=no 2.3803 +fi 2.3804 +rm -f core conftest.err conftest.$ac_objext \ 2.3805 + conftest$ac_exeext conftest.$ac_ext 2.3806 +LIBS=$ac_check_lib_save_LIBS 2.3807 +fi 2.3808 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 2.3809 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } 2.3810 +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : 2.3811 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" 2.3812 +fi 2.3813 + 2.3814 + if test $ac_cv_lib_nsl_gethostbyname = no; then 2.3815 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 2.3816 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } 2.3817 +if ${ac_cv_lib_bsd_gethostbyname+:} false; then : 2.3818 + $as_echo_n "(cached) " >&6 2.3819 +else 2.3820 + ac_check_lib_save_LIBS=$LIBS 2.3821 +LIBS="-lbsd $LIBS" 2.3822 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3823 +/* end confdefs.h. */ 2.3824 + 2.3825 +/* Override any GCC internal prototype to avoid an error. 2.3826 + Use char because int might match the return type of a GCC 2.3827 + builtin and then its argument prototype would still apply. */ 2.3828 +#ifdef __cplusplus 2.3829 +extern "C" 2.3830 +#endif 2.3831 +char gethostbyname (); 2.3832 +int 2.3833 +main () 2.3834 +{ 2.3835 +return gethostbyname (); 2.3836 + ; 2.3837 + return 0; 2.3838 +} 2.3839 +_ACEOF 2.3840 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3841 + ac_cv_lib_bsd_gethostbyname=yes 2.3842 +else 2.3843 + ac_cv_lib_bsd_gethostbyname=no 2.3844 +fi 2.3845 +rm -f core conftest.err conftest.$ac_objext \ 2.3846 + conftest$ac_exeext conftest.$ac_ext 2.3847 +LIBS=$ac_check_lib_save_LIBS 2.3848 +fi 2.3849 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 2.3850 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } 2.3851 +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : 2.3852 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" 2.3853 +fi 2.3854 + 2.3855 + fi 2.3856 + fi 2.3857 + 2.3858 + # lieder@skyler.mavd.honeywell.com says without -lsocket, 2.3859 + # socket/setsockopt and other routines are undefined under SCO ODT 2.3860 + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary 2.3861 + # on later versions), says Simon Leinen: it contains gethostby* 2.3862 + # variants that don't use the name server (or something). -lsocket 2.3863 + # must be given before -lnsl if both are needed. We assume that 2.3864 + # if connect needs -lnsl, so does gethostbyname. 2.3865 + ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" 2.3866 +if test "x$ac_cv_func_connect" = xyes; then : 2.3867 + 2.3868 +fi 2.3869 + 2.3870 + if test $ac_cv_func_connect = no; then 2.3871 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 2.3872 +$as_echo_n "checking for connect in -lsocket... " >&6; } 2.3873 +if ${ac_cv_lib_socket_connect+:} false; then : 2.3874 + $as_echo_n "(cached) " >&6 2.3875 +else 2.3876 + ac_check_lib_save_LIBS=$LIBS 2.3877 +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" 2.3878 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3879 +/* end confdefs.h. */ 2.3880 + 2.3881 +/* Override any GCC internal prototype to avoid an error. 2.3882 + Use char because int might match the return type of a GCC 2.3883 + builtin and then its argument prototype would still apply. */ 2.3884 +#ifdef __cplusplus 2.3885 +extern "C" 2.3886 +#endif 2.3887 +char connect (); 2.3888 +int 2.3889 +main () 2.3890 +{ 2.3891 +return connect (); 2.3892 + ; 2.3893 + return 0; 2.3894 +} 2.3895 +_ACEOF 2.3896 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3897 + ac_cv_lib_socket_connect=yes 2.3898 +else 2.3899 + ac_cv_lib_socket_connect=no 2.3900 +fi 2.3901 +rm -f core conftest.err conftest.$ac_objext \ 2.3902 + conftest$ac_exeext conftest.$ac_ext 2.3903 +LIBS=$ac_check_lib_save_LIBS 2.3904 +fi 2.3905 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 2.3906 +$as_echo "$ac_cv_lib_socket_connect" >&6; } 2.3907 +if test "x$ac_cv_lib_socket_connect" = xyes; then : 2.3908 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" 2.3909 +fi 2.3910 + 2.3911 + fi 2.3912 + 2.3913 + # Guillermo Gomez says -lposix is necessary on A/UX. 2.3914 + ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" 2.3915 +if test "x$ac_cv_func_remove" = xyes; then : 2.3916 + 2.3917 +fi 2.3918 + 2.3919 + if test $ac_cv_func_remove = no; then 2.3920 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 2.3921 +$as_echo_n "checking for remove in -lposix... " >&6; } 2.3922 +if ${ac_cv_lib_posix_remove+:} false; then : 2.3923 + $as_echo_n "(cached) " >&6 2.3924 +else 2.3925 + ac_check_lib_save_LIBS=$LIBS 2.3926 +LIBS="-lposix $LIBS" 2.3927 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3928 +/* end confdefs.h. */ 2.3929 + 2.3930 +/* Override any GCC internal prototype to avoid an error. 2.3931 + Use char because int might match the return type of a GCC 2.3932 + builtin and then its argument prototype would still apply. */ 2.3933 +#ifdef __cplusplus 2.3934 +extern "C" 2.3935 +#endif 2.3936 +char remove (); 2.3937 +int 2.3938 +main () 2.3939 +{ 2.3940 +return remove (); 2.3941 + ; 2.3942 + return 0; 2.3943 +} 2.3944 +_ACEOF 2.3945 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3946 + ac_cv_lib_posix_remove=yes 2.3947 +else 2.3948 + ac_cv_lib_posix_remove=no 2.3949 +fi 2.3950 +rm -f core conftest.err conftest.$ac_objext \ 2.3951 + conftest$ac_exeext conftest.$ac_ext 2.3952 +LIBS=$ac_check_lib_save_LIBS 2.3953 +fi 2.3954 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 2.3955 +$as_echo "$ac_cv_lib_posix_remove" >&6; } 2.3956 +if test "x$ac_cv_lib_posix_remove" = xyes; then : 2.3957 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" 2.3958 +fi 2.3959 + 2.3960 + fi 2.3961 + 2.3962 + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. 2.3963 + ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" 2.3964 +if test "x$ac_cv_func_shmat" = xyes; then : 2.3965 + 2.3966 +fi 2.3967 + 2.3968 + if test $ac_cv_func_shmat = no; then 2.3969 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 2.3970 +$as_echo_n "checking for shmat in -lipc... " >&6; } 2.3971 +if ${ac_cv_lib_ipc_shmat+:} false; then : 2.3972 + $as_echo_n "(cached) " >&6 2.3973 +else 2.3974 + ac_check_lib_save_LIBS=$LIBS 2.3975 +LIBS="-lipc $LIBS" 2.3976 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.3977 +/* end confdefs.h. */ 2.3978 + 2.3979 +/* Override any GCC internal prototype to avoid an error. 2.3980 + Use char because int might match the return type of a GCC 2.3981 + builtin and then its argument prototype would still apply. */ 2.3982 +#ifdef __cplusplus 2.3983 +extern "C" 2.3984 +#endif 2.3985 +char shmat (); 2.3986 +int 2.3987 +main () 2.3988 +{ 2.3989 +return shmat (); 2.3990 + ; 2.3991 + return 0; 2.3992 +} 2.3993 +_ACEOF 2.3994 +if ac_fn_cxx_try_link "$LINENO"; then : 2.3995 + ac_cv_lib_ipc_shmat=yes 2.3996 +else 2.3997 + ac_cv_lib_ipc_shmat=no 2.3998 +fi 2.3999 +rm -f core conftest.err conftest.$ac_objext \ 2.4000 + conftest$ac_exeext conftest.$ac_ext 2.4001 +LIBS=$ac_check_lib_save_LIBS 2.4002 +fi 2.4003 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 2.4004 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; } 2.4005 +if test "x$ac_cv_lib_ipc_shmat" = xyes; then : 2.4006 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" 2.4007 +fi 2.4008 + 2.4009 + fi 2.4010 + fi 2.4011 + 2.4012 + # Check for libraries that X11R6 Xt/Xaw programs need. 2.4013 + ac_save_LDFLAGS=$LDFLAGS 2.4014 + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" 2.4015 + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to 2.4016 + # check for ICE first), but we must link in the order -lSM -lICE or 2.4017 + # we get undefined symbols. So assume we have SM if we have ICE. 2.4018 + # These have to be linked with before -lX11, unlike the other 2.4019 + # libraries we check for below, so use a different variable. 2.4020 + # John Interrante, Karl Berry 2.4021 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 2.4022 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } 2.4023 +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : 2.4024 + $as_echo_n "(cached) " >&6 2.4025 +else 2.4026 + ac_check_lib_save_LIBS=$LIBS 2.4027 +LIBS="-lICE $X_EXTRA_LIBS $LIBS" 2.4028 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.4029 +/* end confdefs.h. */ 2.4030 + 2.4031 +/* Override any GCC internal prototype to avoid an error. 2.4032 + Use char because int might match the return type of a GCC 2.4033 + builtin and then its argument prototype would still apply. */ 2.4034 +#ifdef __cplusplus 2.4035 +extern "C" 2.4036 +#endif 2.4037 +char IceConnectionNumber (); 2.4038 +int 2.4039 +main () 2.4040 +{ 2.4041 +return IceConnectionNumber (); 2.4042 + ; 2.4043 + return 0; 2.4044 +} 2.4045 +_ACEOF 2.4046 +if ac_fn_cxx_try_link "$LINENO"; then : 2.4047 + ac_cv_lib_ICE_IceConnectionNumber=yes 2.4048 +else 2.4049 + ac_cv_lib_ICE_IceConnectionNumber=no 2.4050 +fi 2.4051 +rm -f core conftest.err conftest.$ac_objext \ 2.4052 + conftest$ac_exeext conftest.$ac_ext 2.4053 +LIBS=$ac_check_lib_save_LIBS 2.4054 +fi 2.4055 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 2.4056 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } 2.4057 +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : 2.4058 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" 2.4059 +fi 2.4060 + 2.4061 + LDFLAGS=$ac_save_LDFLAGS 2.4062 + 2.4063 +fi 2.4064 + 2.4065 + 2.4066 + # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling 2.4067 + # this doesn't make sense so we remove it. 2.4068 + if test "x$COMPILE_TYPE" = xcross; then 2.4069 + X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'` 2.4070 + fi 2.4071 + 2.4072 + if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 2.4073 + 2.4074 + # Print a helpful message on how to acquire the necessary build dependency. 2.4075 + # x11 is the help tag: freetype, cups, pulse, alsa etc 2.4076 + MISSING_DEPENDENCY=x11 2.4077 + 2.4078 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4079 + cygwin_help $MISSING_DEPENDENCY 2.4080 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4081 + msys_help $MISSING_DEPENDENCY 2.4082 + else 2.4083 + PKGHANDLER_COMMAND= 2.4084 + 2.4085 + case $PKGHANDLER in 2.4086 + apt-get) 2.4087 + apt_help $MISSING_DEPENDENCY ;; 2.4088 + yum) 2.4089 + yum_help $MISSING_DEPENDENCY ;; 2.4090 + port) 2.4091 + port_help $MISSING_DEPENDENCY ;; 2.4092 + pkgutil) 2.4093 + pkgutil_help $MISSING_DEPENDENCY ;; 2.4094 + pkgadd) 2.4095 + pkgadd_help $MISSING_DEPENDENCY ;; 2.4096 + * ) 2.4097 + break ;; 2.4098 + esac 2.4099 + 2.4100 + if test "x$PKGHANDLER_COMMAND" != x; then 2.4101 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.4102 + fi 2.4103 + fi 2.4104 + 2.4105 + as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5 2.4106 + fi 2.4107 + 2.4108 + # Some of the old makefiles require a setting of OPENWIN_HOME 2.4109 + # Since the X11R6 directory has disappeared on later Linuxes, 2.4110 + # we need to probe for it. 2.4111 + if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.4112 + if test -d "$SYS_ROOT/usr/X11R6"; then 2.4113 + OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 2.4114 + elif test -d "$SYS_ROOT/usr/include/X11"; then 2.4115 + OPENWIN_HOME="$SYS_ROOT/usr" 2.4116 + fi 2.4117 + fi 2.4118 + if test "x$OPENJDK_TARGET_OS" = xsolaris; then 2.4119 + OPENWIN_HOME="/usr/openwin" 2.4120 + fi 2.4121 + 2.4122 + 2.4123 + 2.4124 + # 2.4125 + # Weird Sol10 something check...TODO change to try compile 2.4126 + # 2.4127 + if test "x${OPENJDK_TARGET_OS}" = xsolaris; then 2.4128 + if test "`uname -r`" = "5.10"; then 2.4129 + if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 2.4130 + X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 2.4131 + fi 2.4132 + fi 2.4133 + fi 2.4134 + 2.4135 + ac_ext=c 2.4136 +ac_cpp='$CPP $CPPFLAGS' 2.4137 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.4138 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.4139 +ac_compiler_gnu=$ac_cv_c_compiler_gnu 2.4140 + 2.4141 + OLD_CFLAGS="$CFLAGS" 2.4142 + CFLAGS="$CFLAGS $X_CFLAGS" 2.4143 + 2.4144 + # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 2.4145 + for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h 2.4146 +do : 2.4147 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 2.4148 +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " 2.4149 + # include <X11/Xlib.h> 2.4150 + # include <X11/Xutil.h> 2.4151 + 2.4152 + 2.4153 +" 2.4154 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 2.4155 + cat >>confdefs.h <<_ACEOF 2.4156 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 2.4157 +_ACEOF 2.4158 + X11_A_OK=yes 2.4159 +else 2.4160 + X11_A_OK=no; break 2.4161 +fi 2.4162 + 2.4163 +done 2.4164 + 2.4165 + 2.4166 + CFLAGS="$OLD_CFLAGS" 2.4167 + ac_ext=cpp 2.4168 +ac_cpp='$CXXCPP $CPPFLAGS' 2.4169 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.4170 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.4171 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.4172 + 2.4173 + 2.4174 + if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 2.4175 + 2.4176 + # Print a helpful message on how to acquire the necessary build dependency. 2.4177 + # x11 is the help tag: freetype, cups, pulse, alsa etc 2.4178 + MISSING_DEPENDENCY=x11 2.4179 + 2.4180 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4181 + cygwin_help $MISSING_DEPENDENCY 2.4182 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4183 + msys_help $MISSING_DEPENDENCY 2.4184 + else 2.4185 + PKGHANDLER_COMMAND= 2.4186 + 2.4187 + case $PKGHANDLER in 2.4188 + apt-get) 2.4189 + apt_help $MISSING_DEPENDENCY ;; 2.4190 + yum) 2.4191 + yum_help $MISSING_DEPENDENCY ;; 2.4192 + port) 2.4193 + port_help $MISSING_DEPENDENCY ;; 2.4194 + pkgutil) 2.4195 + pkgutil_help $MISSING_DEPENDENCY ;; 2.4196 + pkgadd) 2.4197 + pkgadd_help $MISSING_DEPENDENCY ;; 2.4198 + * ) 2.4199 + break ;; 2.4200 + esac 2.4201 + 2.4202 + if test "x$PKGHANDLER_COMMAND" != x; then 2.4203 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.4204 + fi 2.4205 + fi 2.4206 + 2.4207 + as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5 2.4208 + fi 2.4209 + 2.4210 + 2.4211 + 2.4212 + 2.4213 + 2.4214 + 2.4215 + ############################################################################### 2.4216 + # 2.4217 + # The common unix printing system cups is used to print from java. 2.4218 + # 2.4219 + 2.4220 +# Check whether --with-cups was given. 2.4221 +if test "${with_cups+set}" = set; then : 2.4222 + withval=$with_cups; 2.4223 +fi 2.4224 + 2.4225 + 2.4226 +# Check whether --with-cups-include was given. 2.4227 +if test "${with_cups_include+set}" = set; then : 2.4228 + withval=$with_cups_include; 2.4229 +fi 2.4230 + 2.4231 + 2.4232 + if test "x$CUPS_NOT_NEEDED" = xyes; then 2.4233 + if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then 2.4234 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5 2.4235 +$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;} 2.4236 + fi 2.4237 + CUPS_CFLAGS= 2.4238 + else 2.4239 + CUPS_FOUND=no 2.4240 + 2.4241 + if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then 2.4242 + as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5 2.4243 + fi 2.4244 + 2.4245 + if test "x${with_cups}" != x; then 2.4246 + CUPS_CFLAGS="-I${with_cups}/include" 2.4247 + CUPS_FOUND=yes 2.4248 + fi 2.4249 + if test "x${with_cups_include}" != x; then 2.4250 + CUPS_CFLAGS="-I${with_cups_include}" 2.4251 + CUPS_FOUND=yes 2.4252 + fi 2.4253 + if test "x$CUPS_FOUND" = xno; then 2.4254 + 2.4255 + 2.4256 + if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.4257 + # Source the builddeps file again, to make sure it uses the latest variables! 2.4258 + . $builddepsfile 2.4259 + # Look for a target and build machine specific resource! 2.4260 + eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.4261 + if test "x$resource" = x; then 2.4262 + # Ok, lets instead look for a target specific resource 2.4263 + eval resource=\${builddep_cups_TARGET_${rewritten_target_var}} 2.4264 + fi 2.4265 + if test "x$resource" = x; then 2.4266 + # Ok, lets instead look for a build specific resource 2.4267 + eval resource=\${builddep_cups_BUILD_${rewritten_build_var}} 2.4268 + fi 2.4269 + if test "x$resource" = x; then 2.4270 + # Ok, lets instead look for a generic resource 2.4271 + # (The cups comes from M4 and not the shell, thus no need for eval here.) 2.4272 + resource=${builddep_cups} 2.4273 + fi 2.4274 + if test "x$resource" != x; then 2.4275 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5 2.4276 +$as_echo "$as_me: Using builddeps $resource for cups" >&6;} 2.4277 + # If the resource in the builddeps.conf file is an existing directory, 2.4278 + # for example /java/linux/cups 2.4279 + if test -d ${resource}; then 2.4280 + depdir=${resource} 2.4281 + else 2.4282 + 2.4283 + # cups is for example mymodule 2.4284 + # $resource is for example libs/general/libmymod_1_2_3.zip 2.4285 + # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.4286 + # $with_builddeps_dir is for example /localhome/builddeps 2.4287 + # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.4288 + # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.4289 + # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.4290 + filename=`basename $resource` 2.4291 + filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.4292 + filebase=${filename%%.*} 2.4293 + extension=${filename#*.} 2.4294 + installdir=$with_builddeps_dir/$filebase 2.4295 + if test ! -f $installdir/$filename.unpacked; then 2.4296 + { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5 2.4297 +$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.4298 + if test ! -d $installdir; then 2.4299 + mkdir -p $installdir 2.4300 + fi 2.4301 + if test ! -d $installdir; then 2.4302 + as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.4303 + fi 2.4304 + tmpfile=`mktemp $installdir/cups.XXXXXXXXX` 2.4305 + touch $tmpfile 2.4306 + if test ! -f $tmpfile; then 2.4307 + as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.4308 + fi 2.4309 + 2.4310 + # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.4311 + # $tmpfile is the local file name for the downloaded file. 2.4312 + VALID_TOOL=no 2.4313 + if test "x$BDEPS_FTP" = xwget; then 2.4314 + VALID_TOOL=yes 2.4315 + wget -O $tmpfile $with_builddeps_server/$resource 2.4316 + fi 2.4317 + if test "x$BDEPS_FTP" = xlftp; then 2.4318 + VALID_TOOL=yes 2.4319 + lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.4320 + fi 2.4321 + if test "x$BDEPS_FTP" = xftp; then 2.4322 + VALID_TOOL=yes 2.4323 + FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.4324 + FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.4325 + FTPUSERPWD=${FTPSERVER%%@*} 2.4326 + if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.4327 + FTPUSER=${userpwd%%:*} 2.4328 + FTPPWD=${userpwd#*@} 2.4329 + FTPSERVER=${FTPSERVER#*@} 2.4330 + else 2.4331 + FTPUSER=ftp 2.4332 + FTPPWD=ftp 2.4333 + fi 2.4334 + # the "pass" command does not work on some 2.4335 + # ftp clients (read ftp.exe) but if it works, 2.4336 + # passive mode is better! 2.4337 + ( \ 2.4338 + echo "user $FTPUSER $FTPPWD" ; \ 2.4339 + echo "pass" ; \ 2.4340 + echo "bin" ; \ 2.4341 + echo "get $FTPPATH $tmpfile" ; \ 2.4342 + ) | ftp -in $FTPSERVER 2.4343 + fi 2.4344 + if test "x$VALID_TOOL" != xyes; then 2.4345 + as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.4346 + fi 2.4347 + 2.4348 + mv $tmpfile $installdir/$filename 2.4349 + if test ! -s $installdir/$filename; then 2.4350 + as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.4351 + fi 2.4352 + case "$extension" in 2.4353 + zip) echo "Unzipping $installdir/$filename..." 2.4354 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.4355 + ;; 2.4356 + tar.gz) echo "Untaring $installdir/$filename..." 2.4357 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.4358 + ;; 2.4359 + tgz) echo "Untaring $installdir/$filename..." 2.4360 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.4361 + ;; 2.4362 + *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.4363 + ;; 2.4364 + esac 2.4365 + fi 2.4366 + if test -f $installdir/$filename.unpacked; then 2.4367 + depdir=$installdir 2.4368 + fi 2.4369 + 2.4370 + fi 2.4371 + # Source the builddeps file again, because in the previous command, the depdir 2.4372 + # was updated to point at the current build dependency install directory. 2.4373 + . $builddepsfile 2.4374 + # Now extract variables from the builddeps.conf files. 2.4375 + theroot=${builddep_cups_ROOT} 2.4376 + thecflags=${builddep_cups_CFLAGS} 2.4377 + thelibs=${builddep_cups_LIBS} 2.4378 + if test "x$depdir" = x; then 2.4379 + as_fn_error $? "Could not download build dependency cups" "$LINENO" 5 2.4380 + fi 2.4381 + CUPS=$depdir 2.4382 + if test "x$theroot" != x; then 2.4383 + CUPS="$theroot" 2.4384 + fi 2.4385 + if test "x$thecflags" != x; then 2.4386 + CUPS_CFLAGS="$thecflags" 2.4387 + fi 2.4388 + if test "x$thelibs" != x; then 2.4389 + CUPS_LIBS="$thelibs" 2.4390 + fi 2.4391 + CUPS_FOUND=yes 2.4392 + 2.4393 + fi 2.4394 + 2.4395 + fi 2.4396 + 2.4397 + fi 2.4398 + if test "x$CUPS_FOUND" = xno; then 2.4399 + # Are the cups headers installed in the default /usr/include location? 2.4400 + for ac_header in cups/cups.h cups/ppd.h 2.4401 +do : 2.4402 + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 2.4403 +ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 2.4404 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 2.4405 + cat >>confdefs.h <<_ACEOF 2.4406 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 2.4407 +_ACEOF 2.4408 + 2.4409 + CUPS_FOUND=yes 2.4410 + CUPS_CFLAGS= 2.4411 + DEFAULT_CUPS=yes 2.4412 + 2.4413 + 2.4414 +fi 2.4415 + 2.4416 +done 2.4417 + 2.4418 + fi 2.4419 + if test "x$CUPS_FOUND" = xno; then 2.4420 + # Getting nervous now? Lets poke around for standard Solaris third-party 2.4421 + # package installation locations. 2.4422 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5 2.4423 +$as_echo_n "checking for cups headers... " >&6; } 2.4424 + if test -s /opt/sfw/cups/include/cups/cups.h; then 2.4425 + # An SFW package seems to be installed! 2.4426 + CUPS_FOUND=yes 2.4427 + CUPS_CFLAGS="-I/opt/sfw/cups/include" 2.4428 + elif test -s /opt/csw/include/cups/cups.h; then 2.4429 + # A CSW package seems to be installed! 2.4430 + CUPS_FOUND=yes 2.4431 + CUPS_CFLAGS="-I/opt/csw/include" 2.4432 + fi 2.4433 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 2.4434 +$as_echo "$CUPS_FOUND" >&6; } 2.4435 + fi 2.4436 + if test "x$CUPS_FOUND" = xno; then 2.4437 + 2.4438 + # Print a helpful message on how to acquire the necessary build dependency. 2.4439 + # cups is the help tag: freetype, cups, pulse, alsa etc 2.4440 + MISSING_DEPENDENCY=cups 2.4441 + 2.4442 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4443 + cygwin_help $MISSING_DEPENDENCY 2.4444 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4445 + msys_help $MISSING_DEPENDENCY 2.4446 + else 2.4447 + PKGHANDLER_COMMAND= 2.4448 + 2.4449 + case $PKGHANDLER in 2.4450 + apt-get) 2.4451 + apt_help $MISSING_DEPENDENCY ;; 2.4452 + yum) 2.4453 + yum_help $MISSING_DEPENDENCY ;; 2.4454 + port) 2.4455 + port_help $MISSING_DEPENDENCY ;; 2.4456 + pkgutil) 2.4457 + pkgutil_help $MISSING_DEPENDENCY ;; 2.4458 + pkgadd) 2.4459 + pkgadd_help $MISSING_DEPENDENCY ;; 2.4460 + * ) 2.4461 + break ;; 2.4462 + esac 2.4463 + 2.4464 + if test "x$PKGHANDLER_COMMAND" != x; then 2.4465 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.4466 + fi 2.4467 + fi 2.4468 + 2.4469 + as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5 2.4470 + fi 2.4471 + fi 2.4472 + 2.4473 + 2.4474 + 2.4475 + 2.4476 + 2.4477 + 2.4478 + ############################################################################### 2.4479 + # 2.4480 + # The ubiquitous freetype library is used to render fonts. 2.4481 + # 2.4482 + 2.4483 +# Check whether --with-freetype was given. 2.4484 +if test "${with_freetype+set}" = set; then : 2.4485 + withval=$with_freetype; 2.4486 +fi 2.4487 + 2.4488 + 2.4489 +# Check whether --with-freetype-include was given. 2.4490 +if test "${with_freetype_include+set}" = set; then : 2.4491 + withval=$with_freetype_include; 2.4492 +fi 2.4493 + 2.4494 + 2.4495 +# Check whether --with-freetype-lib was given. 2.4496 +if test "${with_freetype_lib+set}" = set; then : 2.4497 + withval=$with_freetype_lib; 2.4498 +fi 2.4499 + 2.4500 + # Check whether --enable-freetype-bundling was given. 2.4501 +if test "${enable_freetype_bundling+set}" = set; then : 2.4502 + enableval=$enable_freetype_bundling; 2.4503 +fi 2.4504 + 2.4505 + 2.4506 + FREETYPE_CFLAGS= 2.4507 + FREETYPE_LIBS= 2.4508 + FREETYPE_BUNDLE_LIB_PATH= 2.4509 + 2.4510 + if test "x$FREETYPE_NOT_NEEDED" = xyes; then 2.4511 + if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 2.4512 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5 2.4513 +$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;} 2.4514 + fi 2.4515 + if test "x$enable_freetype_bundling" != x; then 2.4516 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5 2.4517 +$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;} 2.4518 + fi 2.4519 + else 2.4520 + # freetype is needed to build; go get it! 2.4521 + 2.4522 + BUNDLE_FREETYPE="$enable_freetype_bundling" 2.4523 + 2.4524 + if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 2.4525 + # User has specified settings 2.4526 + 2.4527 + if test "x$BUNDLE_FREETYPE" = x; then 2.4528 + # If not specified, default is to bundle freetype 2.4529 + BUNDLE_FREETYPE=yes 2.4530 + fi 2.4531 + 2.4532 + if test "x$with_freetype" != x; then 2.4533 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include" 2.4534 + POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib" 2.4535 + fi 2.4536 + 2.4537 + # Allow --with-freetype-lib and --with-freetype-include to override 2.4538 + if test "x$with_freetype_include" != x; then 2.4539 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include" 2.4540 + fi 2.4541 + if test "x$with_freetype_lib" != x; then 2.4542 + POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib" 2.4543 + fi 2.4544 + 2.4545 + if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then 2.4546 + # Okay, we got it. Check that it works. 2.4547 + 2.4548 + POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.4549 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.4550 + METHOD="--with-freetype" 2.4551 + 2.4552 + # First check if the files exists. 2.4553 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.4554 + # We found an arbitrary include file. That's a good sign. 2.4555 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.4556 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.4557 + FOUND_FREETYPE=yes 2.4558 + 2.4559 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.4560 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.4561 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.4562 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.4563 + FOUND_FREETYPE=no 2.4564 + else 2.4565 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.4566 + # On Windows, we will need both .lib and .dll file. 2.4567 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.4568 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.4569 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.4570 + FOUND_FREETYPE=no 2.4571 + fi 2.4572 + 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 2.4573 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.4574 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.4575 + fi 2.4576 + fi 2.4577 + fi 2.4578 + 2.4579 + if test "x$FOUND_FREETYPE" = xyes; then 2.4580 + 2.4581 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4582 + 2.4583 + # Input might be given as Windows format, start by converting to 2.4584 + # unix format. 2.4585 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.4586 + new_path=`$CYGPATH -u "$path"` 2.4587 + 2.4588 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.4589 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.4590 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.4591 + # "foo.exe" is OK but "foo" is an error. 2.4592 + # 2.4593 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.4594 + # It is also a way to make sure we got the proper file name for the real test later on. 2.4595 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.4596 + if test "x$test_shortpath" = x; then 2.4597 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.4598 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.4599 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.4600 + fi 2.4601 + 2.4602 + # Call helper function which possibly converts this using DOS-style short mode. 2.4603 + # If so, the updated path is stored in $new_path. 2.4604 + 2.4605 + input_path="$new_path" 2.4606 + # Check if we need to convert this using DOS-style short mode. If the path 2.4607 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.4608 + # take no chances and rewrite it. 2.4609 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.4610 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.4611 + if test "x$has_forbidden_chars" != x; then 2.4612 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.4613 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.4614 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.4615 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.4616 + # Going to short mode and back again did indeed matter. Since short mode is 2.4617 + # case insensitive, let's make it lowercase to improve readability. 2.4618 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.4619 + # Now convert it back to Unix-stile (cygpath) 2.4620 + input_path=`$CYGPATH -u "$shortmode_path"` 2.4621 + new_path="$input_path" 2.4622 + fi 2.4623 + fi 2.4624 + 2.4625 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.4626 + if test "x$test_cygdrive_prefix" = x; then 2.4627 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.4628 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.4629 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.4630 + # a path prefixed by /cygdrive for fixpath to work. 2.4631 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.4632 + fi 2.4633 + fi 2.4634 + 2.4635 + 2.4636 + if test "x$path" != "x$new_path"; then 2.4637 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.4638 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.4639 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.4640 + fi 2.4641 + 2.4642 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4643 + 2.4644 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.4645 + has_colon=`$ECHO $path | $GREP ^.:` 2.4646 + new_path="$path" 2.4647 + if test "x$has_colon" = x; then 2.4648 + # Not in mixed or Windows style, start by that. 2.4649 + new_path=`cmd //c echo $path` 2.4650 + fi 2.4651 + 2.4652 + 2.4653 + input_path="$new_path" 2.4654 + # Check if we need to convert this using DOS-style short mode. If the path 2.4655 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.4656 + # take no chances and rewrite it. 2.4657 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.4658 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.4659 + if test "x$has_forbidden_chars" != x; then 2.4660 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.4661 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.4662 + fi 2.4663 + 2.4664 + 2.4665 + windows_path="$new_path" 2.4666 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4667 + unix_path=`$CYGPATH -u "$windows_path"` 2.4668 + new_path="$unix_path" 2.4669 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4670 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.4671 + new_path="$unix_path" 2.4672 + fi 2.4673 + 2.4674 + if test "x$path" != "x$new_path"; then 2.4675 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.4676 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.4677 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.4678 + fi 2.4679 + 2.4680 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.4681 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.4682 + 2.4683 + else 2.4684 + # We're on a posix platform. Hooray! :) 2.4685 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.4686 + has_space=`$ECHO "$path" | $GREP " "` 2.4687 + if test "x$has_space" != x; then 2.4688 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.4689 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.4690 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.4691 + fi 2.4692 + 2.4693 + # Use eval to expand a potential ~ 2.4694 + eval path="$path" 2.4695 + if test ! -f "$path" && test ! -d "$path"; then 2.4696 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.4697 + fi 2.4698 + 2.4699 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.4700 + fi 2.4701 + 2.4702 + 2.4703 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4704 + 2.4705 + # Input might be given as Windows format, start by converting to 2.4706 + # unix format. 2.4707 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.4708 + new_path=`$CYGPATH -u "$path"` 2.4709 + 2.4710 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.4711 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.4712 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.4713 + # "foo.exe" is OK but "foo" is an error. 2.4714 + # 2.4715 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.4716 + # It is also a way to make sure we got the proper file name for the real test later on. 2.4717 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.4718 + if test "x$test_shortpath" = x; then 2.4719 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.4720 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.4721 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.4722 + fi 2.4723 + 2.4724 + # Call helper function which possibly converts this using DOS-style short mode. 2.4725 + # If so, the updated path is stored in $new_path. 2.4726 + 2.4727 + input_path="$new_path" 2.4728 + # Check if we need to convert this using DOS-style short mode. If the path 2.4729 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.4730 + # take no chances and rewrite it. 2.4731 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.4732 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.4733 + if test "x$has_forbidden_chars" != x; then 2.4734 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.4735 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.4736 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.4737 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.4738 + # Going to short mode and back again did indeed matter. Since short mode is 2.4739 + # case insensitive, let's make it lowercase to improve readability. 2.4740 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.4741 + # Now convert it back to Unix-stile (cygpath) 2.4742 + input_path=`$CYGPATH -u "$shortmode_path"` 2.4743 + new_path="$input_path" 2.4744 + fi 2.4745 + fi 2.4746 + 2.4747 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.4748 + if test "x$test_cygdrive_prefix" = x; then 2.4749 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.4750 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.4751 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.4752 + # a path prefixed by /cygdrive for fixpath to work. 2.4753 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.4754 + fi 2.4755 + fi 2.4756 + 2.4757 + 2.4758 + if test "x$path" != "x$new_path"; then 2.4759 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.4760 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.4761 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.4762 + fi 2.4763 + 2.4764 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4765 + 2.4766 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.4767 + has_colon=`$ECHO $path | $GREP ^.:` 2.4768 + new_path="$path" 2.4769 + if test "x$has_colon" = x; then 2.4770 + # Not in mixed or Windows style, start by that. 2.4771 + new_path=`cmd //c echo $path` 2.4772 + fi 2.4773 + 2.4774 + 2.4775 + input_path="$new_path" 2.4776 + # Check if we need to convert this using DOS-style short mode. If the path 2.4777 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.4778 + # take no chances and rewrite it. 2.4779 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.4780 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.4781 + if test "x$has_forbidden_chars" != x; then 2.4782 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.4783 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.4784 + fi 2.4785 + 2.4786 + 2.4787 + windows_path="$new_path" 2.4788 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.4789 + unix_path=`$CYGPATH -u "$windows_path"` 2.4790 + new_path="$unix_path" 2.4791 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.4792 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.4793 + new_path="$unix_path" 2.4794 + fi 2.4795 + 2.4796 + if test "x$path" != "x$new_path"; then 2.4797 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.4798 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.4799 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.4800 + fi 2.4801 + 2.4802 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.4803 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.4804 + 2.4805 + else 2.4806 + # We're on a posix platform. Hooray! :) 2.4807 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.4808 + has_space=`$ECHO "$path" | $GREP " "` 2.4809 + if test "x$has_space" != x; then 2.4810 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.4811 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.4812 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.4813 + fi 2.4814 + 2.4815 + # Use eval to expand a potential ~ 2.4816 + eval path="$path" 2.4817 + if test ! -f "$path" && test ! -d "$path"; then 2.4818 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.4819 + fi 2.4820 + 2.4821 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.4822 + fi 2.4823 + 2.4824 + 2.4825 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.4826 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.4827 +$as_echo_n "checking for freetype includes... " >&6; } 2.4828 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.4829 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.4830 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.4831 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.4832 +$as_echo_n "checking for freetype libraries... " >&6; } 2.4833 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.4834 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.4835 + fi 2.4836 + 2.4837 + if test "x$FOUND_FREETYPE" != xyes; then 2.4838 + as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5 2.4839 + fi 2.4840 + else 2.4841 + # User specified only one of lib or include. This is an error. 2.4842 + if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then 2.4843 + { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5 2.4844 +$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;} 2.4845 + as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5 2.4846 + else 2.4847 + { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5 2.4848 +$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;} 2.4849 + as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5 2.4850 + fi 2.4851 + fi 2.4852 + else 2.4853 + # User did not specify settings, but we need freetype. Try to locate it. 2.4854 + 2.4855 + if test "x$BUNDLE_FREETYPE" = x; then 2.4856 + # If not specified, default is to bundle freetype only on windows 2.4857 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.4858 + BUNDLE_FREETYPE=yes 2.4859 + else 2.4860 + BUNDLE_FREETYPE=no 2.4861 + fi 2.4862 + fi 2.4863 + 2.4864 + if test "x$FOUND_FREETYPE" != xyes; then 2.4865 + # Check builddeps 2.4866 + 2.4867 + 2.4868 + if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.4869 + # Source the builddeps file again, to make sure it uses the latest variables! 2.4870 + . $builddepsfile 2.4871 + # Look for a target and build machine specific resource! 2.4872 + eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.4873 + if test "x$resource" = x; then 2.4874 + # Ok, lets instead look for a target specific resource 2.4875 + eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}} 2.4876 + fi 2.4877 + if test "x$resource" = x; then 2.4878 + # Ok, lets instead look for a build specific resource 2.4879 + eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}} 2.4880 + fi 2.4881 + if test "x$resource" = x; then 2.4882 + # Ok, lets instead look for a generic resource 2.4883 + # (The freetype2 comes from M4 and not the shell, thus no need for eval here.) 2.4884 + resource=${builddep_freetype2} 2.4885 + fi 2.4886 + if test "x$resource" != x; then 2.4887 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5 2.4888 +$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;} 2.4889 + # If the resource in the builddeps.conf file is an existing directory, 2.4890 + # for example /java/linux/cups 2.4891 + if test -d ${resource}; then 2.4892 + depdir=${resource} 2.4893 + else 2.4894 + 2.4895 + # freetype2 is for example mymodule 2.4896 + # $resource is for example libs/general/libmymod_1_2_3.zip 2.4897 + # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.4898 + # $with_builddeps_dir is for example /localhome/builddeps 2.4899 + # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.4900 + # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.4901 + # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.4902 + filename=`basename $resource` 2.4903 + filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.4904 + filebase=${filename%%.*} 2.4905 + extension=${filename#*.} 2.4906 + installdir=$with_builddeps_dir/$filebase 2.4907 + if test ! -f $installdir/$filename.unpacked; then 2.4908 + { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5 2.4909 +$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.4910 + if test ! -d $installdir; then 2.4911 + mkdir -p $installdir 2.4912 + fi 2.4913 + if test ! -d $installdir; then 2.4914 + as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.4915 + fi 2.4916 + tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX` 2.4917 + touch $tmpfile 2.4918 + if test ! -f $tmpfile; then 2.4919 + as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.4920 + fi 2.4921 + 2.4922 + # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.4923 + # $tmpfile is the local file name for the downloaded file. 2.4924 + VALID_TOOL=no 2.4925 + if test "x$BDEPS_FTP" = xwget; then 2.4926 + VALID_TOOL=yes 2.4927 + wget -O $tmpfile $with_builddeps_server/$resource 2.4928 + fi 2.4929 + if test "x$BDEPS_FTP" = xlftp; then 2.4930 + VALID_TOOL=yes 2.4931 + lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.4932 + fi 2.4933 + if test "x$BDEPS_FTP" = xftp; then 2.4934 + VALID_TOOL=yes 2.4935 + FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.4936 + FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.4937 + FTPUSERPWD=${FTPSERVER%%@*} 2.4938 + if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.4939 + FTPUSER=${userpwd%%:*} 2.4940 + FTPPWD=${userpwd#*@} 2.4941 + FTPSERVER=${FTPSERVER#*@} 2.4942 + else 2.4943 + FTPUSER=ftp 2.4944 + FTPPWD=ftp 2.4945 + fi 2.4946 + # the "pass" command does not work on some 2.4947 + # ftp clients (read ftp.exe) but if it works, 2.4948 + # passive mode is better! 2.4949 + ( \ 2.4950 + echo "user $FTPUSER $FTPPWD" ; \ 2.4951 + echo "pass" ; \ 2.4952 + echo "bin" ; \ 2.4953 + echo "get $FTPPATH $tmpfile" ; \ 2.4954 + ) | ftp -in $FTPSERVER 2.4955 + fi 2.4956 + if test "x$VALID_TOOL" != xyes; then 2.4957 + as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.4958 + fi 2.4959 + 2.4960 + mv $tmpfile $installdir/$filename 2.4961 + if test ! -s $installdir/$filename; then 2.4962 + as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.4963 + fi 2.4964 + case "$extension" in 2.4965 + zip) echo "Unzipping $installdir/$filename..." 2.4966 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.4967 + ;; 2.4968 + tar.gz) echo "Untaring $installdir/$filename..." 2.4969 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.4970 + ;; 2.4971 + tgz) echo "Untaring $installdir/$filename..." 2.4972 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.4973 + ;; 2.4974 + *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.4975 + ;; 2.4976 + esac 2.4977 + fi 2.4978 + if test -f $installdir/$filename.unpacked; then 2.4979 + depdir=$installdir 2.4980 + fi 2.4981 + 2.4982 + fi 2.4983 + # Source the builddeps file again, because in the previous command, the depdir 2.4984 + # was updated to point at the current build dependency install directory. 2.4985 + . $builddepsfile 2.4986 + # Now extract variables from the builddeps.conf files. 2.4987 + theroot=${builddep_freetype2_ROOT} 2.4988 + thecflags=${builddep_freetype2_CFLAGS} 2.4989 + thelibs=${builddep_freetype2_LIBS} 2.4990 + if test "x$depdir" = x; then 2.4991 + as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5 2.4992 + fi 2.4993 + FREETYPE=$depdir 2.4994 + if test "x$theroot" != x; then 2.4995 + FREETYPE="$theroot" 2.4996 + fi 2.4997 + if test "x$thecflags" != x; then 2.4998 + FREETYPE_CFLAGS="$thecflags" 2.4999 + fi 2.5000 + if test "x$thelibs" != x; then 2.5001 + FREETYPE_LIBS="$thelibs" 2.5002 + fi 2.5003 + FOUND_FREETYPE=yes 2.5004 + else FOUND_FREETYPE=no 2.5005 + 2.5006 + fi 2.5007 + else FOUND_FREETYPE=no 2.5008 + 2.5009 + fi 2.5010 + 2.5011 + # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. 2.5012 + if test "x$FOUND_FREETYPE" = xyes; then 2.5013 + if test "x$BUNDLE_FREETYPE" = xyes; then 2.5014 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5 2.5015 +$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;} 2.5016 + FOUND_FREETYPE=no 2.5017 + else 2.5018 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5 2.5019 +$as_echo_n "checking for freetype... " >&6; } 2.5020 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5 2.5021 +$as_echo "yes (using builddeps)" >&6; } 2.5022 + fi 2.5023 + fi 2.5024 + fi 2.5025 + 2.5026 + if test "x$FOUND_FREETYPE" != xyes; then 2.5027 + # Check modules using pkg-config, but only if we have it (ugly output results otherwise) 2.5028 + if test "x$PKG_CONFIG" != x; then 2.5029 + 2.5030 +pkg_failed=no 2.5031 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5 2.5032 +$as_echo_n "checking for FREETYPE... " >&6; } 2.5033 + 2.5034 +if test -n "$FREETYPE_CFLAGS"; then 2.5035 + pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS" 2.5036 + elif test -n "$PKG_CONFIG"; then 2.5037 + if test -n "$PKG_CONFIG" && \ 2.5038 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 2.5039 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 2.5040 + ac_status=$? 2.5041 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.5042 + test $ac_status = 0; }; then 2.5043 + pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null` 2.5044 +else 2.5045 + pkg_failed=yes 2.5046 +fi 2.5047 + else 2.5048 + pkg_failed=untried 2.5049 +fi 2.5050 +if test -n "$FREETYPE_LIBS"; then 2.5051 + pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS" 2.5052 + elif test -n "$PKG_CONFIG"; then 2.5053 + if test -n "$PKG_CONFIG" && \ 2.5054 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5 2.5055 + ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5 2.5056 + ac_status=$? 2.5057 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.5058 + test $ac_status = 0; }; then 2.5059 + pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null` 2.5060 +else 2.5061 + pkg_failed=yes 2.5062 +fi 2.5063 + else 2.5064 + pkg_failed=untried 2.5065 +fi 2.5066 + 2.5067 + 2.5068 + 2.5069 +if test $pkg_failed = yes; then 2.5070 + 2.5071 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.5072 + _pkg_short_errors_supported=yes 2.5073 +else 2.5074 + _pkg_short_errors_supported=no 2.5075 +fi 2.5076 + if test $_pkg_short_errors_supported = yes; then 2.5077 + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1` 2.5078 + else 2.5079 + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1` 2.5080 + fi 2.5081 + # Put the nasty error message in config.log where it belongs 2.5082 + echo "$FREETYPE_PKG_ERRORS" >&5 2.5083 + 2.5084 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.5085 +$as_echo "no" >&6; } 2.5086 + FOUND_FREETYPE=no 2.5087 +elif test $pkg_failed = untried; then 2.5088 + FOUND_FREETYPE=no 2.5089 +else 2.5090 + FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS 2.5091 + FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS 2.5092 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.5093 +$as_echo "yes" >&6; } 2.5094 + FOUND_FREETYPE=yes 2.5095 +fi 2.5096 + if test "x$FOUND_FREETYPE" = xyes; then 2.5097 + # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 2.5098 + FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` 2.5099 + # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 2.5100 + if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 2.5101 + FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` 2.5102 + fi 2.5103 + # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. 2.5104 + if test "x$BUNDLE_FREETYPE" = xyes; then 2.5105 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5 2.5106 +$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;} 2.5107 + FOUND_FREETYPE=no 2.5108 + else 2.5109 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5 2.5110 +$as_echo_n "checking for freetype... " >&6; } 2.5111 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5 2.5112 +$as_echo "yes (using pkg-config)" >&6; } 2.5113 + fi 2.5114 + fi 2.5115 + fi 2.5116 + fi 2.5117 + 2.5118 + if test "x$FOUND_FREETYPE" != xyes; then 2.5119 + # Check in well-known locations 2.5120 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.5121 + FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32" 2.5122 + 2.5123 + windows_path="$FREETYPE_BASE_DIR" 2.5124 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5125 + unix_path=`$CYGPATH -u "$windows_path"` 2.5126 + FREETYPE_BASE_DIR="$unix_path" 2.5127 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5128 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5129 + FREETYPE_BASE_DIR="$unix_path" 2.5130 + fi 2.5131 + 2.5132 + 2.5133 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.5134 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib" 2.5135 + METHOD="well-known location" 2.5136 + 2.5137 + # First check if the files exists. 2.5138 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.5139 + # We found an arbitrary include file. That's a good sign. 2.5140 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.5141 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.5142 + FOUND_FREETYPE=yes 2.5143 + 2.5144 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.5145 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.5146 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.5147 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.5148 + FOUND_FREETYPE=no 2.5149 + else 2.5150 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.5151 + # On Windows, we will need both .lib and .dll file. 2.5152 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.5153 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.5154 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.5155 + FOUND_FREETYPE=no 2.5156 + fi 2.5157 + 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 2.5158 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.5159 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.5160 + fi 2.5161 + fi 2.5162 + fi 2.5163 + 2.5164 + if test "x$FOUND_FREETYPE" = xyes; then 2.5165 + 2.5166 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5167 + 2.5168 + # Input might be given as Windows format, start by converting to 2.5169 + # unix format. 2.5170 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5171 + new_path=`$CYGPATH -u "$path"` 2.5172 + 2.5173 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5174 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5175 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5176 + # "foo.exe" is OK but "foo" is an error. 2.5177 + # 2.5178 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5179 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5180 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5181 + if test "x$test_shortpath" = x; then 2.5182 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5183 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5184 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.5185 + fi 2.5186 + 2.5187 + # Call helper function which possibly converts this using DOS-style short mode. 2.5188 + # If so, the updated path is stored in $new_path. 2.5189 + 2.5190 + input_path="$new_path" 2.5191 + # Check if we need to convert this using DOS-style short mode. If the path 2.5192 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5193 + # take no chances and rewrite it. 2.5194 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5195 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5196 + if test "x$has_forbidden_chars" != x; then 2.5197 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5198 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5199 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5200 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5201 + # Going to short mode and back again did indeed matter. Since short mode is 2.5202 + # case insensitive, let's make it lowercase to improve readability. 2.5203 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5204 + # Now convert it back to Unix-stile (cygpath) 2.5205 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5206 + new_path="$input_path" 2.5207 + fi 2.5208 + fi 2.5209 + 2.5210 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5211 + if test "x$test_cygdrive_prefix" = x; then 2.5212 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5213 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5214 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5215 + # a path prefixed by /cygdrive for fixpath to work. 2.5216 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5217 + fi 2.5218 + fi 2.5219 + 2.5220 + 2.5221 + if test "x$path" != "x$new_path"; then 2.5222 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5223 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5224 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5225 + fi 2.5226 + 2.5227 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5228 + 2.5229 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5230 + has_colon=`$ECHO $path | $GREP ^.:` 2.5231 + new_path="$path" 2.5232 + if test "x$has_colon" = x; then 2.5233 + # Not in mixed or Windows style, start by that. 2.5234 + new_path=`cmd //c echo $path` 2.5235 + fi 2.5236 + 2.5237 + 2.5238 + input_path="$new_path" 2.5239 + # Check if we need to convert this using DOS-style short mode. If the path 2.5240 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5241 + # take no chances and rewrite it. 2.5242 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5243 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5244 + if test "x$has_forbidden_chars" != x; then 2.5245 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5246 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5247 + fi 2.5248 + 2.5249 + 2.5250 + windows_path="$new_path" 2.5251 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5252 + unix_path=`$CYGPATH -u "$windows_path"` 2.5253 + new_path="$unix_path" 2.5254 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5255 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5256 + new_path="$unix_path" 2.5257 + fi 2.5258 + 2.5259 + if test "x$path" != "x$new_path"; then 2.5260 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5261 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5262 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5263 + fi 2.5264 + 2.5265 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5266 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5267 + 2.5268 + else 2.5269 + # We're on a posix platform. Hooray! :) 2.5270 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5271 + has_space=`$ECHO "$path" | $GREP " "` 2.5272 + if test "x$has_space" != x; then 2.5273 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5274 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5275 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5276 + fi 2.5277 + 2.5278 + # Use eval to expand a potential ~ 2.5279 + eval path="$path" 2.5280 + if test ! -f "$path" && test ! -d "$path"; then 2.5281 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.5282 + fi 2.5283 + 2.5284 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.5285 + fi 2.5286 + 2.5287 + 2.5288 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5289 + 2.5290 + # Input might be given as Windows format, start by converting to 2.5291 + # unix format. 2.5292 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5293 + new_path=`$CYGPATH -u "$path"` 2.5294 + 2.5295 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5296 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5297 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5298 + # "foo.exe" is OK but "foo" is an error. 2.5299 + # 2.5300 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5301 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5302 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5303 + if test "x$test_shortpath" = x; then 2.5304 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5305 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5306 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.5307 + fi 2.5308 + 2.5309 + # Call helper function which possibly converts this using DOS-style short mode. 2.5310 + # If so, the updated path is stored in $new_path. 2.5311 + 2.5312 + input_path="$new_path" 2.5313 + # Check if we need to convert this using DOS-style short mode. If the path 2.5314 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5315 + # take no chances and rewrite it. 2.5316 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5317 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5318 + if test "x$has_forbidden_chars" != x; then 2.5319 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5320 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5321 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5322 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5323 + # Going to short mode and back again did indeed matter. Since short mode is 2.5324 + # case insensitive, let's make it lowercase to improve readability. 2.5325 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5326 + # Now convert it back to Unix-stile (cygpath) 2.5327 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5328 + new_path="$input_path" 2.5329 + fi 2.5330 + fi 2.5331 + 2.5332 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5333 + if test "x$test_cygdrive_prefix" = x; then 2.5334 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5335 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5336 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5337 + # a path prefixed by /cygdrive for fixpath to work. 2.5338 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5339 + fi 2.5340 + fi 2.5341 + 2.5342 + 2.5343 + if test "x$path" != "x$new_path"; then 2.5344 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5345 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5346 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5347 + fi 2.5348 + 2.5349 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5350 + 2.5351 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5352 + has_colon=`$ECHO $path | $GREP ^.:` 2.5353 + new_path="$path" 2.5354 + if test "x$has_colon" = x; then 2.5355 + # Not in mixed or Windows style, start by that. 2.5356 + new_path=`cmd //c echo $path` 2.5357 + fi 2.5358 + 2.5359 + 2.5360 + input_path="$new_path" 2.5361 + # Check if we need to convert this using DOS-style short mode. If the path 2.5362 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5363 + # take no chances and rewrite it. 2.5364 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5365 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5366 + if test "x$has_forbidden_chars" != x; then 2.5367 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5368 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5369 + fi 2.5370 + 2.5371 + 2.5372 + windows_path="$new_path" 2.5373 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5374 + unix_path=`$CYGPATH -u "$windows_path"` 2.5375 + new_path="$unix_path" 2.5376 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5377 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5378 + new_path="$unix_path" 2.5379 + fi 2.5380 + 2.5381 + if test "x$path" != "x$new_path"; then 2.5382 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5383 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5384 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5385 + fi 2.5386 + 2.5387 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5388 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5389 + 2.5390 + else 2.5391 + # We're on a posix platform. Hooray! :) 2.5392 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5393 + has_space=`$ECHO "$path" | $GREP " "` 2.5394 + if test "x$has_space" != x; then 2.5395 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5396 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5397 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5398 + fi 2.5399 + 2.5400 + # Use eval to expand a potential ~ 2.5401 + eval path="$path" 2.5402 + if test ! -f "$path" && test ! -d "$path"; then 2.5403 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.5404 + fi 2.5405 + 2.5406 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.5407 + fi 2.5408 + 2.5409 + 2.5410 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5411 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.5412 +$as_echo_n "checking for freetype includes... " >&6; } 2.5413 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.5414 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.5415 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.5416 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.5417 +$as_echo_n "checking for freetype libraries... " >&6; } 2.5418 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.5419 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.5420 + fi 2.5421 + 2.5422 + if test "x$FOUND_FREETYPE" != xyes; then 2.5423 + FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" 2.5424 + 2.5425 + windows_path="$FREETYPE_BASE_DIR" 2.5426 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5427 + unix_path=`$CYGPATH -u "$windows_path"` 2.5428 + FREETYPE_BASE_DIR="$unix_path" 2.5429 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5430 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5431 + FREETYPE_BASE_DIR="$unix_path" 2.5432 + fi 2.5433 + 2.5434 + 2.5435 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.5436 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib" 2.5437 + METHOD="well-known location" 2.5438 + 2.5439 + # First check if the files exists. 2.5440 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.5441 + # We found an arbitrary include file. That's a good sign. 2.5442 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.5443 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.5444 + FOUND_FREETYPE=yes 2.5445 + 2.5446 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.5447 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.5448 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.5449 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.5450 + FOUND_FREETYPE=no 2.5451 + else 2.5452 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.5453 + # On Windows, we will need both .lib and .dll file. 2.5454 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.5455 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.5456 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.5457 + FOUND_FREETYPE=no 2.5458 + fi 2.5459 + 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 2.5460 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.5461 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.5462 + fi 2.5463 + fi 2.5464 + fi 2.5465 + 2.5466 + if test "x$FOUND_FREETYPE" = xyes; then 2.5467 + 2.5468 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5469 + 2.5470 + # Input might be given as Windows format, start by converting to 2.5471 + # unix format. 2.5472 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5473 + new_path=`$CYGPATH -u "$path"` 2.5474 + 2.5475 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5476 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5477 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5478 + # "foo.exe" is OK but "foo" is an error. 2.5479 + # 2.5480 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5481 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5482 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5483 + if test "x$test_shortpath" = x; then 2.5484 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5485 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5486 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.5487 + fi 2.5488 + 2.5489 + # Call helper function which possibly converts this using DOS-style short mode. 2.5490 + # If so, the updated path is stored in $new_path. 2.5491 + 2.5492 + input_path="$new_path" 2.5493 + # Check if we need to convert this using DOS-style short mode. If the path 2.5494 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5495 + # take no chances and rewrite it. 2.5496 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5497 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5498 + if test "x$has_forbidden_chars" != x; then 2.5499 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5500 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5501 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5502 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5503 + # Going to short mode and back again did indeed matter. Since short mode is 2.5504 + # case insensitive, let's make it lowercase to improve readability. 2.5505 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5506 + # Now convert it back to Unix-stile (cygpath) 2.5507 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5508 + new_path="$input_path" 2.5509 + fi 2.5510 + fi 2.5511 + 2.5512 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5513 + if test "x$test_cygdrive_prefix" = x; then 2.5514 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5515 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5516 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5517 + # a path prefixed by /cygdrive for fixpath to work. 2.5518 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5519 + fi 2.5520 + fi 2.5521 + 2.5522 + 2.5523 + if test "x$path" != "x$new_path"; then 2.5524 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5525 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5526 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5527 + fi 2.5528 + 2.5529 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5530 + 2.5531 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5532 + has_colon=`$ECHO $path | $GREP ^.:` 2.5533 + new_path="$path" 2.5534 + if test "x$has_colon" = x; then 2.5535 + # Not in mixed or Windows style, start by that. 2.5536 + new_path=`cmd //c echo $path` 2.5537 + fi 2.5538 + 2.5539 + 2.5540 + input_path="$new_path" 2.5541 + # Check if we need to convert this using DOS-style short mode. If the path 2.5542 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5543 + # take no chances and rewrite it. 2.5544 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5545 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5546 + if test "x$has_forbidden_chars" != x; then 2.5547 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5548 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5549 + fi 2.5550 + 2.5551 + 2.5552 + windows_path="$new_path" 2.5553 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5554 + unix_path=`$CYGPATH -u "$windows_path"` 2.5555 + new_path="$unix_path" 2.5556 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5557 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5558 + new_path="$unix_path" 2.5559 + fi 2.5560 + 2.5561 + if test "x$path" != "x$new_path"; then 2.5562 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5563 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5564 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5565 + fi 2.5566 + 2.5567 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5568 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5569 + 2.5570 + else 2.5571 + # We're on a posix platform. Hooray! :) 2.5572 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5573 + has_space=`$ECHO "$path" | $GREP " "` 2.5574 + if test "x$has_space" != x; then 2.5575 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5576 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5577 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5578 + fi 2.5579 + 2.5580 + # Use eval to expand a potential ~ 2.5581 + eval path="$path" 2.5582 + if test ! -f "$path" && test ! -d "$path"; then 2.5583 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.5584 + fi 2.5585 + 2.5586 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.5587 + fi 2.5588 + 2.5589 + 2.5590 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5591 + 2.5592 + # Input might be given as Windows format, start by converting to 2.5593 + # unix format. 2.5594 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5595 + new_path=`$CYGPATH -u "$path"` 2.5596 + 2.5597 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5598 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5599 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5600 + # "foo.exe" is OK but "foo" is an error. 2.5601 + # 2.5602 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5603 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5604 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5605 + if test "x$test_shortpath" = x; then 2.5606 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5607 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5608 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.5609 + fi 2.5610 + 2.5611 + # Call helper function which possibly converts this using DOS-style short mode. 2.5612 + # If so, the updated path is stored in $new_path. 2.5613 + 2.5614 + input_path="$new_path" 2.5615 + # Check if we need to convert this using DOS-style short mode. If the path 2.5616 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5617 + # take no chances and rewrite it. 2.5618 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5619 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5620 + if test "x$has_forbidden_chars" != x; then 2.5621 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5622 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5623 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5624 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5625 + # Going to short mode and back again did indeed matter. Since short mode is 2.5626 + # case insensitive, let's make it lowercase to improve readability. 2.5627 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5628 + # Now convert it back to Unix-stile (cygpath) 2.5629 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5630 + new_path="$input_path" 2.5631 + fi 2.5632 + fi 2.5633 + 2.5634 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5635 + if test "x$test_cygdrive_prefix" = x; then 2.5636 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5637 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5638 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5639 + # a path prefixed by /cygdrive for fixpath to work. 2.5640 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5641 + fi 2.5642 + fi 2.5643 + 2.5644 + 2.5645 + if test "x$path" != "x$new_path"; then 2.5646 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5647 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5648 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5649 + fi 2.5650 + 2.5651 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5652 + 2.5653 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5654 + has_colon=`$ECHO $path | $GREP ^.:` 2.5655 + new_path="$path" 2.5656 + if test "x$has_colon" = x; then 2.5657 + # Not in mixed or Windows style, start by that. 2.5658 + new_path=`cmd //c echo $path` 2.5659 + fi 2.5660 + 2.5661 + 2.5662 + input_path="$new_path" 2.5663 + # Check if we need to convert this using DOS-style short mode. If the path 2.5664 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5665 + # take no chances and rewrite it. 2.5666 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5667 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5668 + if test "x$has_forbidden_chars" != x; then 2.5669 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5670 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5671 + fi 2.5672 + 2.5673 + 2.5674 + windows_path="$new_path" 2.5675 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5676 + unix_path=`$CYGPATH -u "$windows_path"` 2.5677 + new_path="$unix_path" 2.5678 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5679 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5680 + new_path="$unix_path" 2.5681 + fi 2.5682 + 2.5683 + if test "x$path" != "x$new_path"; then 2.5684 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5685 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5686 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5687 + fi 2.5688 + 2.5689 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5690 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5691 + 2.5692 + else 2.5693 + # We're on a posix platform. Hooray! :) 2.5694 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5695 + has_space=`$ECHO "$path" | $GREP " "` 2.5696 + if test "x$has_space" != x; then 2.5697 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5698 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5699 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5700 + fi 2.5701 + 2.5702 + # Use eval to expand a potential ~ 2.5703 + eval path="$path" 2.5704 + if test ! -f "$path" && test ! -d "$path"; then 2.5705 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.5706 + fi 2.5707 + 2.5708 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.5709 + fi 2.5710 + 2.5711 + 2.5712 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5713 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.5714 +$as_echo_n "checking for freetype includes... " >&6; } 2.5715 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.5716 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.5717 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.5718 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.5719 +$as_echo_n "checking for freetype libraries... " >&6; } 2.5720 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.5721 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.5722 + fi 2.5723 + 2.5724 + fi 2.5725 + else 2.5726 + if test "x$SYS_ROOT" = "x/"; then 2.5727 + FREETYPE_ROOT= 2.5728 + else 2.5729 + FREETYPE_ROOT="$SYS_ROOT" 2.5730 + fi 2.5731 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" 2.5732 + 2.5733 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.5734 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib" 2.5735 + METHOD="well-known location" 2.5736 + 2.5737 + # First check if the files exists. 2.5738 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.5739 + # We found an arbitrary include file. That's a good sign. 2.5740 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.5741 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.5742 + FOUND_FREETYPE=yes 2.5743 + 2.5744 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.5745 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.5746 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.5747 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.5748 + FOUND_FREETYPE=no 2.5749 + else 2.5750 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.5751 + # On Windows, we will need both .lib and .dll file. 2.5752 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.5753 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.5754 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.5755 + FOUND_FREETYPE=no 2.5756 + fi 2.5757 + 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 2.5758 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.5759 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.5760 + fi 2.5761 + fi 2.5762 + fi 2.5763 + 2.5764 + if test "x$FOUND_FREETYPE" = xyes; then 2.5765 + 2.5766 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5767 + 2.5768 + # Input might be given as Windows format, start by converting to 2.5769 + # unix format. 2.5770 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5771 + new_path=`$CYGPATH -u "$path"` 2.5772 + 2.5773 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5774 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5775 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5776 + # "foo.exe" is OK but "foo" is an error. 2.5777 + # 2.5778 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5779 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5780 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5781 + if test "x$test_shortpath" = x; then 2.5782 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5783 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5784 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.5785 + fi 2.5786 + 2.5787 + # Call helper function which possibly converts this using DOS-style short mode. 2.5788 + # If so, the updated path is stored in $new_path. 2.5789 + 2.5790 + input_path="$new_path" 2.5791 + # Check if we need to convert this using DOS-style short mode. If the path 2.5792 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5793 + # take no chances and rewrite it. 2.5794 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5795 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5796 + if test "x$has_forbidden_chars" != x; then 2.5797 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5798 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5799 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5800 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5801 + # Going to short mode and back again did indeed matter. Since short mode is 2.5802 + # case insensitive, let's make it lowercase to improve readability. 2.5803 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5804 + # Now convert it back to Unix-stile (cygpath) 2.5805 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5806 + new_path="$input_path" 2.5807 + fi 2.5808 + fi 2.5809 + 2.5810 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5811 + if test "x$test_cygdrive_prefix" = x; then 2.5812 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5813 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5814 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5815 + # a path prefixed by /cygdrive for fixpath to work. 2.5816 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5817 + fi 2.5818 + fi 2.5819 + 2.5820 + 2.5821 + if test "x$path" != "x$new_path"; then 2.5822 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5823 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5824 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5825 + fi 2.5826 + 2.5827 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5828 + 2.5829 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5830 + has_colon=`$ECHO $path | $GREP ^.:` 2.5831 + new_path="$path" 2.5832 + if test "x$has_colon" = x; then 2.5833 + # Not in mixed or Windows style, start by that. 2.5834 + new_path=`cmd //c echo $path` 2.5835 + fi 2.5836 + 2.5837 + 2.5838 + input_path="$new_path" 2.5839 + # Check if we need to convert this using DOS-style short mode. If the path 2.5840 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5841 + # take no chances and rewrite it. 2.5842 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5843 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5844 + if test "x$has_forbidden_chars" != x; then 2.5845 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5846 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5847 + fi 2.5848 + 2.5849 + 2.5850 + windows_path="$new_path" 2.5851 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5852 + unix_path=`$CYGPATH -u "$windows_path"` 2.5853 + new_path="$unix_path" 2.5854 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5855 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5856 + new_path="$unix_path" 2.5857 + fi 2.5858 + 2.5859 + if test "x$path" != "x$new_path"; then 2.5860 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.5861 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.5862 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.5863 + fi 2.5864 + 2.5865 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5866 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5867 + 2.5868 + else 2.5869 + # We're on a posix platform. Hooray! :) 2.5870 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.5871 + has_space=`$ECHO "$path" | $GREP " "` 2.5872 + if test "x$has_space" != x; then 2.5873 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.5874 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5875 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5876 + fi 2.5877 + 2.5878 + # Use eval to expand a potential ~ 2.5879 + eval path="$path" 2.5880 + if test ! -f "$path" && test ! -d "$path"; then 2.5881 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.5882 + fi 2.5883 + 2.5884 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.5885 + fi 2.5886 + 2.5887 + 2.5888 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5889 + 2.5890 + # Input might be given as Windows format, start by converting to 2.5891 + # unix format. 2.5892 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5893 + new_path=`$CYGPATH -u "$path"` 2.5894 + 2.5895 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.5896 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.5897 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.5898 + # "foo.exe" is OK but "foo" is an error. 2.5899 + # 2.5900 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.5901 + # It is also a way to make sure we got the proper file name for the real test later on. 2.5902 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.5903 + if test "x$test_shortpath" = x; then 2.5904 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5905 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5906 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.5907 + fi 2.5908 + 2.5909 + # Call helper function which possibly converts this using DOS-style short mode. 2.5910 + # If so, the updated path is stored in $new_path. 2.5911 + 2.5912 + input_path="$new_path" 2.5913 + # Check if we need to convert this using DOS-style short mode. If the path 2.5914 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5915 + # take no chances and rewrite it. 2.5916 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5917 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.5918 + if test "x$has_forbidden_chars" != x; then 2.5919 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5920 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.5921 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.5922 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.5923 + # Going to short mode and back again did indeed matter. Since short mode is 2.5924 + # case insensitive, let's make it lowercase to improve readability. 2.5925 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5926 + # Now convert it back to Unix-stile (cygpath) 2.5927 + input_path=`$CYGPATH -u "$shortmode_path"` 2.5928 + new_path="$input_path" 2.5929 + fi 2.5930 + fi 2.5931 + 2.5932 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.5933 + if test "x$test_cygdrive_prefix" = x; then 2.5934 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.5935 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.5936 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.5937 + # a path prefixed by /cygdrive for fixpath to work. 2.5938 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.5939 + fi 2.5940 + fi 2.5941 + 2.5942 + 2.5943 + if test "x$path" != "x$new_path"; then 2.5944 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5945 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5946 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5947 + fi 2.5948 + 2.5949 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5950 + 2.5951 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5952 + has_colon=`$ECHO $path | $GREP ^.:` 2.5953 + new_path="$path" 2.5954 + if test "x$has_colon" = x; then 2.5955 + # Not in mixed or Windows style, start by that. 2.5956 + new_path=`cmd //c echo $path` 2.5957 + fi 2.5958 + 2.5959 + 2.5960 + input_path="$new_path" 2.5961 + # Check if we need to convert this using DOS-style short mode. If the path 2.5962 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.5963 + # take no chances and rewrite it. 2.5964 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.5965 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.5966 + if test "x$has_forbidden_chars" != x; then 2.5967 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.5968 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.5969 + fi 2.5970 + 2.5971 + 2.5972 + windows_path="$new_path" 2.5973 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.5974 + unix_path=`$CYGPATH -u "$windows_path"` 2.5975 + new_path="$unix_path" 2.5976 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.5977 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.5978 + new_path="$unix_path" 2.5979 + fi 2.5980 + 2.5981 + if test "x$path" != "x$new_path"; then 2.5982 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.5983 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.5984 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.5985 + fi 2.5986 + 2.5987 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.5988 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.5989 + 2.5990 + else 2.5991 + # We're on a posix platform. Hooray! :) 2.5992 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.5993 + has_space=`$ECHO "$path" | $GREP " "` 2.5994 + if test "x$has_space" != x; then 2.5995 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.5996 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.5997 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.5998 + fi 2.5999 + 2.6000 + # Use eval to expand a potential ~ 2.6001 + eval path="$path" 2.6002 + if test ! -f "$path" && test ! -d "$path"; then 2.6003 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6004 + fi 2.6005 + 2.6006 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6007 + fi 2.6008 + 2.6009 + 2.6010 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6011 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.6012 +$as_echo_n "checking for freetype includes... " >&6; } 2.6013 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.6014 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.6015 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.6016 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.6017 +$as_echo_n "checking for freetype libraries... " >&6; } 2.6018 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.6019 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.6020 + fi 2.6021 + 2.6022 + 2.6023 + if test "x$FOUND_FREETYPE" != xyes; then 2.6024 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" 2.6025 + 2.6026 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.6027 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib" 2.6028 + METHOD="well-known location" 2.6029 + 2.6030 + # First check if the files exists. 2.6031 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.6032 + # We found an arbitrary include file. That's a good sign. 2.6033 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.6034 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.6035 + FOUND_FREETYPE=yes 2.6036 + 2.6037 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.6038 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.6039 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.6040 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.6041 + FOUND_FREETYPE=no 2.6042 + else 2.6043 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.6044 + # On Windows, we will need both .lib and .dll file. 2.6045 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.6046 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.6047 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.6048 + FOUND_FREETYPE=no 2.6049 + fi 2.6050 + 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 2.6051 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.6052 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.6053 + fi 2.6054 + fi 2.6055 + fi 2.6056 + 2.6057 + if test "x$FOUND_FREETYPE" = xyes; then 2.6058 + 2.6059 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6060 + 2.6061 + # Input might be given as Windows format, start by converting to 2.6062 + # unix format. 2.6063 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6064 + new_path=`$CYGPATH -u "$path"` 2.6065 + 2.6066 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6067 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6068 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6069 + # "foo.exe" is OK but "foo" is an error. 2.6070 + # 2.6071 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6072 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6073 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6074 + if test "x$test_shortpath" = x; then 2.6075 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6076 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6077 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.6078 + fi 2.6079 + 2.6080 + # Call helper function which possibly converts this using DOS-style short mode. 2.6081 + # If so, the updated path is stored in $new_path. 2.6082 + 2.6083 + input_path="$new_path" 2.6084 + # Check if we need to convert this using DOS-style short mode. If the path 2.6085 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6086 + # take no chances and rewrite it. 2.6087 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6088 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6089 + if test "x$has_forbidden_chars" != x; then 2.6090 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6091 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6092 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6093 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6094 + # Going to short mode and back again did indeed matter. Since short mode is 2.6095 + # case insensitive, let's make it lowercase to improve readability. 2.6096 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6097 + # Now convert it back to Unix-stile (cygpath) 2.6098 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6099 + new_path="$input_path" 2.6100 + fi 2.6101 + fi 2.6102 + 2.6103 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6104 + if test "x$test_cygdrive_prefix" = x; then 2.6105 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6106 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6107 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6108 + # a path prefixed by /cygdrive for fixpath to work. 2.6109 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6110 + fi 2.6111 + fi 2.6112 + 2.6113 + 2.6114 + if test "x$path" != "x$new_path"; then 2.6115 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6116 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6117 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6118 + fi 2.6119 + 2.6120 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6121 + 2.6122 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6123 + has_colon=`$ECHO $path | $GREP ^.:` 2.6124 + new_path="$path" 2.6125 + if test "x$has_colon" = x; then 2.6126 + # Not in mixed or Windows style, start by that. 2.6127 + new_path=`cmd //c echo $path` 2.6128 + fi 2.6129 + 2.6130 + 2.6131 + input_path="$new_path" 2.6132 + # Check if we need to convert this using DOS-style short mode. If the path 2.6133 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6134 + # take no chances and rewrite it. 2.6135 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6136 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6137 + if test "x$has_forbidden_chars" != x; then 2.6138 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6139 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6140 + fi 2.6141 + 2.6142 + 2.6143 + windows_path="$new_path" 2.6144 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6145 + unix_path=`$CYGPATH -u "$windows_path"` 2.6146 + new_path="$unix_path" 2.6147 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6148 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6149 + new_path="$unix_path" 2.6150 + fi 2.6151 + 2.6152 + if test "x$path" != "x$new_path"; then 2.6153 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6154 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6155 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6156 + fi 2.6157 + 2.6158 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6159 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6160 + 2.6161 + else 2.6162 + # We're on a posix platform. Hooray! :) 2.6163 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6164 + has_space=`$ECHO "$path" | $GREP " "` 2.6165 + if test "x$has_space" != x; then 2.6166 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6167 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6168 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6169 + fi 2.6170 + 2.6171 + # Use eval to expand a potential ~ 2.6172 + eval path="$path" 2.6173 + if test ! -f "$path" && test ! -d "$path"; then 2.6174 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6175 + fi 2.6176 + 2.6177 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6178 + fi 2.6179 + 2.6180 + 2.6181 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6182 + 2.6183 + # Input might be given as Windows format, start by converting to 2.6184 + # unix format. 2.6185 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6186 + new_path=`$CYGPATH -u "$path"` 2.6187 + 2.6188 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6189 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6190 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6191 + # "foo.exe" is OK but "foo" is an error. 2.6192 + # 2.6193 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6194 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6195 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6196 + if test "x$test_shortpath" = x; then 2.6197 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6198 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6199 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.6200 + fi 2.6201 + 2.6202 + # Call helper function which possibly converts this using DOS-style short mode. 2.6203 + # If so, the updated path is stored in $new_path. 2.6204 + 2.6205 + input_path="$new_path" 2.6206 + # Check if we need to convert this using DOS-style short mode. If the path 2.6207 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6208 + # take no chances and rewrite it. 2.6209 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6210 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6211 + if test "x$has_forbidden_chars" != x; then 2.6212 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6213 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6214 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6215 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6216 + # Going to short mode and back again did indeed matter. Since short mode is 2.6217 + # case insensitive, let's make it lowercase to improve readability. 2.6218 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6219 + # Now convert it back to Unix-stile (cygpath) 2.6220 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6221 + new_path="$input_path" 2.6222 + fi 2.6223 + fi 2.6224 + 2.6225 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6226 + if test "x$test_cygdrive_prefix" = x; then 2.6227 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6228 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6229 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6230 + # a path prefixed by /cygdrive for fixpath to work. 2.6231 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6232 + fi 2.6233 + fi 2.6234 + 2.6235 + 2.6236 + if test "x$path" != "x$new_path"; then 2.6237 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6238 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6239 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6240 + fi 2.6241 + 2.6242 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6243 + 2.6244 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6245 + has_colon=`$ECHO $path | $GREP ^.:` 2.6246 + new_path="$path" 2.6247 + if test "x$has_colon" = x; then 2.6248 + # Not in mixed or Windows style, start by that. 2.6249 + new_path=`cmd //c echo $path` 2.6250 + fi 2.6251 + 2.6252 + 2.6253 + input_path="$new_path" 2.6254 + # Check if we need to convert this using DOS-style short mode. If the path 2.6255 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6256 + # take no chances and rewrite it. 2.6257 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6258 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6259 + if test "x$has_forbidden_chars" != x; then 2.6260 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6261 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6262 + fi 2.6263 + 2.6264 + 2.6265 + windows_path="$new_path" 2.6266 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6267 + unix_path=`$CYGPATH -u "$windows_path"` 2.6268 + new_path="$unix_path" 2.6269 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6270 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6271 + new_path="$unix_path" 2.6272 + fi 2.6273 + 2.6274 + if test "x$path" != "x$new_path"; then 2.6275 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6276 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6277 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6278 + fi 2.6279 + 2.6280 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6281 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6282 + 2.6283 + else 2.6284 + # We're on a posix platform. Hooray! :) 2.6285 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6286 + has_space=`$ECHO "$path" | $GREP " "` 2.6287 + if test "x$has_space" != x; then 2.6288 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6289 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6290 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6291 + fi 2.6292 + 2.6293 + # Use eval to expand a potential ~ 2.6294 + eval path="$path" 2.6295 + if test ! -f "$path" && test ! -d "$path"; then 2.6296 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6297 + fi 2.6298 + 2.6299 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6300 + fi 2.6301 + 2.6302 + 2.6303 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6304 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.6305 +$as_echo_n "checking for freetype includes... " >&6; } 2.6306 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.6307 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.6308 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.6309 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.6310 +$as_echo_n "checking for freetype libraries... " >&6; } 2.6311 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.6312 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.6313 + fi 2.6314 + 2.6315 + fi 2.6316 + 2.6317 + if test "x$FOUND_FREETYPE" != xyes; then 2.6318 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" 2.6319 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 2.6320 + 2.6321 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.6322 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu" 2.6323 + METHOD="well-known location" 2.6324 + 2.6325 + # First check if the files exists. 2.6326 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.6327 + # We found an arbitrary include file. That's a good sign. 2.6328 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.6329 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.6330 + FOUND_FREETYPE=yes 2.6331 + 2.6332 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.6333 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.6334 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.6335 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.6336 + FOUND_FREETYPE=no 2.6337 + else 2.6338 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.6339 + # On Windows, we will need both .lib and .dll file. 2.6340 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.6341 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.6342 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.6343 + FOUND_FREETYPE=no 2.6344 + fi 2.6345 + 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 2.6346 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.6347 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.6348 + fi 2.6349 + fi 2.6350 + fi 2.6351 + 2.6352 + if test "x$FOUND_FREETYPE" = xyes; then 2.6353 + 2.6354 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6355 + 2.6356 + # Input might be given as Windows format, start by converting to 2.6357 + # unix format. 2.6358 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6359 + new_path=`$CYGPATH -u "$path"` 2.6360 + 2.6361 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6362 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6363 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6364 + # "foo.exe" is OK but "foo" is an error. 2.6365 + # 2.6366 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6367 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6368 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6369 + if test "x$test_shortpath" = x; then 2.6370 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6371 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6372 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.6373 + fi 2.6374 + 2.6375 + # Call helper function which possibly converts this using DOS-style short mode. 2.6376 + # If so, the updated path is stored in $new_path. 2.6377 + 2.6378 + input_path="$new_path" 2.6379 + # Check if we need to convert this using DOS-style short mode. If the path 2.6380 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6381 + # take no chances and rewrite it. 2.6382 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6383 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6384 + if test "x$has_forbidden_chars" != x; then 2.6385 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6386 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6387 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6388 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6389 + # Going to short mode and back again did indeed matter. Since short mode is 2.6390 + # case insensitive, let's make it lowercase to improve readability. 2.6391 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6392 + # Now convert it back to Unix-stile (cygpath) 2.6393 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6394 + new_path="$input_path" 2.6395 + fi 2.6396 + fi 2.6397 + 2.6398 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6399 + if test "x$test_cygdrive_prefix" = x; then 2.6400 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6401 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6402 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6403 + # a path prefixed by /cygdrive for fixpath to work. 2.6404 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6405 + fi 2.6406 + fi 2.6407 + 2.6408 + 2.6409 + if test "x$path" != "x$new_path"; then 2.6410 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6411 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6412 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6413 + fi 2.6414 + 2.6415 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6416 + 2.6417 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6418 + has_colon=`$ECHO $path | $GREP ^.:` 2.6419 + new_path="$path" 2.6420 + if test "x$has_colon" = x; then 2.6421 + # Not in mixed or Windows style, start by that. 2.6422 + new_path=`cmd //c echo $path` 2.6423 + fi 2.6424 + 2.6425 + 2.6426 + input_path="$new_path" 2.6427 + # Check if we need to convert this using DOS-style short mode. If the path 2.6428 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6429 + # take no chances and rewrite it. 2.6430 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6431 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6432 + if test "x$has_forbidden_chars" != x; then 2.6433 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6434 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6435 + fi 2.6436 + 2.6437 + 2.6438 + windows_path="$new_path" 2.6439 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6440 + unix_path=`$CYGPATH -u "$windows_path"` 2.6441 + new_path="$unix_path" 2.6442 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6443 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6444 + new_path="$unix_path" 2.6445 + fi 2.6446 + 2.6447 + if test "x$path" != "x$new_path"; then 2.6448 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6449 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6450 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6451 + fi 2.6452 + 2.6453 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6454 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6455 + 2.6456 + else 2.6457 + # We're on a posix platform. Hooray! :) 2.6458 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6459 + has_space=`$ECHO "$path" | $GREP " "` 2.6460 + if test "x$has_space" != x; then 2.6461 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6462 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6463 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6464 + fi 2.6465 + 2.6466 + # Use eval to expand a potential ~ 2.6467 + eval path="$path" 2.6468 + if test ! -f "$path" && test ! -d "$path"; then 2.6469 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6470 + fi 2.6471 + 2.6472 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6473 + fi 2.6474 + 2.6475 + 2.6476 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6477 + 2.6478 + # Input might be given as Windows format, start by converting to 2.6479 + # unix format. 2.6480 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6481 + new_path=`$CYGPATH -u "$path"` 2.6482 + 2.6483 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6484 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6485 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6486 + # "foo.exe" is OK but "foo" is an error. 2.6487 + # 2.6488 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6489 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6490 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6491 + if test "x$test_shortpath" = x; then 2.6492 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6493 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6494 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.6495 + fi 2.6496 + 2.6497 + # Call helper function which possibly converts this using DOS-style short mode. 2.6498 + # If so, the updated path is stored in $new_path. 2.6499 + 2.6500 + input_path="$new_path" 2.6501 + # Check if we need to convert this using DOS-style short mode. If the path 2.6502 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6503 + # take no chances and rewrite it. 2.6504 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6505 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6506 + if test "x$has_forbidden_chars" != x; then 2.6507 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6508 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6509 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6510 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6511 + # Going to short mode and back again did indeed matter. Since short mode is 2.6512 + # case insensitive, let's make it lowercase to improve readability. 2.6513 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6514 + # Now convert it back to Unix-stile (cygpath) 2.6515 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6516 + new_path="$input_path" 2.6517 + fi 2.6518 + fi 2.6519 + 2.6520 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6521 + if test "x$test_cygdrive_prefix" = x; then 2.6522 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6523 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6524 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6525 + # a path prefixed by /cygdrive for fixpath to work. 2.6526 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6527 + fi 2.6528 + fi 2.6529 + 2.6530 + 2.6531 + if test "x$path" != "x$new_path"; then 2.6532 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6533 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6534 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6535 + fi 2.6536 + 2.6537 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6538 + 2.6539 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6540 + has_colon=`$ECHO $path | $GREP ^.:` 2.6541 + new_path="$path" 2.6542 + if test "x$has_colon" = x; then 2.6543 + # Not in mixed or Windows style, start by that. 2.6544 + new_path=`cmd //c echo $path` 2.6545 + fi 2.6546 + 2.6547 + 2.6548 + input_path="$new_path" 2.6549 + # Check if we need to convert this using DOS-style short mode. If the path 2.6550 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6551 + # take no chances and rewrite it. 2.6552 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6553 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6554 + if test "x$has_forbidden_chars" != x; then 2.6555 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6556 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6557 + fi 2.6558 + 2.6559 + 2.6560 + windows_path="$new_path" 2.6561 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6562 + unix_path=`$CYGPATH -u "$windows_path"` 2.6563 + new_path="$unix_path" 2.6564 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6565 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6566 + new_path="$unix_path" 2.6567 + fi 2.6568 + 2.6569 + if test "x$path" != "x$new_path"; then 2.6570 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6571 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6572 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6573 + fi 2.6574 + 2.6575 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6576 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6577 + 2.6578 + else 2.6579 + # We're on a posix platform. Hooray! :) 2.6580 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6581 + has_space=`$ECHO "$path" | $GREP " "` 2.6582 + if test "x$has_space" != x; then 2.6583 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6584 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6585 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6586 + fi 2.6587 + 2.6588 + # Use eval to expand a potential ~ 2.6589 + eval path="$path" 2.6590 + if test ! -f "$path" && test ! -d "$path"; then 2.6591 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6592 + fi 2.6593 + 2.6594 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6595 + fi 2.6596 + 2.6597 + 2.6598 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6599 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.6600 +$as_echo_n "checking for freetype includes... " >&6; } 2.6601 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.6602 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.6603 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.6604 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.6605 +$as_echo_n "checking for freetype libraries... " >&6; } 2.6606 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.6607 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.6608 + fi 2.6609 + 2.6610 + else 2.6611 + 2.6612 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.6613 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu" 2.6614 + METHOD="well-known location" 2.6615 + 2.6616 + # First check if the files exists. 2.6617 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.6618 + # We found an arbitrary include file. That's a good sign. 2.6619 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.6620 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.6621 + FOUND_FREETYPE=yes 2.6622 + 2.6623 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.6624 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.6625 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.6626 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.6627 + FOUND_FREETYPE=no 2.6628 + else 2.6629 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.6630 + # On Windows, we will need both .lib and .dll file. 2.6631 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.6632 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.6633 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.6634 + FOUND_FREETYPE=no 2.6635 + fi 2.6636 + 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 2.6637 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.6638 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.6639 + fi 2.6640 + fi 2.6641 + fi 2.6642 + 2.6643 + if test "x$FOUND_FREETYPE" = xyes; then 2.6644 + 2.6645 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6646 + 2.6647 + # Input might be given as Windows format, start by converting to 2.6648 + # unix format. 2.6649 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6650 + new_path=`$CYGPATH -u "$path"` 2.6651 + 2.6652 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6653 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6654 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6655 + # "foo.exe" is OK but "foo" is an error. 2.6656 + # 2.6657 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6658 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6659 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6660 + if test "x$test_shortpath" = x; then 2.6661 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6662 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6663 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.6664 + fi 2.6665 + 2.6666 + # Call helper function which possibly converts this using DOS-style short mode. 2.6667 + # If so, the updated path is stored in $new_path. 2.6668 + 2.6669 + input_path="$new_path" 2.6670 + # Check if we need to convert this using DOS-style short mode. If the path 2.6671 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6672 + # take no chances and rewrite it. 2.6673 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6674 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6675 + if test "x$has_forbidden_chars" != x; then 2.6676 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6677 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6678 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6679 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6680 + # Going to short mode and back again did indeed matter. Since short mode is 2.6681 + # case insensitive, let's make it lowercase to improve readability. 2.6682 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6683 + # Now convert it back to Unix-stile (cygpath) 2.6684 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6685 + new_path="$input_path" 2.6686 + fi 2.6687 + fi 2.6688 + 2.6689 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6690 + if test "x$test_cygdrive_prefix" = x; then 2.6691 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6692 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6693 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6694 + # a path prefixed by /cygdrive for fixpath to work. 2.6695 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6696 + fi 2.6697 + fi 2.6698 + 2.6699 + 2.6700 + if test "x$path" != "x$new_path"; then 2.6701 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6702 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6703 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6704 + fi 2.6705 + 2.6706 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6707 + 2.6708 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6709 + has_colon=`$ECHO $path | $GREP ^.:` 2.6710 + new_path="$path" 2.6711 + if test "x$has_colon" = x; then 2.6712 + # Not in mixed or Windows style, start by that. 2.6713 + new_path=`cmd //c echo $path` 2.6714 + fi 2.6715 + 2.6716 + 2.6717 + input_path="$new_path" 2.6718 + # Check if we need to convert this using DOS-style short mode. If the path 2.6719 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6720 + # take no chances and rewrite it. 2.6721 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6722 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6723 + if test "x$has_forbidden_chars" != x; then 2.6724 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6725 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6726 + fi 2.6727 + 2.6728 + 2.6729 + windows_path="$new_path" 2.6730 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6731 + unix_path=`$CYGPATH -u "$windows_path"` 2.6732 + new_path="$unix_path" 2.6733 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6734 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6735 + new_path="$unix_path" 2.6736 + fi 2.6737 + 2.6738 + if test "x$path" != "x$new_path"; then 2.6739 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6740 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6741 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6742 + fi 2.6743 + 2.6744 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6745 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6746 + 2.6747 + else 2.6748 + # We're on a posix platform. Hooray! :) 2.6749 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6750 + has_space=`$ECHO "$path" | $GREP " "` 2.6751 + if test "x$has_space" != x; then 2.6752 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6753 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6754 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6755 + fi 2.6756 + 2.6757 + # Use eval to expand a potential ~ 2.6758 + eval path="$path" 2.6759 + if test ! -f "$path" && test ! -d "$path"; then 2.6760 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6761 + fi 2.6762 + 2.6763 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6764 + fi 2.6765 + 2.6766 + 2.6767 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6768 + 2.6769 + # Input might be given as Windows format, start by converting to 2.6770 + # unix format. 2.6771 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6772 + new_path=`$CYGPATH -u "$path"` 2.6773 + 2.6774 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6775 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6776 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6777 + # "foo.exe" is OK but "foo" is an error. 2.6778 + # 2.6779 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6780 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6781 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6782 + if test "x$test_shortpath" = x; then 2.6783 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6784 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6785 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.6786 + fi 2.6787 + 2.6788 + # Call helper function which possibly converts this using DOS-style short mode. 2.6789 + # If so, the updated path is stored in $new_path. 2.6790 + 2.6791 + input_path="$new_path" 2.6792 + # Check if we need to convert this using DOS-style short mode. If the path 2.6793 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6794 + # take no chances and rewrite it. 2.6795 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6796 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6797 + if test "x$has_forbidden_chars" != x; then 2.6798 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6799 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6800 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6801 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6802 + # Going to short mode and back again did indeed matter. Since short mode is 2.6803 + # case insensitive, let's make it lowercase to improve readability. 2.6804 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6805 + # Now convert it back to Unix-stile (cygpath) 2.6806 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6807 + new_path="$input_path" 2.6808 + fi 2.6809 + fi 2.6810 + 2.6811 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6812 + if test "x$test_cygdrive_prefix" = x; then 2.6813 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6814 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6815 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6816 + # a path prefixed by /cygdrive for fixpath to work. 2.6817 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6818 + fi 2.6819 + fi 2.6820 + 2.6821 + 2.6822 + if test "x$path" != "x$new_path"; then 2.6823 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6824 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6825 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6826 + fi 2.6827 + 2.6828 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6829 + 2.6830 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6831 + has_colon=`$ECHO $path | $GREP ^.:` 2.6832 + new_path="$path" 2.6833 + if test "x$has_colon" = x; then 2.6834 + # Not in mixed or Windows style, start by that. 2.6835 + new_path=`cmd //c echo $path` 2.6836 + fi 2.6837 + 2.6838 + 2.6839 + input_path="$new_path" 2.6840 + # Check if we need to convert this using DOS-style short mode. If the path 2.6841 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6842 + # take no chances and rewrite it. 2.6843 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6844 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.6845 + if test "x$has_forbidden_chars" != x; then 2.6846 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6847 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6848 + fi 2.6849 + 2.6850 + 2.6851 + windows_path="$new_path" 2.6852 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6853 + unix_path=`$CYGPATH -u "$windows_path"` 2.6854 + new_path="$unix_path" 2.6855 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6856 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.6857 + new_path="$unix_path" 2.6858 + fi 2.6859 + 2.6860 + if test "x$path" != "x$new_path"; then 2.6861 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.6862 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.6863 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.6864 + fi 2.6865 + 2.6866 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.6867 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.6868 + 2.6869 + else 2.6870 + # We're on a posix platform. Hooray! :) 2.6871 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.6872 + has_space=`$ECHO "$path" | $GREP " "` 2.6873 + if test "x$has_space" != x; then 2.6874 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.6875 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6876 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.6877 + fi 2.6878 + 2.6879 + # Use eval to expand a potential ~ 2.6880 + eval path="$path" 2.6881 + if test ! -f "$path" && test ! -d "$path"; then 2.6882 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.6883 + fi 2.6884 + 2.6885 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.6886 + fi 2.6887 + 2.6888 + 2.6889 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6890 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.6891 +$as_echo_n "checking for freetype includes... " >&6; } 2.6892 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.6893 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.6894 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.6895 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.6896 +$as_echo_n "checking for freetype libraries... " >&6; } 2.6897 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.6898 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.6899 + fi 2.6900 + 2.6901 + if test "x$FOUND_FREETYPE" != xyes; then 2.6902 + 2.6903 + POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include" 2.6904 + POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32" 2.6905 + METHOD="well-known location" 2.6906 + 2.6907 + # First check if the files exists. 2.6908 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 2.6909 + # We found an arbitrary include file. That's a good sign. 2.6910 + { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5 2.6911 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;} 2.6912 + FOUND_FREETYPE=yes 2.6913 + 2.6914 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 2.6915 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 2.6916 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5 2.6917 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;} 2.6918 + FOUND_FREETYPE=no 2.6919 + else 2.6920 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.6921 + # On Windows, we will need both .lib and .dll file. 2.6922 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 2.6923 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5 2.6924 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;} 2.6925 + FOUND_FREETYPE=no 2.6926 + fi 2.6927 + 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 2.6928 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 2.6929 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 2.6930 + fi 2.6931 + fi 2.6932 + fi 2.6933 + 2.6934 + if test "x$FOUND_FREETYPE" = xyes; then 2.6935 + 2.6936 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.6937 + 2.6938 + # Input might be given as Windows format, start by converting to 2.6939 + # unix format. 2.6940 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.6941 + new_path=`$CYGPATH -u "$path"` 2.6942 + 2.6943 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.6944 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.6945 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.6946 + # "foo.exe" is OK but "foo" is an error. 2.6947 + # 2.6948 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.6949 + # It is also a way to make sure we got the proper file name for the real test later on. 2.6950 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.6951 + if test "x$test_shortpath" = x; then 2.6952 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.6953 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.6954 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.6955 + fi 2.6956 + 2.6957 + # Call helper function which possibly converts this using DOS-style short mode. 2.6958 + # If so, the updated path is stored in $new_path. 2.6959 + 2.6960 + input_path="$new_path" 2.6961 + # Check if we need to convert this using DOS-style short mode. If the path 2.6962 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.6963 + # take no chances and rewrite it. 2.6964 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.6965 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.6966 + if test "x$has_forbidden_chars" != x; then 2.6967 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.6968 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.6969 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.6970 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.6971 + # Going to short mode and back again did indeed matter. Since short mode is 2.6972 + # case insensitive, let's make it lowercase to improve readability. 2.6973 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.6974 + # Now convert it back to Unix-stile (cygpath) 2.6975 + input_path=`$CYGPATH -u "$shortmode_path"` 2.6976 + new_path="$input_path" 2.6977 + fi 2.6978 + fi 2.6979 + 2.6980 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.6981 + if test "x$test_cygdrive_prefix" = x; then 2.6982 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.6983 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.6984 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.6985 + # a path prefixed by /cygdrive for fixpath to work. 2.6986 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.6987 + fi 2.6988 + fi 2.6989 + 2.6990 + 2.6991 + if test "x$path" != "x$new_path"; then 2.6992 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.6993 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.6994 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.6995 + fi 2.6996 + 2.6997 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.6998 + 2.6999 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.7000 + has_colon=`$ECHO $path | $GREP ^.:` 2.7001 + new_path="$path" 2.7002 + if test "x$has_colon" = x; then 2.7003 + # Not in mixed or Windows style, start by that. 2.7004 + new_path=`cmd //c echo $path` 2.7005 + fi 2.7006 + 2.7007 + 2.7008 + input_path="$new_path" 2.7009 + # Check if we need to convert this using DOS-style short mode. If the path 2.7010 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7011 + # take no chances and rewrite it. 2.7012 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7013 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.7014 + if test "x$has_forbidden_chars" != x; then 2.7015 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7016 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7017 + fi 2.7018 + 2.7019 + 2.7020 + windows_path="$new_path" 2.7021 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7022 + unix_path=`$CYGPATH -u "$windows_path"` 2.7023 + new_path="$unix_path" 2.7024 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7025 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.7026 + new_path="$unix_path" 2.7027 + fi 2.7028 + 2.7029 + if test "x$path" != "x$new_path"; then 2.7030 + POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path" 2.7031 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.7032 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.7033 + fi 2.7034 + 2.7035 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.7036 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.7037 + 2.7038 + else 2.7039 + # We're on a posix platform. Hooray! :) 2.7040 + path="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.7041 + has_space=`$ECHO "$path" | $GREP " "` 2.7042 + if test "x$has_space" != x; then 2.7043 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.7044 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7045 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.7046 + fi 2.7047 + 2.7048 + # Use eval to expand a potential ~ 2.7049 + eval path="$path" 2.7050 + if test ! -f "$path" && test ! -d "$path"; then 2.7051 + as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.7052 + fi 2.7053 + 2.7054 + POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.7055 + fi 2.7056 + 2.7057 + 2.7058 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7059 + 2.7060 + # Input might be given as Windows format, start by converting to 2.7061 + # unix format. 2.7062 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.7063 + new_path=`$CYGPATH -u "$path"` 2.7064 + 2.7065 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.7066 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.7067 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.7068 + # "foo.exe" is OK but "foo" is an error. 2.7069 + # 2.7070 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.7071 + # It is also a way to make sure we got the proper file name for the real test later on. 2.7072 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.7073 + if test "x$test_shortpath" = x; then 2.7074 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.7075 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7076 + as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5 2.7077 + fi 2.7078 + 2.7079 + # Call helper function which possibly converts this using DOS-style short mode. 2.7080 + # If so, the updated path is stored in $new_path. 2.7081 + 2.7082 + input_path="$new_path" 2.7083 + # Check if we need to convert this using DOS-style short mode. If the path 2.7084 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7085 + # take no chances and rewrite it. 2.7086 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7087 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.7088 + if test "x$has_forbidden_chars" != x; then 2.7089 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7090 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.7091 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.7092 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.7093 + # Going to short mode and back again did indeed matter. Since short mode is 2.7094 + # case insensitive, let's make it lowercase to improve readability. 2.7095 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7096 + # Now convert it back to Unix-stile (cygpath) 2.7097 + input_path=`$CYGPATH -u "$shortmode_path"` 2.7098 + new_path="$input_path" 2.7099 + fi 2.7100 + fi 2.7101 + 2.7102 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.7103 + if test "x$test_cygdrive_prefix" = x; then 2.7104 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.7105 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.7106 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.7107 + # a path prefixed by /cygdrive for fixpath to work. 2.7108 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.7109 + fi 2.7110 + fi 2.7111 + 2.7112 + 2.7113 + if test "x$path" != "x$new_path"; then 2.7114 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.7115 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.7116 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.7117 + fi 2.7118 + 2.7119 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7120 + 2.7121 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.7122 + has_colon=`$ECHO $path | $GREP ^.:` 2.7123 + new_path="$path" 2.7124 + if test "x$has_colon" = x; then 2.7125 + # Not in mixed or Windows style, start by that. 2.7126 + new_path=`cmd //c echo $path` 2.7127 + fi 2.7128 + 2.7129 + 2.7130 + input_path="$new_path" 2.7131 + # Check if we need to convert this using DOS-style short mode. If the path 2.7132 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7133 + # take no chances and rewrite it. 2.7134 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7135 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.7136 + if test "x$has_forbidden_chars" != x; then 2.7137 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7138 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7139 + fi 2.7140 + 2.7141 + 2.7142 + windows_path="$new_path" 2.7143 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7144 + unix_path=`$CYGPATH -u "$windows_path"` 2.7145 + new_path="$unix_path" 2.7146 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7147 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.7148 + new_path="$unix_path" 2.7149 + fi 2.7150 + 2.7151 + if test "x$path" != "x$new_path"; then 2.7152 + POTENTIAL_FREETYPE_LIB_PATH="$new_path" 2.7153 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.7154 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.7155 + fi 2.7156 + 2.7157 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.7158 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.7159 + 2.7160 + else 2.7161 + # We're on a posix platform. Hooray! :) 2.7162 + path="$POTENTIAL_FREETYPE_LIB_PATH" 2.7163 + has_space=`$ECHO "$path" | $GREP " "` 2.7164 + if test "x$has_space" != x; then 2.7165 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.7166 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7167 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.7168 + fi 2.7169 + 2.7170 + # Use eval to expand a potential ~ 2.7171 + eval path="$path" 2.7172 + if test ! -f "$path" && test ! -d "$path"; then 2.7173 + as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.7174 + fi 2.7175 + 2.7176 + POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.7177 + fi 2.7178 + 2.7179 + 2.7180 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 2.7181 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5 2.7182 +$as_echo_n "checking for freetype includes... " >&6; } 2.7183 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5 2.7184 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; } 2.7185 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 2.7186 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5 2.7187 +$as_echo_n "checking for freetype libraries... " >&6; } 2.7188 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5 2.7189 +$as_echo "$FREETYPE_LIB_PATH" >&6; } 2.7190 + fi 2.7191 + 2.7192 + fi 2.7193 + fi 2.7194 + fi 2.7195 + fi 2.7196 + fi # end check in well-known locations 2.7197 + 2.7198 + if test "x$FOUND_FREETYPE" != xyes; then 2.7199 + 2.7200 + # Print a helpful message on how to acquire the necessary build dependency. 2.7201 + # freetype is the help tag: freetype, cups, pulse, alsa etc 2.7202 + MISSING_DEPENDENCY=freetype 2.7203 + 2.7204 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7205 + cygwin_help $MISSING_DEPENDENCY 2.7206 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7207 + msys_help $MISSING_DEPENDENCY 2.7208 + else 2.7209 + PKGHANDLER_COMMAND= 2.7210 + 2.7211 + case $PKGHANDLER in 2.7212 + apt-get) 2.7213 + apt_help $MISSING_DEPENDENCY ;; 2.7214 + yum) 2.7215 + yum_help $MISSING_DEPENDENCY ;; 2.7216 + port) 2.7217 + port_help $MISSING_DEPENDENCY ;; 2.7218 + pkgutil) 2.7219 + pkgutil_help $MISSING_DEPENDENCY ;; 2.7220 + pkgadd) 2.7221 + pkgadd_help $MISSING_DEPENDENCY ;; 2.7222 + * ) 2.7223 + break ;; 2.7224 + esac 2.7225 + 2.7226 + if test "x$PKGHANDLER_COMMAND" != x; then 2.7227 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.7228 + fi 2.7229 + fi 2.7230 + 2.7231 + as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5 2.7232 + fi 2.7233 + fi # end user specified settings 2.7234 + 2.7235 + # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir. 2.7236 + if test "x$FREETYPE_CFLAGS" = x; then 2.7237 + 2.7238 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7239 + 2.7240 + # Input might be given as Windows format, start by converting to 2.7241 + # unix format. 2.7242 + path="$FREETYPE_INCLUDE_PATH" 2.7243 + new_path=`$CYGPATH -u "$path"` 2.7244 + 2.7245 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.7246 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.7247 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.7248 + # "foo.exe" is OK but "foo" is an error. 2.7249 + # 2.7250 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.7251 + # It is also a way to make sure we got the proper file name for the real test later on. 2.7252 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.7253 + if test "x$test_shortpath" = x; then 2.7254 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.7255 +$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7256 + as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5 2.7257 + fi 2.7258 + 2.7259 + # Call helper function which possibly converts this using DOS-style short mode. 2.7260 + # If so, the updated path is stored in $new_path. 2.7261 + 2.7262 + input_path="$new_path" 2.7263 + # Check if we need to convert this using DOS-style short mode. If the path 2.7264 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7265 + # take no chances and rewrite it. 2.7266 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7267 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.7268 + if test "x$has_forbidden_chars" != x; then 2.7269 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7270 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.7271 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.7272 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.7273 + # Going to short mode and back again did indeed matter. Since short mode is 2.7274 + # case insensitive, let's make it lowercase to improve readability. 2.7275 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7276 + # Now convert it back to Unix-stile (cygpath) 2.7277 + input_path=`$CYGPATH -u "$shortmode_path"` 2.7278 + new_path="$input_path" 2.7279 + fi 2.7280 + fi 2.7281 + 2.7282 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.7283 + if test "x$test_cygdrive_prefix" = x; then 2.7284 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.7285 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.7286 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.7287 + # a path prefixed by /cygdrive for fixpath to work. 2.7288 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.7289 + fi 2.7290 + fi 2.7291 + 2.7292 + 2.7293 + if test "x$path" != "x$new_path"; then 2.7294 + FREETYPE_INCLUDE_PATH="$new_path" 2.7295 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.7296 +$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.7297 + fi 2.7298 + 2.7299 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7300 + 2.7301 + path="$FREETYPE_INCLUDE_PATH" 2.7302 + has_colon=`$ECHO $path | $GREP ^.:` 2.7303 + new_path="$path" 2.7304 + if test "x$has_colon" = x; then 2.7305 + # Not in mixed or Windows style, start by that. 2.7306 + new_path=`cmd //c echo $path` 2.7307 + fi 2.7308 + 2.7309 + 2.7310 + input_path="$new_path" 2.7311 + # Check if we need to convert this using DOS-style short mode. If the path 2.7312 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7313 + # take no chances and rewrite it. 2.7314 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7315 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.7316 + if test "x$has_forbidden_chars" != x; then 2.7317 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7318 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7319 + fi 2.7320 + 2.7321 + 2.7322 + windows_path="$new_path" 2.7323 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7324 + unix_path=`$CYGPATH -u "$windows_path"` 2.7325 + new_path="$unix_path" 2.7326 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7327 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.7328 + new_path="$unix_path" 2.7329 + fi 2.7330 + 2.7331 + if test "x$path" != "x$new_path"; then 2.7332 + FREETYPE_INCLUDE_PATH="$new_path" 2.7333 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5 2.7334 +$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;} 2.7335 + fi 2.7336 + 2.7337 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.7338 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.7339 + 2.7340 + else 2.7341 + # We're on a posix platform. Hooray! :) 2.7342 + path="$FREETYPE_INCLUDE_PATH" 2.7343 + has_space=`$ECHO "$path" | $GREP " "` 2.7344 + if test "x$has_space" != x; then 2.7345 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5 2.7346 +$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7347 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.7348 + fi 2.7349 + 2.7350 + # Use eval to expand a potential ~ 2.7351 + eval path="$path" 2.7352 + if test ! -f "$path" && test ! -d "$path"; then 2.7353 + as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.7354 + fi 2.7355 + 2.7356 + FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`" 2.7357 + fi 2.7358 + 2.7359 + if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then 2.7360 + FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH" 2.7361 + else 2.7362 + FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH" 2.7363 + fi 2.7364 + fi 2.7365 + 2.7366 + if test "x$FREETYPE_LIBS" = x; then 2.7367 + 2.7368 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7369 + 2.7370 + # Input might be given as Windows format, start by converting to 2.7371 + # unix format. 2.7372 + path="$FREETYPE_LIB_PATH" 2.7373 + new_path=`$CYGPATH -u "$path"` 2.7374 + 2.7375 + # Cygwin tries to hide some aspects of the Windows file system, such that binaries are 2.7376 + # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered 2.7377 + # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then 2.7378 + # "foo.exe" is OK but "foo" is an error. 2.7379 + # 2.7380 + # This test is therefore slightly more accurate than "test -f" to check for file precense. 2.7381 + # It is also a way to make sure we got the proper file name for the real test later on. 2.7382 + test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null` 2.7383 + if test "x$test_shortpath" = x; then 2.7384 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.7385 +$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7386 + as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5 2.7387 + fi 2.7388 + 2.7389 + # Call helper function which possibly converts this using DOS-style short mode. 2.7390 + # If so, the updated path is stored in $new_path. 2.7391 + 2.7392 + input_path="$new_path" 2.7393 + # Check if we need to convert this using DOS-style short mode. If the path 2.7394 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7395 + # take no chances and rewrite it. 2.7396 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7397 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]` 2.7398 + if test "x$has_forbidden_chars" != x; then 2.7399 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7400 + shortmode_path=`$CYGPATH -s -m -a "$input_path"` 2.7401 + path_after_shortmode=`$CYGPATH -u "$shortmode_path"` 2.7402 + if test "x$path_after_shortmode" != "x$input_to_shortpath"; then 2.7403 + # Going to short mode and back again did indeed matter. Since short mode is 2.7404 + # case insensitive, let's make it lowercase to improve readability. 2.7405 + shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7406 + # Now convert it back to Unix-stile (cygpath) 2.7407 + input_path=`$CYGPATH -u "$shortmode_path"` 2.7408 + new_path="$input_path" 2.7409 + fi 2.7410 + fi 2.7411 + 2.7412 + test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/` 2.7413 + if test "x$test_cygdrive_prefix" = x; then 2.7414 + # As a simple fix, exclude /usr/bin since it's not a real path. 2.7415 + if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then 2.7416 + # The path is in a Cygwin special directory (e.g. /home). We need this converted to 2.7417 + # a path prefixed by /cygdrive for fixpath to work. 2.7418 + new_path="$CYGWIN_ROOT_PATH$input_path" 2.7419 + fi 2.7420 + fi 2.7421 + 2.7422 + 2.7423 + if test "x$path" != "x$new_path"; then 2.7424 + FREETYPE_LIB_PATH="$new_path" 2.7425 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.7426 +$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.7427 + fi 2.7428 + 2.7429 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7430 + 2.7431 + path="$FREETYPE_LIB_PATH" 2.7432 + has_colon=`$ECHO $path | $GREP ^.:` 2.7433 + new_path="$path" 2.7434 + if test "x$has_colon" = x; then 2.7435 + # Not in mixed or Windows style, start by that. 2.7436 + new_path=`cmd //c echo $path` 2.7437 + fi 2.7438 + 2.7439 + 2.7440 + input_path="$new_path" 2.7441 + # Check if we need to convert this using DOS-style short mode. If the path 2.7442 + # contains just simple characters, use it. Otherwise (spaces, weird characters), 2.7443 + # take no chances and rewrite it. 2.7444 + # Note: m4 eats our [], so we need to use [ and ] instead. 2.7445 + has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]` 2.7446 + if test "x$has_forbidden_chars" != x; then 2.7447 + # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \) 2.7448 + new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 2.7449 + fi 2.7450 + 2.7451 + 2.7452 + windows_path="$new_path" 2.7453 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7454 + unix_path=`$CYGPATH -u "$windows_path"` 2.7455 + new_path="$unix_path" 2.7456 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7457 + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` 2.7458 + new_path="$unix_path" 2.7459 + fi 2.7460 + 2.7461 + if test "x$path" != "x$new_path"; then 2.7462 + FREETYPE_LIB_PATH="$new_path" 2.7463 + { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5 2.7464 +$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;} 2.7465 + fi 2.7466 + 2.7467 + # Save the first 10 bytes of this path to the storage, so fixpath can work. 2.7468 + all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}") 2.7469 + 2.7470 + else 2.7471 + # We're on a posix platform. Hooray! :) 2.7472 + path="$FREETYPE_LIB_PATH" 2.7473 + has_space=`$ECHO "$path" | $GREP " "` 2.7474 + if test "x$has_space" != x; then 2.7475 + { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5 2.7476 +$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;} 2.7477 + as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5 2.7478 + fi 2.7479 + 2.7480 + # Use eval to expand a potential ~ 2.7481 + eval path="$path" 2.7482 + if test ! -f "$path" && test ! -d "$path"; then 2.7483 + as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5 2.7484 + fi 2.7485 + 2.7486 + FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`" 2.7487 + fi 2.7488 + 2.7489 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 2.7490 + FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib" 2.7491 + else 2.7492 + FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype" 2.7493 + fi 2.7494 + fi 2.7495 + 2.7496 + # Try to compile it 2.7497 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5 2.7498 +$as_echo_n "checking if we can compile and link with freetype... " >&6; } 2.7499 + ac_ext=cpp 2.7500 +ac_cpp='$CXXCPP $CPPFLAGS' 2.7501 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.7502 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.7503 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.7504 + 2.7505 + PREV_CXXCFLAGS="$CXXFLAGS" 2.7506 + PREV_LDFLAGS="$LDFLAGS" 2.7507 + PREV_CXX="$CXX" 2.7508 + CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" 2.7509 + LDFLAGS="$LDFLAGS $FREETYPE_LIBS" 2.7510 + CXX="$FIXPATH $CXX" 2.7511 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.7512 +/* end confdefs.h. */ 2.7513 + 2.7514 + #include<ft2build.h> 2.7515 + #include FT_FREETYPE_H 2.7516 + int main () { 2.7517 + FT_Init_FreeType(NULL); 2.7518 + return 0; 2.7519 + } 2.7520 + 2.7521 +_ACEOF 2.7522 +if ac_fn_cxx_try_link "$LINENO"; then : 2.7523 + 2.7524 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.7525 +$as_echo "yes" >&6; } 2.7526 + 2.7527 +else 2.7528 + 2.7529 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.7530 +$as_echo "no" >&6; } 2.7531 + { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5 2.7532 +$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;} 2.7533 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5 2.7534 +$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;} 2.7535 + 2.7536 + 2.7537 + # Print a helpful message on how to acquire the necessary build dependency. 2.7538 + # freetype is the help tag: freetype, cups, pulse, alsa etc 2.7539 + MISSING_DEPENDENCY=freetype 2.7540 + 2.7541 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7542 + cygwin_help $MISSING_DEPENDENCY 2.7543 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7544 + msys_help $MISSING_DEPENDENCY 2.7545 + else 2.7546 + PKGHANDLER_COMMAND= 2.7547 + 2.7548 + case $PKGHANDLER in 2.7549 + apt-get) 2.7550 + apt_help $MISSING_DEPENDENCY ;; 2.7551 + yum) 2.7552 + yum_help $MISSING_DEPENDENCY ;; 2.7553 + port) 2.7554 + port_help $MISSING_DEPENDENCY ;; 2.7555 + pkgutil) 2.7556 + pkgutil_help $MISSING_DEPENDENCY ;; 2.7557 + pkgadd) 2.7558 + pkgadd_help $MISSING_DEPENDENCY ;; 2.7559 + * ) 2.7560 + break ;; 2.7561 + esac 2.7562 + 2.7563 + if test "x$PKGHANDLER_COMMAND" != x; then 2.7564 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.7565 + fi 2.7566 + fi 2.7567 + 2.7568 + 2.7569 + as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5 2.7570 + 2.7571 + 2.7572 +fi 2.7573 +rm -f core conftest.err conftest.$ac_objext \ 2.7574 + conftest$ac_exeext conftest.$ac_ext 2.7575 + CXXCFLAGS="$PREV_CXXFLAGS" 2.7576 + LDFLAGS="$PREV_LDFLAGS" 2.7577 + CXX="$PREV_CXX" 2.7578 + ac_ext=cpp 2.7579 +ac_cpp='$CXXCPP $CPPFLAGS' 2.7580 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.7581 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.7582 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.7583 + 2.7584 + 2.7585 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5 2.7586 +$as_echo_n "checking if we should bundle freetype... " >&6; } 2.7587 + if test "x$BUNDLE_FREETYPE" = xyes; then 2.7588 + FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH" 2.7589 + fi 2.7590 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5 2.7591 +$as_echo "$BUNDLE_FREETYPE" >&6; } 2.7592 + 2.7593 + fi # end freetype needed 2.7594 + 2.7595 + 2.7596 + 2.7597 + 2.7598 + 2.7599 + 2.7600 + 2.7601 + ############################################################################### 2.7602 + # 2.7603 + # Check for alsa headers and libraries. Used on Linux/GNU systems. 2.7604 + # 2.7605 + 2.7606 +# Check whether --with-alsa was given. 2.7607 +if test "${with_alsa+set}" = set; then : 2.7608 + withval=$with_alsa; 2.7609 +fi 2.7610 + 2.7611 + 2.7612 +# Check whether --with-alsa-include was given. 2.7613 +if test "${with_alsa_include+set}" = set; then : 2.7614 + withval=$with_alsa_include; 2.7615 +fi 2.7616 + 2.7617 + 2.7618 +# Check whether --with-alsa-lib was given. 2.7619 +if test "${with_alsa_lib+set}" = set; then : 2.7620 + withval=$with_alsa_lib; 2.7621 +fi 2.7622 + 2.7623 + 2.7624 + if test "x$ALSA_NOT_NEEDED" = xyes; then 2.7625 + if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 2.7626 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5 2.7627 +$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;} 2.7628 + fi 2.7629 + ALSA_CFLAGS= 2.7630 + ALSA_LIBS= 2.7631 + else 2.7632 + ALSA_FOUND=no 2.7633 + 2.7634 + if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 2.7635 + as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5 2.7636 + fi 2.7637 + 2.7638 + if test "x${with_alsa}" != x; then 2.7639 + ALSA_LIBS="-L${with_alsa}/lib -lalsa" 2.7640 + ALSA_CFLAGS="-I${with_alsa}/include" 2.7641 + ALSA_FOUND=yes 2.7642 + fi 2.7643 + if test "x${with_alsa_include}" != x; then 2.7644 + ALSA_CFLAGS="-I${with_alsa_include}" 2.7645 + ALSA_FOUND=yes 2.7646 + fi 2.7647 + if test "x${with_alsa_lib}" != x; then 2.7648 + ALSA_LIBS="-L${with_alsa_lib} -lalsa" 2.7649 + ALSA_FOUND=yes 2.7650 + fi 2.7651 + if test "x$ALSA_FOUND" = xno; then 2.7652 + 2.7653 + 2.7654 + if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then 2.7655 + # Source the builddeps file again, to make sure it uses the latest variables! 2.7656 + . $builddepsfile 2.7657 + # Look for a target and build machine specific resource! 2.7658 + eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}} 2.7659 + if test "x$resource" = x; then 2.7660 + # Ok, lets instead look for a target specific resource 2.7661 + eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}} 2.7662 + fi 2.7663 + if test "x$resource" = x; then 2.7664 + # Ok, lets instead look for a build specific resource 2.7665 + eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}} 2.7666 + fi 2.7667 + if test "x$resource" = x; then 2.7668 + # Ok, lets instead look for a generic resource 2.7669 + # (The alsa comes from M4 and not the shell, thus no need for eval here.) 2.7670 + resource=${builddep_alsa} 2.7671 + fi 2.7672 + if test "x$resource" != x; then 2.7673 + { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5 2.7674 +$as_echo "$as_me: Using builddeps $resource for alsa" >&6;} 2.7675 + # If the resource in the builddeps.conf file is an existing directory, 2.7676 + # for example /java/linux/cups 2.7677 + if test -d ${resource}; then 2.7678 + depdir=${resource} 2.7679 + else 2.7680 + 2.7681 + # alsa is for example mymodule 2.7682 + # $resource is for example libs/general/libmymod_1_2_3.zip 2.7683 + # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps 2.7684 + # $with_builddeps_dir is for example /localhome/builddeps 2.7685 + # depdir is the name of the variable into which we store the depdir, eg MYMOD 2.7686 + # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and 2.7687 + # unzip into the directory: /localhome/builddeps/libmymod_1_2_3 2.7688 + filename=`basename $resource` 2.7689 + filebase=`echo $filename | sed 's/\.[^\.]*$//'` 2.7690 + filebase=${filename%%.*} 2.7691 + extension=${filename#*.} 2.7692 + installdir=$with_builddeps_dir/$filebase 2.7693 + if test ! -f $installdir/$filename.unpacked; then 2.7694 + { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5 2.7695 +$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;} 2.7696 + if test ! -d $installdir; then 2.7697 + mkdir -p $installdir 2.7698 + fi 2.7699 + if test ! -d $installdir; then 2.7700 + as_fn_error $? "Could not create directory $installdir" "$LINENO" 5 2.7701 + fi 2.7702 + tmpfile=`mktemp $installdir/alsa.XXXXXXXXX` 2.7703 + touch $tmpfile 2.7704 + if test ! -f $tmpfile; then 2.7705 + as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5 2.7706 + fi 2.7707 + 2.7708 + # $with_builddeps_server/$resource is the ftp://abuilddeps.server.com/libs/cups.zip 2.7709 + # $tmpfile is the local file name for the downloaded file. 2.7710 + VALID_TOOL=no 2.7711 + if test "x$BDEPS_FTP" = xwget; then 2.7712 + VALID_TOOL=yes 2.7713 + wget -O $tmpfile $with_builddeps_server/$resource 2.7714 + fi 2.7715 + if test "x$BDEPS_FTP" = xlftp; then 2.7716 + VALID_TOOL=yes 2.7717 + lftp -c "get $with_builddeps_server/$resource -o $tmpfile" 2.7718 + fi 2.7719 + if test "x$BDEPS_FTP" = xftp; then 2.7720 + VALID_TOOL=yes 2.7721 + FTPSERVER=`echo $with_builddeps_server/$resource | cut -f 3 -d '/'` 2.7722 + FTPPATH=`echo $with_builddeps_server/$resource | cut -f 4- -d '/'` 2.7723 + FTPUSERPWD=${FTPSERVER%%@*} 2.7724 + if test "x$FTPSERVER" != "x$FTPUSERPWD"; then 2.7725 + FTPUSER=${userpwd%%:*} 2.7726 + FTPPWD=${userpwd#*@} 2.7727 + FTPSERVER=${FTPSERVER#*@} 2.7728 + else 2.7729 + FTPUSER=ftp 2.7730 + FTPPWD=ftp 2.7731 + fi 2.7732 + # the "pass" command does not work on some 2.7733 + # ftp clients (read ftp.exe) but if it works, 2.7734 + # passive mode is better! 2.7735 + ( \ 2.7736 + echo "user $FTPUSER $FTPPWD" ; \ 2.7737 + echo "pass" ; \ 2.7738 + echo "bin" ; \ 2.7739 + echo "get $FTPPATH $tmpfile" ; \ 2.7740 + ) | ftp -in $FTPSERVER 2.7741 + fi 2.7742 + if test "x$VALID_TOOL" != xyes; then 2.7743 + as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5 2.7744 + fi 2.7745 + 2.7746 + mv $tmpfile $installdir/$filename 2.7747 + if test ! -s $installdir/$filename; then 2.7748 + as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5 2.7749 + fi 2.7750 + case "$extension" in 2.7751 + zip) echo "Unzipping $installdir/$filename..." 2.7752 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked) 2.7753 + ;; 2.7754 + tar.gz) echo "Untaring $installdir/$filename..." 2.7755 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.7756 + ;; 2.7757 + tgz) echo "Untaring $installdir/$filename..." 2.7758 + (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked) 2.7759 + ;; 2.7760 + *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5 2.7761 + ;; 2.7762 + esac 2.7763 + fi 2.7764 + if test -f $installdir/$filename.unpacked; then 2.7765 + depdir=$installdir 2.7766 + fi 2.7767 + 2.7768 + fi 2.7769 + # Source the builddeps file again, because in the previous command, the depdir 2.7770 + # was updated to point at the current build dependency install directory. 2.7771 + . $builddepsfile 2.7772 + # Now extract variables from the builddeps.conf files. 2.7773 + theroot=${builddep_alsa_ROOT} 2.7774 + thecflags=${builddep_alsa_CFLAGS} 2.7775 + thelibs=${builddep_alsa_LIBS} 2.7776 + if test "x$depdir" = x; then 2.7777 + as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5 2.7778 + fi 2.7779 + ALSA=$depdir 2.7780 + if test "x$theroot" != x; then 2.7781 + ALSA="$theroot" 2.7782 + fi 2.7783 + if test "x$thecflags" != x; then 2.7784 + ALSA_CFLAGS="$thecflags" 2.7785 + fi 2.7786 + if test "x$thelibs" != x; then 2.7787 + ALSA_LIBS="$thelibs" 2.7788 + fi 2.7789 + ALSA_FOUND=yes 2.7790 + else ALSA_FOUND=no 2.7791 + 2.7792 + fi 2.7793 + else ALSA_FOUND=no 2.7794 + 2.7795 + fi 2.7796 + 2.7797 + fi 2.7798 + if test "x$ALSA_FOUND" = xno; then 2.7799 + 2.7800 +pkg_failed=no 2.7801 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5 2.7802 +$as_echo_n "checking for ALSA... " >&6; } 2.7803 + 2.7804 +if test -n "$ALSA_CFLAGS"; then 2.7805 + pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" 2.7806 + elif test -n "$PKG_CONFIG"; then 2.7807 + if test -n "$PKG_CONFIG" && \ 2.7808 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 2.7809 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 2.7810 + ac_status=$? 2.7811 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.7812 + test $ac_status = 0; }; then 2.7813 + pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` 2.7814 +else 2.7815 + pkg_failed=yes 2.7816 +fi 2.7817 + else 2.7818 + pkg_failed=untried 2.7819 +fi 2.7820 +if test -n "$ALSA_LIBS"; then 2.7821 + pkg_cv_ALSA_LIBS="$ALSA_LIBS" 2.7822 + elif test -n "$PKG_CONFIG"; then 2.7823 + if test -n "$PKG_CONFIG" && \ 2.7824 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5 2.7825 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 2.7826 + ac_status=$? 2.7827 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.7828 + test $ac_status = 0; }; then 2.7829 + pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` 2.7830 +else 2.7831 + pkg_failed=yes 2.7832 +fi 2.7833 + else 2.7834 + pkg_failed=untried 2.7835 +fi 2.7836 + 2.7837 + 2.7838 + 2.7839 +if test $pkg_failed = yes; then 2.7840 + 2.7841 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.7842 + _pkg_short_errors_supported=yes 2.7843 +else 2.7844 + _pkg_short_errors_supported=no 2.7845 +fi 2.7846 + if test $_pkg_short_errors_supported = yes; then 2.7847 + ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1` 2.7848 + else 2.7849 + ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1` 2.7850 + fi 2.7851 + # Put the nasty error message in config.log where it belongs 2.7852 + echo "$ALSA_PKG_ERRORS" >&5 2.7853 + 2.7854 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.7855 +$as_echo "no" >&6; } 2.7856 + ALSA_FOUND=no 2.7857 +elif test $pkg_failed = untried; then 2.7858 + ALSA_FOUND=no 2.7859 +else 2.7860 + ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS 2.7861 + ALSA_LIBS=$pkg_cv_ALSA_LIBS 2.7862 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.7863 +$as_echo "yes" >&6; } 2.7864 + ALSA_FOUND=yes 2.7865 +fi 2.7866 + fi 2.7867 + if test "x$ALSA_FOUND" = xno; then 2.7868 + for ac_header in alsa/asoundlib.h 2.7869 +do : 2.7870 + ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default" 2.7871 +if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then : 2.7872 + cat >>confdefs.h <<_ACEOF 2.7873 +#define HAVE_ALSA_ASOUNDLIB_H 1 2.7874 +_ACEOF 2.7875 + 2.7876 + ALSA_FOUND=yes 2.7877 + ALSA_CFLAGS=-Iignoreme 2.7878 + ALSA_LIBS=-lasound 2.7879 + DEFAULT_ALSA=yes 2.7880 + 2.7881 +else 2.7882 + ALSA_FOUND=no 2.7883 +fi 2.7884 + 2.7885 +done 2.7886 + 2.7887 + fi 2.7888 + if test "x$ALSA_FOUND" = xno; then 2.7889 + 2.7890 + # Print a helpful message on how to acquire the necessary build dependency. 2.7891 + # alsa is the help tag: freetype, cups, pulse, alsa etc 2.7892 + MISSING_DEPENDENCY=alsa 2.7893 + 2.7894 + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 2.7895 + cygwin_help $MISSING_DEPENDENCY 2.7896 + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then 2.7897 + msys_help $MISSING_DEPENDENCY 2.7898 + else 2.7899 + PKGHANDLER_COMMAND= 2.7900 + 2.7901 + case $PKGHANDLER in 2.7902 + apt-get) 2.7903 + apt_help $MISSING_DEPENDENCY ;; 2.7904 + yum) 2.7905 + yum_help $MISSING_DEPENDENCY ;; 2.7906 + port) 2.7907 + port_help $MISSING_DEPENDENCY ;; 2.7908 + pkgutil) 2.7909 + pkgutil_help $MISSING_DEPENDENCY ;; 2.7910 + pkgadd) 2.7911 + pkgadd_help $MISSING_DEPENDENCY ;; 2.7912 + * ) 2.7913 + break ;; 2.7914 + esac 2.7915 + 2.7916 + if test "x$PKGHANDLER_COMMAND" != x; then 2.7917 + HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 2.7918 + fi 2.7919 + fi 2.7920 + 2.7921 + as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5 2.7922 + fi 2.7923 + fi 2.7924 + 2.7925 + 2.7926 + 2.7927 + 2.7928 + 2.7929 + 2.7930 + ############################################################################### 2.7931 + # 2.7932 + # Check for the jpeg library 2.7933 + # 2.7934 + 2.7935 + USE_EXTERNAL_LIBJPEG=true 2.7936 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 2.7937 +$as_echo_n "checking for main in -ljpeg... " >&6; } 2.7938 +if ${ac_cv_lib_jpeg_main+:} false; then : 2.7939 + $as_echo_n "(cached) " >&6 2.7940 +else 2.7941 + ac_check_lib_save_LIBS=$LIBS 2.7942 +LIBS="-ljpeg $LIBS" 2.7943 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.7944 +/* end confdefs.h. */ 2.7945 + 2.7946 + 2.7947 +int 2.7948 +main () 2.7949 +{ 2.7950 +return main (); 2.7951 + ; 2.7952 + return 0; 2.7953 +} 2.7954 +_ACEOF 2.7955 +if ac_fn_cxx_try_link "$LINENO"; then : 2.7956 + ac_cv_lib_jpeg_main=yes 2.7957 +else 2.7958 + ac_cv_lib_jpeg_main=no 2.7959 +fi 2.7960 +rm -f core conftest.err conftest.$ac_objext \ 2.7961 + conftest$ac_exeext conftest.$ac_ext 2.7962 +LIBS=$ac_check_lib_save_LIBS 2.7963 +fi 2.7964 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5 2.7965 +$as_echo "$ac_cv_lib_jpeg_main" >&6; } 2.7966 +if test "x$ac_cv_lib_jpeg_main" = xyes; then : 2.7967 + cat >>confdefs.h <<_ACEOF 2.7968 +#define HAVE_LIBJPEG 1 2.7969 +_ACEOF 2.7970 + 2.7971 + LIBS="-ljpeg $LIBS" 2.7972 + 2.7973 +else 2.7974 + USE_EXTERNAL_LIBJPEG=false 2.7975 + { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5 2.7976 +$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;} 2.7977 + 2.7978 +fi 2.7979 + 2.7980 + 2.7981 + 2.7982 + ############################################################################### 2.7983 + # 2.7984 + # Check for the gif library 2.7985 + # 2.7986 + 2.7987 + 2.7988 +# Check whether --with-giflib was given. 2.7989 +if test "${with_giflib+set}" = set; then : 2.7990 + withval=$with_giflib; 2.7991 +fi 2.7992 + 2.7993 + 2.7994 + 2.7995 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5 2.7996 +$as_echo_n "checking for which giflib to use... " >&6; } 2.7997 + 2.7998 + # default is bundled 2.7999 + DEFAULT_GIFLIB=bundled 2.8000 + 2.8001 + # 2.8002 + # if user didn't specify, use DEFAULT_GIFLIB 2.8003 + # 2.8004 + if test "x${with_giflib}" = "x"; then 2.8005 + with_giflib=${DEFAULT_GIFLIB} 2.8006 + fi 2.8007 + 2.8008 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5 2.8009 +$as_echo "${with_giflib}" >&6; } 2.8010 + 2.8011 + if test "x${with_giflib}" = "xbundled"; then 2.8012 + USE_EXTERNAL_LIBGIF=false 2.8013 + elif test "x${with_giflib}" = "xsystem"; then 2.8014 + ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default" 2.8015 +if test "x$ac_cv_header_gif_lib_h" = xyes; then : 2.8016 + 2.8017 +else 2.8018 + as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5 2.8019 +fi 2.8020 + 2.8021 + 2.8022 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 2.8023 +$as_echo_n "checking for DGifGetCode in -lgif... " >&6; } 2.8024 +if ${ac_cv_lib_gif_DGifGetCode+:} false; then : 2.8025 + $as_echo_n "(cached) " >&6 2.8026 +else 2.8027 + ac_check_lib_save_LIBS=$LIBS 2.8028 +LIBS="-lgif $LIBS" 2.8029 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8030 +/* end confdefs.h. */ 2.8031 + 2.8032 +/* Override any GCC internal prototype to avoid an error. 2.8033 + Use char because int might match the return type of a GCC 2.8034 + builtin and then its argument prototype would still apply. */ 2.8035 +#ifdef __cplusplus 2.8036 +extern "C" 2.8037 +#endif 2.8038 +char DGifGetCode (); 2.8039 +int 2.8040 +main () 2.8041 +{ 2.8042 +return DGifGetCode (); 2.8043 + ; 2.8044 + return 0; 2.8045 +} 2.8046 +_ACEOF 2.8047 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8048 + ac_cv_lib_gif_DGifGetCode=yes 2.8049 +else 2.8050 + ac_cv_lib_gif_DGifGetCode=no 2.8051 +fi 2.8052 +rm -f core conftest.err conftest.$ac_objext \ 2.8053 + conftest$ac_exeext conftest.$ac_ext 2.8054 +LIBS=$ac_check_lib_save_LIBS 2.8055 +fi 2.8056 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 2.8057 +$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } 2.8058 +if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then : 2.8059 + cat >>confdefs.h <<_ACEOF 2.8060 +#define HAVE_LIBGIF 1 2.8061 +_ACEOF 2.8062 + 2.8063 + LIBS="-lgif $LIBS" 2.8064 + 2.8065 +else 2.8066 + as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5 2.8067 +fi 2.8068 + 2.8069 + 2.8070 + USE_EXTERNAL_LIBGIF=true 2.8071 + else 2.8072 + as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5 2.8073 + fi 2.8074 + 2.8075 + 2.8076 + ############################################################################### 2.8077 + # 2.8078 + # Check for the zlib library 2.8079 + # 2.8080 + 2.8081 + 2.8082 +# Check whether --with-zlib was given. 2.8083 +if test "${with_zlib+set}" = set; then : 2.8084 + withval=$with_zlib; 2.8085 +fi 2.8086 + 2.8087 + 2.8088 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5 2.8089 +$as_echo_n "checking for compress in -lz... " >&6; } 2.8090 +if ${ac_cv_lib_z_compress+:} false; then : 2.8091 + $as_echo_n "(cached) " >&6 2.8092 +else 2.8093 + ac_check_lib_save_LIBS=$LIBS 2.8094 +LIBS="-lz $LIBS" 2.8095 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8096 +/* end confdefs.h. */ 2.8097 + 2.8098 +/* Override any GCC internal prototype to avoid an error. 2.8099 + Use char because int might match the return type of a GCC 2.8100 + builtin and then its argument prototype would still apply. */ 2.8101 +#ifdef __cplusplus 2.8102 +extern "C" 2.8103 +#endif 2.8104 +char compress (); 2.8105 +int 2.8106 +main () 2.8107 +{ 2.8108 +return compress (); 2.8109 + ; 2.8110 + return 0; 2.8111 +} 2.8112 +_ACEOF 2.8113 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8114 + ac_cv_lib_z_compress=yes 2.8115 +else 2.8116 + ac_cv_lib_z_compress=no 2.8117 +fi 2.8118 +rm -f core conftest.err conftest.$ac_objext \ 2.8119 + conftest$ac_exeext conftest.$ac_ext 2.8120 +LIBS=$ac_check_lib_save_LIBS 2.8121 +fi 2.8122 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5 2.8123 +$as_echo "$ac_cv_lib_z_compress" >&6; } 2.8124 +if test "x$ac_cv_lib_z_compress" = xyes; then : 2.8125 + ZLIB_FOUND=yes 2.8126 +else 2.8127 + ZLIB_FOUND=no 2.8128 +fi 2.8129 + 2.8130 + 2.8131 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5 2.8132 +$as_echo_n "checking for which zlib to use... " >&6; } 2.8133 + 2.8134 + DEFAULT_ZLIB=bundled 2.8135 + if test "x$OPENJDK_TARGET_OS" = xmacosx; then 2.8136 + # 2.8137 + # On macosx default is system...on others default is 2.8138 + # 2.8139 + DEFAULT_ZLIB=system 2.8140 + fi 2.8141 + 2.8142 + if test "x${ZLIB_FOUND}" != "xyes"; then 2.8143 + # 2.8144 + # If we don't find any system...set default to bundled 2.8145 + # 2.8146 + DEFAULT_ZLIB=bundled 2.8147 + fi 2.8148 + 2.8149 + # 2.8150 + # If user didn't specify, use DEFAULT_ZLIB 2.8151 + # 2.8152 + if test "x${with_zlib}" = "x"; then 2.8153 + with_zlib=${DEFAULT_ZLIB} 2.8154 + fi 2.8155 + 2.8156 + if test "x${with_zlib}" = "xbundled"; then 2.8157 + USE_EXTERNAL_LIBZ=false 2.8158 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5 2.8159 +$as_echo "bundled" >&6; } 2.8160 + elif test "x${with_zlib}" = "xsystem"; then 2.8161 + if test "x${ZLIB_FOUND}" = "xyes"; then 2.8162 + USE_EXTERNAL_LIBZ=true 2.8163 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5 2.8164 +$as_echo "system" >&6; } 2.8165 + else 2.8166 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5 2.8167 +$as_echo "system not found" >&6; } 2.8168 + as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5 2.8169 + fi 2.8170 + else 2.8171 + as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5 2.8172 + fi 2.8173 + 2.8174 + 2.8175 + 2.8176 + ############################################################################### 2.8177 + LIBZIP_CAN_USE_MMAP=true 2.8178 + 2.8179 + 2.8180 + 2.8181 + ############################################################################### 2.8182 + # 2.8183 + # Check if altzone exists in time.h 2.8184 + # 2.8185 + 2.8186 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8187 +/* end confdefs.h. */ 2.8188 +#include <time.h> 2.8189 +int 2.8190 +main () 2.8191 +{ 2.8192 +return (int)altzone; 2.8193 + ; 2.8194 + return 0; 2.8195 +} 2.8196 +_ACEOF 2.8197 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8198 + has_altzone=yes 2.8199 +else 2.8200 + has_altzone=no 2.8201 +fi 2.8202 +rm -f core conftest.err conftest.$ac_objext \ 2.8203 + conftest$ac_exeext conftest.$ac_ext 2.8204 + if test "x$has_altzone" = xyes; then 2.8205 + 2.8206 +$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h 2.8207 + 2.8208 + fi 2.8209 + 2.8210 + ############################################################################### 2.8211 + # 2.8212 + # Check the maths library 2.8213 + # 2.8214 + 2.8215 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 2.8216 +$as_echo_n "checking for cos in -lm... " >&6; } 2.8217 +if ${ac_cv_lib_m_cos+:} false; then : 2.8218 + $as_echo_n "(cached) " >&6 2.8219 +else 2.8220 + ac_check_lib_save_LIBS=$LIBS 2.8221 +LIBS="-lm $LIBS" 2.8222 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8223 +/* end confdefs.h. */ 2.8224 + 2.8225 +/* Override any GCC internal prototype to avoid an error. 2.8226 + Use char because int might match the return type of a GCC 2.8227 + builtin and then its argument prototype would still apply. */ 2.8228 +#ifdef __cplusplus 2.8229 +extern "C" 2.8230 +#endif 2.8231 +char cos (); 2.8232 +int 2.8233 +main () 2.8234 +{ 2.8235 +return cos (); 2.8236 + ; 2.8237 + return 0; 2.8238 +} 2.8239 +_ACEOF 2.8240 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8241 + ac_cv_lib_m_cos=yes 2.8242 +else 2.8243 + ac_cv_lib_m_cos=no 2.8244 +fi 2.8245 +rm -f core conftest.err conftest.$ac_objext \ 2.8246 + conftest$ac_exeext conftest.$ac_ext 2.8247 +LIBS=$ac_check_lib_save_LIBS 2.8248 +fi 2.8249 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 2.8250 +$as_echo "$ac_cv_lib_m_cos" >&6; } 2.8251 +if test "x$ac_cv_lib_m_cos" = xyes; then : 2.8252 + cat >>confdefs.h <<_ACEOF 2.8253 +#define HAVE_LIBM 1 2.8254 +_ACEOF 2.8255 + 2.8256 + LIBS="-lm $LIBS" 2.8257 + 2.8258 +else 2.8259 + 2.8260 + { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5 2.8261 +$as_echo "$as_me: Maths library was not found" >&6;} 2.8262 + 2.8263 + 2.8264 +fi 2.8265 + 2.8266 + 2.8267 + 2.8268 + ############################################################################### 2.8269 + # 2.8270 + # Check for libdl.so 2.8271 + 2.8272 + save_LIBS="$LIBS" 2.8273 + LIBS="" 2.8274 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 2.8275 +$as_echo_n "checking for dlopen in -ldl... " >&6; } 2.8276 +if ${ac_cv_lib_dl_dlopen+:} false; then : 2.8277 + $as_echo_n "(cached) " >&6 2.8278 +else 2.8279 + ac_check_lib_save_LIBS=$LIBS 2.8280 +LIBS="-ldl $LIBS" 2.8281 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8282 +/* end confdefs.h. */ 2.8283 + 2.8284 +/* Override any GCC internal prototype to avoid an error. 2.8285 + Use char because int might match the return type of a GCC 2.8286 + builtin and then its argument prototype would still apply. */ 2.8287 +#ifdef __cplusplus 2.8288 +extern "C" 2.8289 +#endif 2.8290 +char dlopen (); 2.8291 +int 2.8292 +main () 2.8293 +{ 2.8294 +return dlopen (); 2.8295 + ; 2.8296 + return 0; 2.8297 +} 2.8298 +_ACEOF 2.8299 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8300 + ac_cv_lib_dl_dlopen=yes 2.8301 +else 2.8302 + ac_cv_lib_dl_dlopen=no 2.8303 +fi 2.8304 +rm -f core conftest.err conftest.$ac_objext \ 2.8305 + conftest$ac_exeext conftest.$ac_ext 2.8306 +LIBS=$ac_check_lib_save_LIBS 2.8307 +fi 2.8308 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 2.8309 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } 2.8310 +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 2.8311 + cat >>confdefs.h <<_ACEOF 2.8312 +#define HAVE_LIBDL 1 2.8313 +_ACEOF 2.8314 + 2.8315 + LIBS="-ldl $LIBS" 2.8316 + 2.8317 +fi 2.8318 + 2.8319 + LIBDL="$LIBS" 2.8320 + 2.8321 + LIBS="$save_LIBS" 2.8322 + 2.8323 + 2.8324 + ############################################################################### 2.8325 + # 2.8326 + # statically link libstdc++ before C++ ABI is stablized on Linux unless 2.8327 + # dynamic build is configured on command line. 2.8328 + # 2.8329 + 2.8330 +# Check whether --with-stdc++lib was given. 2.8331 +if test "${with_stdc__lib+set}" = set; then : 2.8332 + withval=$with_stdc__lib; 2.8333 + if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ 2.8334 + && test "x$with_stdc__lib" != xdefault; then 2.8335 + as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5 2.8336 + fi 2.8337 + 2.8338 +else 2.8339 + with_stdc__lib=default 2.8340 + 2.8341 +fi 2.8342 + 2.8343 + 2.8344 + if test "x$OPENJDK_TARGET_OS" = xlinux; then 2.8345 + # Test if -lstdc++ works. 2.8346 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5 2.8347 +$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; } 2.8348 + ac_ext=cpp 2.8349 +ac_cpp='$CXXCPP $CPPFLAGS' 2.8350 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.8351 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.8352 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.8353 + 2.8354 + OLD_CXXFLAGS="$CXXFLAGS" 2.8355 + CXXFLAGS="$CXXFLAGS -lstdc++" 2.8356 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8357 +/* end confdefs.h. */ 2.8358 + 2.8359 +int 2.8360 +main () 2.8361 +{ 2.8362 +return 0; 2.8363 + ; 2.8364 + return 0; 2.8365 +} 2.8366 +_ACEOF 2.8367 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8368 + has_dynamic_libstdcxx=yes 2.8369 +else 2.8370 + has_dynamic_libstdcxx=no 2.8371 +fi 2.8372 +rm -f core conftest.err conftest.$ac_objext \ 2.8373 + conftest$ac_exeext conftest.$ac_ext 2.8374 + CXXFLAGS="$OLD_CXXFLAGS" 2.8375 + ac_ext=cpp 2.8376 +ac_cpp='$CXXCPP $CPPFLAGS' 2.8377 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.8378 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.8379 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.8380 + 2.8381 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5 2.8382 +$as_echo "$has_dynamic_libstdcxx" >&6; } 2.8383 + 2.8384 + # Test if stdc++ can be linked statically. 2.8385 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5 2.8386 +$as_echo_n "checking if static link of stdc++ is possible... " >&6; } 2.8387 + STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 2.8388 + ac_ext=cpp 2.8389 +ac_cpp='$CXXCPP $CPPFLAGS' 2.8390 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.8391 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.8392 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.8393 + 2.8394 + OLD_LIBS="$LIBS" 2.8395 + OLD_CXX="$CXX" 2.8396 + LIBS="$STATIC_STDCXX_FLAGS" 2.8397 + CXX="$CC" 2.8398 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2.8399 +/* end confdefs.h. */ 2.8400 + 2.8401 +int 2.8402 +main () 2.8403 +{ 2.8404 +return 0; 2.8405 + ; 2.8406 + return 0; 2.8407 +} 2.8408 +_ACEOF 2.8409 +if ac_fn_cxx_try_link "$LINENO"; then : 2.8410 + has_static_libstdcxx=yes 2.8411 +else 2.8412 + has_static_libstdcxx=no 2.8413 +fi 2.8414 +rm -f core conftest.err conftest.$ac_objext \ 2.8415 + conftest$ac_exeext conftest.$ac_ext 2.8416 + LIBS="$OLD_LIBS" 2.8417 + CXX="$OLD_CXX" 2.8418 + ac_ext=cpp 2.8419 +ac_cpp='$CXXCPP $CPPFLAGS' 2.8420 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2.8421 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2.8422 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 2.8423 + 2.8424 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5 2.8425 +$as_echo "$has_static_libstdcxx" >&6; } 2.8426 + 2.8427 + if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then 2.8428 + as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5 2.8429 + fi 2.8430 + 2.8431 + if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then 2.8432 + as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5 2.8433 + fi 2.8434 + 2.8435 + if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then 2.8436 + as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5 2.8437 + fi 2.8438 + 2.8439 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5 2.8440 +$as_echo_n "checking how to link with libstdc++... " >&6; } 2.8441 + # If dynamic was requested, it's available since it would fail above otherwise. 2.8442 + # If dynamic wasn't requested, go with static unless it isn't available. 2.8443 + if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.8444 + LIBCXX="$LIBCXX -lstdc++" 2.8445 + LDCXX="$CXX" 2.8446 + STATIC_CXX_SETTING="STATIC_CXX=false" 2.8447 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5 2.8448 +$as_echo "dynamic" >&6; } 2.8449 + else 2.8450 + LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 2.8451 + LDCXX="$CC" 2.8452 + STATIC_CXX_SETTING="STATIC_CXX=true" 2.8453 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5 2.8454 +$as_echo "static" >&6; } 2.8455 + fi 2.8456 + fi 2.8457 + 2.8458 + 2.8459 + if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.8460 + # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS 2.8461 + 2.8462 +pkg_failed=no 2.8463 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5 2.8464 +$as_echo_n "checking for LIBFFI... " >&6; } 2.8465 + 2.8466 +if test -n "$LIBFFI_CFLAGS"; then 2.8467 + pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" 2.8468 + elif test -n "$PKG_CONFIG"; then 2.8469 + if test -n "$PKG_CONFIG" && \ 2.8470 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 2.8471 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 2.8472 + ac_status=$? 2.8473 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.8474 + test $ac_status = 0; }; then 2.8475 + pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null` 2.8476 +else 2.8477 + pkg_failed=yes 2.8478 +fi 2.8479 + else 2.8480 + pkg_failed=untried 2.8481 +fi 2.8482 +if test -n "$LIBFFI_LIBS"; then 2.8483 + pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" 2.8484 + elif test -n "$PKG_CONFIG"; then 2.8485 + if test -n "$PKG_CONFIG" && \ 2.8486 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5 2.8487 + ($PKG_CONFIG --exists --print-errors "libffi") 2>&5 2.8488 + ac_status=$? 2.8489 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2.8490 + test $ac_status = 0; }; then 2.8491 + pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null` 2.8492 +else 2.8493 + pkg_failed=yes 2.8494 +fi 2.8495 + else 2.8496 + pkg_failed=untried 2.8497 +fi 2.8498 + 2.8499 + 2.8500 + 2.8501 +if test $pkg_failed = yes; then 2.8502 + 2.8503 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 2.8504 + _pkg_short_errors_supported=yes 2.8505 +else 2.8506 + _pkg_short_errors_supported=no 2.8507 +fi 2.8508 + if test $_pkg_short_errors_supported = yes; then 2.8509 + LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1` 2.8510 + else 2.8511 + LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1` 2.8512 + fi 2.8513 + # Put the nasty error message in config.log where it belongs 2.8514 + echo "$LIBFFI_PKG_ERRORS" >&5 2.8515 + 2.8516 + as_fn_error $? "Package requirements (libffi) were not met: 2.8517 + 2.8518 +$LIBFFI_PKG_ERRORS 2.8519 + 2.8520 +Consider adjusting the PKG_CONFIG_PATH environment variable if you 2.8521 +installed software in a non-standard prefix. 2.8522 + 2.8523 +Alternatively, you may set the environment variables LIBFFI_CFLAGS 2.8524 +and LIBFFI_LIBS to avoid the need to call pkg-config. 2.8525 +See the pkg-config man page for more details. 2.8526 +" "$LINENO" 5 2.8527 +elif test $pkg_failed = untried; then 2.8528 + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2.8529 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2.8530 +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it 2.8531 +is in your PATH or set the PKG_CONFIG environment variable to the full 2.8532 +path to pkg-config. 2.8533 + 2.8534 +Alternatively, you may set the environment variables LIBFFI_CFLAGS 2.8535 +and LIBFFI_LIBS to avoid the need to call pkg-config. 2.8536 +See the pkg-config man page for more details. 2.8537 + 2.8538 +To get pkg-config, see <http://pkg-config.freedesktop.org/>. 2.8539 +See \`config.log' for more details" "$LINENO" 5; } 2.8540 +else 2.8541 + LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS 2.8542 + LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS 2.8543 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 2.8544 +$as_echo "yes" >&6; } 2.8545 + : 2.8546 +fi 2.8547 + 2.8548 + fi 2.8549 + 2.8550 + if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 2.8551 + # Extract the first word of "llvm-config", so it can be a program name with args. 2.8552 +set dummy llvm-config; ac_word=$2 2.8553 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2.8554 +$as_echo_n "checking for $ac_word... " >&6; } 2.8555 +if ${ac_cv_prog_LLVM_CONFIG+:} false; then : 2.8556 + $as_echo_n "(cached) " >&6 2.8557 +else 2.8558 + if test -n "$LLVM_CONFIG"; then 2.8559 + ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test. 2.8560 +else 2.8561 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2.8562 +for as_dir in $PATH 2.8563 +do 2.8564 + IFS=$as_save_IFS 2.8565 + test -z "$as_dir" && as_dir=. 2.8566 + for ac_exec_ext in '' $ac_executable_extensions; do 2.8567 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 2.8568 + ac_cv_prog_LLVM_CONFIG="llvm-config" 2.8569 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 2.8570 + break 2 2.8571 + fi 2.8572 +done 2.8573 + done 2.8574 +IFS=$as_save_IFS 2.8575 + 2.8576 +fi 2.8577 +fi 2.8578 +LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG 2.8579 +if test -n "$LLVM_CONFIG"; then 2.8580 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5 2.8581 +$as_echo "$LLVM_CONFIG" >&6; } 2.8582 +else 2.8583 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 2.8584 +$as_echo "no" >&6; } 2.8585 +fi 2.8586 + 2.8587 + 2.8588 + 2.8589 + if test "x$LLVM_CONFIG" != xllvm-config; then 2.8590 + as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5 2.8591 + fi 2.8592 + 2.8593 + llvm_components="jit mcjit engine nativecodegen native" 2.8594 + unset LLVM_CFLAGS 2.8595 + for flag in $("$LLVM_CONFIG" --cxxflags); do 2.8596 + if echo "${flag}" | grep -q '^-[ID]'; then 2.8597 + if test "${flag}" != "-D_DEBUG" ; then 2.8598 + if test "${LLVM_CFLAGS}" != "" ; then 2.8599 + LLVM_CFLAGS="${LLVM_CFLAGS} " 2.8600 + fi 2.8601 + LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" 2.8602 + fi 2.8603 + fi 2.8604 + done 2.8605 + llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') 2.8606 + LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" 2.8607 + 2.8608 + unset LLVM_LDFLAGS 2.8609 + for flag in $("${LLVM_CONFIG}" --ldflags); do 2.8610 + if echo "${flag}" | grep -q '^-L'; then 2.8611 + if test "${LLVM_LDFLAGS}" != ""; then 2.8612 + LLVM_LDFLAGS="${LLVM_LDFLAGS} " 2.8613 + fi 2.8614 + LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" 2.8615 + fi 2.8616 + done 2.8617 + 2.8618 + unset LLVM_LIBS 2.8619 + for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do 2.8620 + if echo "${flag}" | grep -q '^-l'; then 2.8621 + if test "${LLVM_LIBS}" != ""; then 2.8622 + LLVM_LIBS="${LLVM_LIBS} " 2.8623 + fi 2.8624 + LLVM_LIBS="${LLVM_LIBS}${flag}" 2.8625 + fi 2.8626 + done 2.8627 + 2.8628 + 2.8629 + 2.8630 + 2.8631 + fi 2.8632 + 2.8633 + # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) 2.8634 + if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then 2.8635 + LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" 2.8636 + fi 2.8637 + 2.8638 + # TODO better (platform agnostic) test 2.8639 + if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 2.8640 + LIBCXX="-lstdc++" 2.8641 + fi 2.8642 + 2.8643 + 2.8644 + 2.8645 + 2.8646 + 2.8647 ############################################################################### 2.8648 # 2.8649 # We need to do some final tweaking, when everything else is done. 2.8650 @@ -34949,7 +37400,7 @@ 2.8651 printf "$CCACHE_HELP_MSG\n" 2.8652 2.8653 # Print a helpful message on how to acquire the necessary build dependency. 2.8654 - # ccache is the help tag: freetyp2, cups, pulse, alsa etc 2.8655 + # ccache is the help tag: freetype, cups, pulse, alsa etc 2.8656 MISSING_DEPENDENCY=ccache 2.8657 2.8658 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
3.1 --- a/common/autoconf/help.m4 Tue Oct 22 16:41:34 2013 -0700 3.2 +++ b/common/autoconf/help.m4 Wed Oct 23 13:05:58 2013 +0200 3.3 @@ -31,7 +31,7 @@ 3.4 AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY], 3.5 [ 3.6 # Print a helpful message on how to acquire the necessary build dependency. 3.7 - # $1 is the help tag: freetyp2, cups, pulse, alsa etc 3.8 + # $1 is the help tag: freetype, cups, pulse, alsa etc 3.9 MISSING_DEPENDENCY=$1 3.10 3.11 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then 3.12 @@ -76,7 +76,7 @@ 3.13 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )" 3.14 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'." 3.15 ;; 3.16 - freetype2) 3.17 + freetype) 3.18 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then 3.19 HELP_MSG="To install freetype, run: 3.20 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe 3.21 @@ -111,7 +111,7 @@ 3.22 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;; 3.23 cups) 3.24 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;; 3.25 - freetype2) 3.26 + freetype) 3.27 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;; 3.28 pulse) 3.29 PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;; 3.30 @@ -134,7 +134,7 @@ 3.31 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;; 3.32 cups) 3.33 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;; 3.34 - freetype2) 3.35 + freetype) 3.36 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;; 3.37 pulse) 3.38 PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
4.1 --- a/common/autoconf/libraries.m4 Tue Oct 22 16:41:34 2013 -0700 4.2 +++ b/common/autoconf/libraries.m4 Wed Oct 23 13:05:58 2013 +0200 4.3 @@ -57,10 +57,9 @@ 4.4 ALSA_NOT_NEEDED=yes 4.5 PULSE_NOT_NEEDED=yes 4.6 X11_NOT_NEEDED=yes 4.7 - FREETYPE2_NOT_NEEDED=yes 4.8 # If the java runtime framework is disabled, then we need X11. 4.9 # This will be adjusted below. 4.10 - AC_MSG_RESULT([alsa pulse x11 freetype]) 4.11 + AC_MSG_RESULT([alsa pulse x11]) 4.12 fi 4.13 4.14 if test "x$OPENJDK_TARGET_OS" = xbsd; then 4.15 @@ -70,7 +69,7 @@ 4.16 fi 4.17 4.18 if test "x$OPENJDK" = "xfalse"; then 4.19 - FREETYPE2_NOT_NEEDED=yes 4.20 + FREETYPE_NOT_NEEDED=yes 4.21 fi 4.22 4.23 if test "x$SUPPORT_HEADFUL" = xno; then 4.24 @@ -261,151 +260,279 @@ 4.25 4.26 ]) 4.27 4.28 +AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE], 4.29 +[ 4.30 + POTENTIAL_FREETYPE_INCLUDE_PATH="$1" 4.31 + POTENTIAL_FREETYPE_LIB_PATH="$2" 4.32 + METHOD="$3" 4.33 + 4.34 + # First check if the files exists. 4.35 + if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then 4.36 + # We found an arbitrary include file. That's a good sign. 4.37 + AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD]) 4.38 + FOUND_FREETYPE=yes 4.39 + 4.40 + FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" 4.41 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then 4.42 + AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.]) 4.43 + FOUND_FREETYPE=no 4.44 + else 4.45 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 4.46 + # On Windows, we will need both .lib and .dll file. 4.47 + if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then 4.48 + AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.]) 4.49 + FOUND_FREETYPE=no 4.50 + fi 4.51 + 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 4.52 + # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! 4.53 + POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" 4.54 + fi 4.55 + fi 4.56 + fi 4.57 + 4.58 + if test "x$FOUND_FREETYPE" = xyes; then 4.59 + BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH) 4.60 + BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH) 4.61 + 4.62 + FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" 4.63 + AC_MSG_CHECKING([for freetype includes]) 4.64 + AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH]) 4.65 + FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" 4.66 + AC_MSG_CHECKING([for freetype libraries]) 4.67 + AC_MSG_RESULT([$FREETYPE_LIB_PATH]) 4.68 + fi 4.69 +]) 4.70 + 4.71 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], 4.72 [ 4.73 4.74 ############################################################################### 4.75 # 4.76 - # The ubiquitous freetype2 library is used to render fonts. 4.77 + # The ubiquitous freetype library is used to render fonts. 4.78 # 4.79 AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], 4.80 - [specify prefix directory for the freetype2 package 4.81 + [specify prefix directory for the freetype package 4.82 (expecting the libraries under PATH/lib and the headers under PATH/include)])]) 4.83 + AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include], 4.84 + [specify directory for the freetype include files])]) 4.85 + AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib], 4.86 + [specify directory for the freetype library])]) 4.87 + AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling], 4.88 + [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])]) 4.89 4.90 - # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 4.91 - USING_SYSTEM_FT_LIB=false 4.92 + FREETYPE_CFLAGS= 4.93 + FREETYPE_LIBS= 4.94 + FREETYPE_BUNDLE_LIB_PATH= 4.95 4.96 - if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 4.97 + if test "x$FREETYPE_NOT_NEEDED" = xyes; then 4.98 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 4.99 AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) 4.100 fi 4.101 - FREETYPE2_CFLAGS= 4.102 - FREETYPE2_LIBS= 4.103 - FREETYPE2_LIB_PATH= 4.104 + if test "x$enable_freetype_bundling" != x; then 4.105 + AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored]) 4.106 + fi 4.107 else 4.108 - FREETYPE2_FOUND=no 4.109 + # freetype is needed to build; go get it! 4.110 4.111 - if test "x$with_freetype" != x; then 4.112 - BASIC_FIXUP_PATH(with_freetype) 4.113 - FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 4.114 - FREETYPE2_LIB_PATH="$with_freetype/lib" 4.115 - if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then 4.116 - FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype" 4.117 - FREETYPE2_LIB_PATH="$with_freetype/lib/amd64" 4.118 + BUNDLE_FREETYPE="$enable_freetype_bundling" 4.119 + 4.120 + if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 4.121 + # User has specified settings 4.122 + 4.123 + if test "x$BUNDLE_FREETYPE" = x; then 4.124 + # If not specified, default is to bundle freetype 4.125 + BUNDLE_FREETYPE=yes 4.126 fi 4.127 - if test "x$OPENJDK_TARGET_OS" = xwindows; then 4.128 - FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 4.129 + 4.130 + if test "x$with_freetype" != x; then 4.131 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include" 4.132 + POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib" 4.133 fi 4.134 - FREETYPE2_CFLAGS="-I$with_freetype/include" 4.135 - if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 4.136 - FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 4.137 + 4.138 + # Allow --with-freetype-lib and --with-freetype-include to override 4.139 + if test "x$with_freetype_include" != x; then 4.140 + POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include" 4.141 fi 4.142 - FREETYPE2_FOUND=yes 4.143 - if test "x$FREETYPE2_FOUND" = xyes; then 4.144 - # Verify that the directories exist 4.145 - if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 4.146 - AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include]) 4.147 + if test "x$with_freetype_lib" != x; then 4.148 + POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib" 4.149 + fi 4.150 + 4.151 + if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then 4.152 + # Okay, we got it. Check that it works. 4.153 + LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype]) 4.154 + if test "x$FOUND_FREETYPE" != xyes; then 4.155 + AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype]) 4.156 fi 4.157 - # List the contents of the lib. 4.158 - FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 4.159 - if test "x$FREETYPELIB" = x; then 4.160 - AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib]) 4.161 - fi 4.162 - # Check one h-file 4.163 - if ! test -s "$with_freetype/include/ft2build.h"; then 4.164 - AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h]) 4.165 + else 4.166 + # User specified only one of lib or include. This is an error. 4.167 + if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then 4.168 + AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include]) 4.169 + AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) 4.170 + else 4.171 + AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib]) 4.172 + AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) 4.173 fi 4.174 fi 4.175 - fi 4.176 - if test "x$FREETYPE2_FOUND" = xno; then 4.177 - BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) 4.178 - USING_SYSTEM_FT_LIB=true 4.179 - fi 4.180 - if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then 4.181 - FREETYPELOCATION="$PROGRAMFILES/GnuWin32" 4.182 - BASIC_FIXUP_PATH(FREETYPELOCATION) 4.183 - AC_MSG_CHECKING([for freetype in some standard windows locations]) 4.184 - if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then 4.185 - FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include" 4.186 - FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib" 4.187 - FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib" 4.188 - if ! test -s "$FREETYPE2_LIBS"; then 4.189 - AC_MSG_ERROR([Could not find $FREETYPE2_LIBS]) 4.190 + else 4.191 + # User did not specify settings, but we need freetype. Try to locate it. 4.192 + 4.193 + if test "x$BUNDLE_FREETYPE" = x; then 4.194 + # If not specified, default is to bundle freetype only on windows 4.195 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 4.196 + BUNDLE_FREETYPE=yes 4.197 + else 4.198 + BUNDLE_FREETYPE=no 4.199 fi 4.200 - if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then 4.201 - AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll]) 4.202 + fi 4.203 + 4.204 + if test "x$FOUND_FREETYPE" != xyes; then 4.205 + # Check builddeps 4.206 + BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) 4.207 + # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. 4.208 + if test "x$FOUND_FREETYPE" = xyes; then 4.209 + if test "x$BUNDLE_FREETYPE" = xyes; then 4.210 + AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that]) 4.211 + FOUND_FREETYPE=no 4.212 + else 4.213 + AC_MSG_CHECKING([for freetype]) 4.214 + AC_MSG_RESULT([yes (using builddeps)]) 4.215 + fi 4.216 fi 4.217 - USING_SYSTEM_FT_LIB=true 4.218 - FREETYPE2_FOUND=yes 4.219 fi 4.220 - AC_MSG_RESULT([$FREETYPE2_FOUND]) 4.221 - fi 4.222 - if test "x$FREETYPE2_FOUND" = xno; then 4.223 - PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) 4.224 - # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 4.225 - FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'` 4.226 - USING_SYSTEM_FT_LIB=true 4.227 - # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 4.228 - if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 4.229 - FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'` 4.230 + 4.231 + if test "x$FOUND_FREETYPE" != xyes; then 4.232 + # Check modules using pkg-config, but only if we have it (ugly output results otherwise) 4.233 + if test "x$PKG_CONFIG" != x; then 4.234 + PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) 4.235 + if test "x$FOUND_FREETYPE" = xyes; then 4.236 + # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. 4.237 + FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` 4.238 + # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 4.239 + if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 4.240 + FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` 4.241 + fi 4.242 + # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. 4.243 + if test "x$BUNDLE_FREETYPE" = xyes; then 4.244 + AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) 4.245 + FOUND_FREETYPE=no 4.246 + else 4.247 + AC_MSG_CHECKING([for freetype]) 4.248 + AC_MSG_RESULT([yes (using pkg-config)]) 4.249 + fi 4.250 + fi 4.251 + fi 4.252 + fi 4.253 + 4.254 + if test "x$FOUND_FREETYPE" != xyes; then 4.255 + # Check in well-known locations 4.256 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 4.257 + FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32" 4.258 + BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) 4.259 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) 4.260 + if test "x$FOUND_FREETYPE" != xyes; then 4.261 + FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" 4.262 + BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) 4.263 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) 4.264 + fi 4.265 + else 4.266 + if test "x$SYS_ROOT" = "x/"; then 4.267 + FREETYPE_ROOT= 4.268 + else 4.269 + FREETYPE_ROOT="$SYS_ROOT" 4.270 + fi 4.271 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" 4.272 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) 4.273 + 4.274 + if test "x$FOUND_FREETYPE" != xyes; then 4.275 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" 4.276 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) 4.277 + fi 4.278 + 4.279 + if test "x$FOUND_FREETYPE" != xyes; then 4.280 + FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" 4.281 + if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 4.282 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) 4.283 + else 4.284 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) 4.285 + if test "x$FOUND_FREETYPE" != xyes; then 4.286 + LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location]) 4.287 + fi 4.288 + fi 4.289 + fi 4.290 + fi 4.291 + fi # end check in well-known locations 4.292 + 4.293 + if test "x$FOUND_FREETYPE" != xyes; then 4.294 + HELP_MSG_MISSING_DEPENDENCY([freetype]) 4.295 + AC_MSG_ERROR([Could not find freetype! $HELP_MSG ]) 4.296 + fi 4.297 + fi # end user specified settings 4.298 + 4.299 + # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir. 4.300 + if test "x$FREETYPE_CFLAGS" = x; then 4.301 + BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH) 4.302 + if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then 4.303 + FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH" 4.304 + else 4.305 + FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH" 4.306 fi 4.307 fi 4.308 - if test "x$FREETYPE2_FOUND" = xno; then 4.309 - AC_MSG_CHECKING([for freetype in some standard locations]) 4.310 - 4.311 - if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then 4.312 - DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include" 4.313 - DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype" 4.314 + 4.315 + if test "x$FREETYPE_LIBS" = x; then 4.316 + BASIC_FIXUP_PATH(FREETYPE_LIB_PATH) 4.317 + if test "x$OPENJDK_TARGET_OS" = xwindows; then 4.318 + FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib" 4.319 + else 4.320 + FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype" 4.321 fi 4.322 - if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then 4.323 - DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2" 4.324 - DEFAULT_FREETYPE_LIBS="-lfreetype" 4.325 - fi 4.326 - 4.327 - PREV_CXXCFLAGS="$CXXFLAGS" 4.328 - PREV_LDFLAGS="$LDFLAGS" 4.329 - CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 4.330 - LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 4.331 - AC_LINK_IFELSE([AC_LANG_SOURCE([[ 4.332 - #include<ft2build.h> 4.333 - #include FT_FREETYPE_H 4.334 - int main() { return 0; } 4.335 - ]])], 4.336 - [ 4.337 - # Yes, the default cflags and libs did the trick. 4.338 - FREETYPE2_FOUND=yes 4.339 - FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 4.340 - FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 4.341 - ], 4.342 - [ 4.343 - FREETYPE2_FOUND=no 4.344 - ] 4.345 - ) 4.346 - CXXCFLAGS="$PREV_CXXFLAGS" 4.347 - LDFLAGS="$PREV_LDFLAGS" 4.348 - AC_MSG_RESULT([$FREETYPE2_FOUND]) 4.349 - USING_SYSTEM_FT_LIB=true 4.350 - fi 4.351 - if test "x$FREETYPE2_FOUND" = xno; then 4.352 - HELP_MSG_MISSING_DEPENDENCY([freetype2]) 4.353 - AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]) 4.354 fi 4.355 4.356 - if test "x$OPENJDK_TARGET_OS" != xwindows; then 4.357 - # AC_CHECK_LIB does not support use of cl.exe 4.358 - PREV_LDFLAGS="$LDFLAGS" 4.359 - LDFLAGS="$FREETYPE2_LIBS" 4.360 - AC_CHECK_LIB(freetype, FT_Init_FreeType, 4.361 - FREETYPE2_FOUND=true, 4.362 - AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])) 4.363 - LDFLAGS="$PREV_LDFLAGS" 4.364 + # Try to compile it 4.365 + AC_MSG_CHECKING([if we can compile and link with freetype]) 4.366 + AC_LANG_PUSH(C++) 4.367 + PREV_CXXCFLAGS="$CXXFLAGS" 4.368 + PREV_LDFLAGS="$LDFLAGS" 4.369 + PREV_CXX="$CXX" 4.370 + CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" 4.371 + LDFLAGS="$LDFLAGS $FREETYPE_LIBS" 4.372 + CXX="$FIXPATH $CXX" 4.373 + AC_LINK_IFELSE([AC_LANG_SOURCE([[ 4.374 + #include<ft2build.h> 4.375 + #include FT_FREETYPE_H 4.376 + int main () { 4.377 + FT_Init_FreeType(NULL); 4.378 + return 0; 4.379 + } 4.380 + ]])], 4.381 + [ 4.382 + AC_MSG_RESULT([yes]) 4.383 + ], 4.384 + [ 4.385 + AC_MSG_RESULT([no]) 4.386 + AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.]) 4.387 + AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS]) 4.388 + 4.389 + HELP_MSG_MISSING_DEPENDENCY([freetype]) 4.390 + 4.391 + AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG]) 4.392 + ] 4.393 + ) 4.394 + CXXCFLAGS="$PREV_CXXFLAGS" 4.395 + LDFLAGS="$PREV_LDFLAGS" 4.396 + CXX="$PREV_CXX" 4.397 + AC_LANG_POP(C++) 4.398 + 4.399 + AC_MSG_CHECKING([if we should bundle freetype]) 4.400 + if test "x$BUNDLE_FREETYPE" = xyes; then 4.401 + FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH" 4.402 fi 4.403 - fi 4.404 + AC_MSG_RESULT([$BUNDLE_FREETYPE]) 4.405 4.406 - AC_SUBST(USING_SYSTEM_FT_LIB) 4.407 - AC_SUBST(FREETYPE2_LIB_PATH) 4.408 - AC_SUBST(FREETYPE2_CFLAGS) 4.409 - AC_SUBST(FREETYPE2_LIBS) 4.410 + fi # end freetype needed 4.411 + 4.412 + AC_SUBST(FREETYPE_BUNDLE_LIB_PATH) 4.413 + AC_SUBST(FREETYPE_CFLAGS) 4.414 + AC_SUBST(FREETYPE_LIBS) 4.415 ]) 4.416 4.417 AC_DEFUN_ONCE([LIB_SETUP_ALSA],
5.1 --- a/common/autoconf/spec.gmk.in Tue Oct 22 16:41:34 2013 -0700 5.2 +++ b/common/autoconf/spec.gmk.in Wed Oct 23 13:05:58 2013 +0200 5.3 @@ -268,13 +268,9 @@ 5.4 # Number of parallel jobs to use for compilation 5.5 JOBS?=@JOBS@ 5.6 5.7 -# The OpenJDK makefiles should be changed to using the standard 5.8 -# configure output ..._CFLAGS and ..._LIBS. In the meantime we 5.9 -# extract the information here. 5.10 -FREETYPE2_LIB_PATH:=@FREETYPE2_LIB_PATH@ 5.11 -FREETYPE2_LIBS:=@FREETYPE2_LIBS@ 5.12 -FREETYPE2_CFLAGS:=@FREETYPE2_CFLAGS@ 5.13 -USING_SYSTEM_FT_LIB=@USING_SYSTEM_FT_LIB@ 5.14 +FREETYPE_LIBS:=@FREETYPE_LIBS@ 5.15 +FREETYPE_CFLAGS:=@FREETYPE_CFLAGS@ 5.16 +FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@ 5.17 CUPS_CFLAGS:=@CUPS_CFLAGS@ 5.18 ALSA_LIBS:=@ALSA_LIBS@ 5.19 ALSA_CFLAGS:=@ALSA_CFLAGS@