common/autoconf/generated-configure.sh

changeset 868
6f19b2440412
parent 864
9e177e7fc438
child 869
6ba4c7cb623e
     1.1 --- a/common/autoconf/generated-configure.sh	Tue Oct 22 16:41:34 2013 -0700
     1.2 +++ b/common/autoconf/generated-configure.sh	Wed Oct 23 13:05:58 2013 +0200
     1.3 @@ -634,7 +634,6 @@
     1.4  ENABLE_INTREE_EC
     1.5  SALIB_NAME
     1.6  HOTSPOT_MAKE_ARGS
     1.7 -FIXPATH
     1.8  LIBCXX
     1.9  LLVM_LIBS
    1.10  LLVM_LDFLAGS
    1.11 @@ -651,10 +650,9 @@
    1.12  USE_EXTERNAL_LIBJPEG
    1.13  ALSA_LIBS
    1.14  ALSA_CFLAGS
    1.15 -FREETYPE2_LIB_PATH
    1.16 -USING_SYSTEM_FT_LIB
    1.17 -FREETYPE2_LIBS
    1.18 -FREETYPE2_CFLAGS
    1.19 +FREETYPE_BUNDLE_LIB_PATH
    1.20 +FREETYPE_LIBS
    1.21 +FREETYPE_CFLAGS
    1.22  CUPS_CFLAGS
    1.23  OPENWIN_HOME
    1.24  X_EXTRA_LIBS
    1.25 @@ -662,6 +660,7 @@
    1.26  X_PRE_LIBS
    1.27  X_CFLAGS
    1.28  XMKMF
    1.29 +FIXPATH
    1.30  CXXFLAGS_DEBUG_SYMBOLS
    1.31  CFLAGS_DEBUG_SYMBOLS
    1.32  ZIP_DEBUGINFO_FILES
    1.33 @@ -824,8 +823,8 @@
    1.34  OS_VERSION_MAJOR
    1.35  PKG_CONFIG
    1.36  CODESIGN
    1.37 +XATTR
    1.38  DSYMUTIL
    1.39 -XATTR
    1.40  IS_GNU_TIME
    1.41  TIME
    1.42  STAT
    1.43 @@ -1047,6 +1046,9 @@
    1.44  with_cups
    1.45  with_cups_include
    1.46  with_freetype
    1.47 +with_freetype_include
    1.48 +with_freetype_lib
    1.49 +enable_freetype_bundling
    1.50  with_alsa
    1.51  with_alsa_include
    1.52  with_alsa_lib
    1.53 @@ -1079,8 +1081,8 @@
    1.54  CPP
    1.55  CXXCPP
    1.56  XMKMF
    1.57 -FREETYPE2_CFLAGS
    1.58 -FREETYPE2_LIBS
    1.59 +FREETYPE_CFLAGS
    1.60 +FREETYPE_LIBS
    1.61  ALSA_CFLAGS
    1.62  ALSA_LIBS
    1.63  LIBFFI_CFLAGS
    1.64 @@ -1719,6 +1721,10 @@
    1.65    --enable-macosx-runtime-support
    1.66                            Deprecated. Option is kept for backwards
    1.67                            compatibility and is ignored
    1.68 +  --disable-freetype-bundling
    1.69 +                          disable bundling of the freetype library with the
    1.70 +                          build result [enabled on Windows or when using
    1.71 +                          --with-freetype, disabled otherwise]
    1.72    --enable-sjavac         use sjavac to do fast incremental compiles
    1.73                            [disabled]
    1.74    --disable-precompiled-headers
    1.75 @@ -1804,9 +1810,11 @@
    1.76    --with-cups             specify prefix directory for the cups package
    1.77                            (expecting the headers under PATH/include)
    1.78    --with-cups-include     specify directory for the cups include files
    1.79 -  --with-freetype         specify prefix directory for the freetype2 package
    1.80 +  --with-freetype         specify prefix directory for the freetype package
    1.81                            (expecting the libraries under PATH/lib and the
    1.82                            headers under PATH/include)
    1.83 +  --with-freetype-include specify directory for the freetype include files
    1.84 +  --with-freetype-lib     specify directory for the freetype library
    1.85    --with-alsa             specify prefix directory for the alsa package
    1.86                            (expecting the libraries under PATH/lib and the
    1.87                            headers under PATH/include)
    1.88 @@ -1847,10 +1855,10 @@
    1.89    CPP         C preprocessor
    1.90    CXXCPP      C++ preprocessor
    1.91    XMKMF       Path to xmkmf, Makefile generator for X Window System
    1.92 -  FREETYPE2_CFLAGS
    1.93 -              C compiler flags for FREETYPE2, overriding pkg-config
    1.94 -  FREETYPE2_LIBS
    1.95 -              linker flags for FREETYPE2, overriding pkg-config
    1.96 +  FREETYPE_CFLAGS
    1.97 +              C compiler flags for FREETYPE, overriding pkg-config
    1.98 +  FREETYPE_LIBS
    1.99 +              linker flags for FREETYPE, overriding pkg-config
   1.100    ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
   1.101    ALSA_LIBS   linker flags for ALSA, overriding pkg-config
   1.102    LIBFFI_CFLAGS
   1.103 @@ -3460,7 +3468,7 @@
   1.104        PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
   1.105        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
   1.106        ;;
   1.107 -    freetype2)
   1.108 +    freetype)
   1.109        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
   1.110          HELP_MSG="To install freetype, run:
   1.111  wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
   1.112 @@ -3495,7 +3503,7 @@
   1.113        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
   1.114      cups)
   1.115        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
   1.116 -    freetype2)
   1.117 +    freetype)
   1.118        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
   1.119      pulse)
   1.120        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
   1.121 @@ -3518,7 +3526,7 @@
   1.122        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
   1.123      cups)
   1.124        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
   1.125 -    freetype2)
   1.126 +    freetype)
   1.127        PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
   1.128      pulse)
   1.129        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
   1.130 @@ -3646,6 +3654,8 @@
   1.131  
   1.132  
   1.133  
   1.134 +
   1.135 +
   1.136  #
   1.137  # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
   1.138  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   1.139 @@ -3854,7 +3864,7 @@
   1.140  #CUSTOM_AUTOCONF_INCLUDE
   1.141  
   1.142  # Do not change or remove the following line, it is needed for consistency checks:
   1.143 -DATE_WHEN_GENERATED=1382437436
   1.144 +DATE_WHEN_GENERATED=1382526194
   1.145  
   1.146  ###############################################################################
   1.147  #
   1.148 @@ -10514,6 +10524,65 @@
   1.149  
   1.150    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
   1.151  
   1.152 +  for ac_prog in dsymutil
   1.153 +do
   1.154 +  # Extract the first word of "$ac_prog", so it can be a program name with args.
   1.155 +set dummy $ac_prog; ac_word=$2
   1.156 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.157 +$as_echo_n "checking for $ac_word... " >&6; }
   1.158 +if ${ac_cv_path_DSYMUTIL+:} false; then :
   1.159 +  $as_echo_n "(cached) " >&6
   1.160 +else
   1.161 +  case $DSYMUTIL in
   1.162 +  [\\/]* | ?:[\\/]*)
   1.163 +  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
   1.164 +  ;;
   1.165 +  *)
   1.166 +  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.167 +for as_dir in $PATH
   1.168 +do
   1.169 +  IFS=$as_save_IFS
   1.170 +  test -z "$as_dir" && as_dir=.
   1.171 +    for ac_exec_ext in '' $ac_executable_extensions; do
   1.172 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.173 +    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
   1.174 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.175 +    break 2
   1.176 +  fi
   1.177 +done
   1.178 +  done
   1.179 +IFS=$as_save_IFS
   1.180 +
   1.181 +  ;;
   1.182 +esac
   1.183 +fi
   1.184 +DSYMUTIL=$ac_cv_path_DSYMUTIL
   1.185 +if test -n "$DSYMUTIL"; then
   1.186 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
   1.187 +$as_echo "$DSYMUTIL" >&6; }
   1.188 +else
   1.189 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.190 +$as_echo "no" >&6; }
   1.191 +fi
   1.192 +
   1.193 +
   1.194 +  test -n "$DSYMUTIL" && break
   1.195 +done
   1.196 +
   1.197 +
   1.198 +  if test "x$DSYMUTIL" = x; then
   1.199 +    if test "xdsymutil" = x; then
   1.200 +      PROG_NAME=dsymutil
   1.201 +    else
   1.202 +      PROG_NAME=dsymutil
   1.203 +    fi
   1.204 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
   1.205 +$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
   1.206 +    as_fn_error $? "Cannot continue" "$LINENO" 5
   1.207 +  fi
   1.208 +
   1.209 +
   1.210 +
   1.211    for ac_prog in xattr
   1.212  do
   1.213    # Extract the first word of "$ac_prog", so it can be a program name with args.
   1.214 @@ -10628,64 +10697,6 @@
   1.215  $as_echo "yes" >&6; }
   1.216        fi
   1.217      fi
   1.218 -
   1.219 -
   1.220 -    for ac_prog in dsymutil
   1.221 -do
   1.222 -  # Extract the first word of "$ac_prog", so it can be a program name with args.
   1.223 -set dummy $ac_prog; ac_word=$2
   1.224 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
   1.225 -$as_echo_n "checking for $ac_word... " >&6; }
   1.226 -if ${ac_cv_path_DSYMUTIL+:} false; then :
   1.227 -  $as_echo_n "(cached) " >&6
   1.228 -else
   1.229 -  case $DSYMUTIL in
   1.230 -  [\\/]* | ?:[\\/]*)
   1.231 -  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
   1.232 -  ;;
   1.233 -  *)
   1.234 -  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
   1.235 -for as_dir in $PATH
   1.236 -do
   1.237 -  IFS=$as_save_IFS
   1.238 -  test -z "$as_dir" && as_dir=.
   1.239 -    for ac_exec_ext in '' $ac_executable_extensions; do
   1.240 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
   1.241 -    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
   1.242 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
   1.243 -    break 2
   1.244 -  fi
   1.245 -done
   1.246 -  done
   1.247 -IFS=$as_save_IFS
   1.248 -
   1.249 -  ;;
   1.250 -esac
   1.251 -fi
   1.252 -DSYMUTIL=$ac_cv_path_DSYMUTIL
   1.253 -if test -n "$DSYMUTIL"; then
   1.254 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
   1.255 -$as_echo "$DSYMUTIL" >&6; }
   1.256 -else
   1.257 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.258 -$as_echo "no" >&6; }
   1.259 -fi
   1.260 -
   1.261 -
   1.262 -  test -n "$DSYMUTIL" && break
   1.263 -done
   1.264 -
   1.265 -
   1.266 -    if test "x$DSYMUTIL" = x; then
   1.267 -        if test "xdsymutil" = x; then
   1.268 -          PROG_NAME=dsymutil
   1.269 -        else
   1.270 -          PROG_NAME=dsymutil
   1.271 -        fi
   1.272 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
   1.273 -$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
   1.274 -        as_fn_error $? "Cannot continue" "$LINENO" 5
   1.275 -    fi
   1.276    fi
   1.277  
   1.278  
   1.279 @@ -15811,7 +15822,7 @@
   1.280    if test "x$BOOT_JDK_FOUND" = xno; then
   1.281  
   1.282    # Print a helpful message on how to acquire the necessary build dependency.
   1.283 -  # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
   1.284 +  # openjdk is the help tag: freetype, cups, pulse, alsa etc
   1.285    MISSING_DEPENDENCY=openjdk
   1.286  
   1.287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   1.288 @@ -19215,7 +19226,7 @@
   1.289    if test "x$CC" = x; then
   1.290  
   1.291    # Print a helpful message on how to acquire the necessary build dependency.
   1.292 -  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
   1.293 +  # devkit is the help tag: freetype, cups, pulse, alsa etc
   1.294    MISSING_DEPENDENCY=devkit
   1.295  
   1.296    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   1.297 @@ -20794,7 +20805,7 @@
   1.298    if test "x$CXX" = x; then
   1.299  
   1.300    # Print a helpful message on how to acquire the necessary build dependency.
   1.301 -  # devkit is the help tag: freetyp2, cups, pulse, alsa etc
   1.302 +  # devkit is the help tag: freetype, cups, pulse, alsa etc
   1.303    MISSING_DEPENDENCY=devkit
   1.304  
   1.305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
   1.306 @@ -29941,2951 +29952,7 @@
   1.307  #
   1.308  ###############################################################################
   1.309  
   1.310 -
   1.311 -
   1.312 -  ###############################################################################
   1.313 -  #
   1.314 -  # OS specific settings that we never will need to probe.
   1.315 -  #
   1.316 -  if test "x$OPENJDK_TARGET_OS" = xlinux; then
   1.317 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
   1.318 -$as_echo_n "checking what is not needed on Linux?... " >&6; }
   1.319 -    PULSE_NOT_NEEDED=yes
   1.320 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
   1.321 -$as_echo "pulse" >&6; }
   1.322 -  fi
   1.323 -
   1.324 -  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.325 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
   1.326 -$as_echo_n "checking what is not needed on Solaris?... " >&6; }
   1.327 -    ALSA_NOT_NEEDED=yes
   1.328 -    PULSE_NOT_NEEDED=yes
   1.329 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
   1.330 -$as_echo "alsa pulse" >&6; }
   1.331 -  fi
   1.332 -
   1.333 -  if test "x$OPENJDK_TARGET_OS" = xwindows; then
   1.334 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
   1.335 -$as_echo_n "checking what is not needed on Windows?... " >&6; }
   1.336 -    CUPS_NOT_NEEDED=yes
   1.337 -    ALSA_NOT_NEEDED=yes
   1.338 -    PULSE_NOT_NEEDED=yes
   1.339 -    X11_NOT_NEEDED=yes
   1.340 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
   1.341 -$as_echo "alsa cups pulse x11" >&6; }
   1.342 -  fi
   1.343 -
   1.344 -  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.345 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
   1.346 -$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
   1.347 -    ALSA_NOT_NEEDED=yes
   1.348 -    PULSE_NOT_NEEDED=yes
   1.349 -    X11_NOT_NEEDED=yes
   1.350 -    FREETYPE2_NOT_NEEDED=yes
   1.351 -    # If the java runtime framework is disabled, then we need X11.
   1.352 -    # This will be adjusted below.
   1.353 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11 freetype" >&5
   1.354 -$as_echo "alsa pulse x11 freetype" >&6; }
   1.355 -  fi
   1.356 -
   1.357 -  if test "x$OPENJDK_TARGET_OS" = xbsd; then
   1.358 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
   1.359 -$as_echo_n "checking what is not needed on bsd?... " >&6; }
   1.360 -    ALSA_NOT_NEEDED=yes
   1.361 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
   1.362 -$as_echo "alsa" >&6; }
   1.363 -  fi
   1.364 -
   1.365 -  if test "x$OPENJDK" = "xfalse"; then
   1.366 -    FREETYPE2_NOT_NEEDED=yes
   1.367 -  fi
   1.368 -
   1.369 -  if test "x$SUPPORT_HEADFUL" = xno; then
   1.370 -    X11_NOT_NEEDED=yes
   1.371 -  fi
   1.372 -
   1.373 -  ###############################################################################
   1.374 -  #
   1.375 -  # Check for MacOSX support for OpenJDK.
   1.376 -  #
   1.377 -
   1.378 -
   1.379 -  # Check whether --enable-macosx-runtime-support was given.
   1.380 -if test "${enable_macosx_runtime_support+set}" = set; then :
   1.381 -  enableval=$enable_macosx_runtime_support;
   1.382 -fi
   1.383 -
   1.384 -  if test "x$enable_macosx_runtime_support" != x; then
   1.385 -    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
   1.386 -$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
   1.387 -  fi
   1.388 -
   1.389 -
   1.390 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
   1.391 -$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
   1.392 -  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
   1.393 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
   1.394 -$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
   1.395 -  else
   1.396 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.397 -$as_echo "no" >&6; }
   1.398 -  fi
   1.399 -
   1.400 -
   1.401 -
   1.402 -  ###############################################################################
   1.403 -  #
   1.404 -  # Check for X Windows
   1.405 -  #
   1.406 -
   1.407 -  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
   1.408 -  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
   1.409 -  # --x-libraries for the sysroot, if that seems to be correct.
   1.410 -  if test "x$SYS_ROOT" != "x/"; then
   1.411 -    if test "x$x_includes" = xNONE; then
   1.412 -      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
   1.413 -        x_includes="$SYS_ROOT/usr/X11R6/include"
   1.414 -      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
   1.415 -        x_includes="$SYS_ROOT/usr/include"
   1.416 -      fi
   1.417 -    fi
   1.418 -    if test "x$x_libraries" = xNONE; then
   1.419 -      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
   1.420 -        x_libraries="$SYS_ROOT/usr/X11R6/lib"
   1.421 -      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
   1.422 -        x_libraries="$SYS_ROOT/usr/lib64"
   1.423 -      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
   1.424 -        x_libraries="$SYS_ROOT/usr/lib"
   1.425 -      fi
   1.426 -    fi
   1.427 -  fi
   1.428 -
   1.429 -  # Now let autoconf do it's magic
   1.430 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
   1.431 -$as_echo_n "checking for X... " >&6; }
   1.432 -
   1.433 -
   1.434 -# Check whether --with-x was given.
   1.435 -if test "${with_x+set}" = set; then :
   1.436 -  withval=$with_x;
   1.437 -fi
   1.438 -
   1.439 -# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
   1.440 -if test "x$with_x" = xno; then
   1.441 -  # The user explicitly disabled X.
   1.442 -  have_x=disabled
   1.443 -else
   1.444 -  case $x_includes,$x_libraries in #(
   1.445 -    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
   1.446 -    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
   1.447 -  $as_echo_n "(cached) " >&6
   1.448 -else
   1.449 -  # One or both of the vars are not set, and there is no cached value.
   1.450 -ac_x_includes=no ac_x_libraries=no
   1.451 -rm -f -r conftest.dir
   1.452 -if mkdir conftest.dir; then
   1.453 -  cd conftest.dir
   1.454 -  cat >Imakefile <<'_ACEOF'
   1.455 -incroot:
   1.456 -	@echo incroot='${INCROOT}'
   1.457 -usrlibdir:
   1.458 -	@echo usrlibdir='${USRLIBDIR}'
   1.459 -libdir:
   1.460 -	@echo libdir='${LIBDIR}'
   1.461 -_ACEOF
   1.462 -  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
   1.463 -    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
   1.464 -    for ac_var in incroot usrlibdir libdir; do
   1.465 -      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
   1.466 -    done
   1.467 -    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
   1.468 -    for ac_extension in a so sl dylib la dll; do
   1.469 -      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
   1.470 -	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
   1.471 -	ac_im_usrlibdir=$ac_im_libdir; break
   1.472 -      fi
   1.473 -    done
   1.474 -    # Screen out bogus values from the imake configuration.  They are
   1.475 -    # bogus both because they are the default anyway, and because
   1.476 -    # using them would break gcc on systems where it needs fixed includes.
   1.477 -    case $ac_im_incroot in
   1.478 -	/usr/include) ac_x_includes= ;;
   1.479 -	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
   1.480 -    esac
   1.481 -    case $ac_im_usrlibdir in
   1.482 -	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
   1.483 -	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
   1.484 -    esac
   1.485 -  fi
   1.486 -  cd ..
   1.487 -  rm -f -r conftest.dir
   1.488 -fi
   1.489 -
   1.490 -# Standard set of common directories for X headers.
   1.491 -# Check X11 before X11Rn because it is often a symlink to the current release.
   1.492 -ac_x_header_dirs='
   1.493 -/usr/X11/include
   1.494 -/usr/X11R7/include
   1.495 -/usr/X11R6/include
   1.496 -/usr/X11R5/include
   1.497 -/usr/X11R4/include
   1.498 -
   1.499 -/usr/include/X11
   1.500 -/usr/include/X11R7
   1.501 -/usr/include/X11R6
   1.502 -/usr/include/X11R5
   1.503 -/usr/include/X11R4
   1.504 -
   1.505 -/usr/local/X11/include
   1.506 -/usr/local/X11R7/include
   1.507 -/usr/local/X11R6/include
   1.508 -/usr/local/X11R5/include
   1.509 -/usr/local/X11R4/include
   1.510 -
   1.511 -/usr/local/include/X11
   1.512 -/usr/local/include/X11R7
   1.513 -/usr/local/include/X11R6
   1.514 -/usr/local/include/X11R5
   1.515 -/usr/local/include/X11R4
   1.516 -
   1.517 -/usr/X386/include
   1.518 -/usr/x386/include
   1.519 -/usr/XFree86/include/X11
   1.520 -
   1.521 -/usr/include
   1.522 -/usr/local/include
   1.523 -/usr/unsupported/include
   1.524 -/usr/athena/include
   1.525 -/usr/local/x11r5/include
   1.526 -/usr/lpp/Xamples/include
   1.527 -
   1.528 -/usr/openwin/include
   1.529 -/usr/openwin/share/include'
   1.530 -
   1.531 -if test "$ac_x_includes" = no; then
   1.532 -  # Guess where to find include files, by looking for Xlib.h.
   1.533 -  # First, try using that file with no special directory specified.
   1.534 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.535 -/* end confdefs.h.  */
   1.536 -#include <X11/Xlib.h>
   1.537 -_ACEOF
   1.538 -if ac_fn_cxx_try_cpp "$LINENO"; then :
   1.539 -  # We can compile using X headers with no special include directory.
   1.540 -ac_x_includes=
   1.541 -else
   1.542 -  for ac_dir in $ac_x_header_dirs; do
   1.543 -  if test -r "$ac_dir/X11/Xlib.h"; then
   1.544 -    ac_x_includes=$ac_dir
   1.545 -    break
   1.546 -  fi
   1.547 -done
   1.548 -fi
   1.549 -rm -f conftest.err conftest.i conftest.$ac_ext
   1.550 -fi # $ac_x_includes = no
   1.551 -
   1.552 -if test "$ac_x_libraries" = no; then
   1.553 -  # Check for the libraries.
   1.554 -  # See if we find them without any special options.
   1.555 -  # Don't add to $LIBS permanently.
   1.556 -  ac_save_LIBS=$LIBS
   1.557 -  LIBS="-lX11 $LIBS"
   1.558 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.559 -/* end confdefs.h.  */
   1.560 -#include <X11/Xlib.h>
   1.561 -int
   1.562 -main ()
   1.563 -{
   1.564 -XrmInitialize ()
   1.565 -  ;
   1.566 -  return 0;
   1.567 -}
   1.568 -_ACEOF
   1.569 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.570 -  LIBS=$ac_save_LIBS
   1.571 -# We can link X programs with no special library path.
   1.572 -ac_x_libraries=
   1.573 -else
   1.574 -  LIBS=$ac_save_LIBS
   1.575 -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
   1.576 -do
   1.577 -  # Don't even attempt the hair of trying to link an X program!
   1.578 -  for ac_extension in a so sl dylib la dll; do
   1.579 -    if test -r "$ac_dir/libX11.$ac_extension"; then
   1.580 -      ac_x_libraries=$ac_dir
   1.581 -      break 2
   1.582 -    fi
   1.583 -  done
   1.584 -done
   1.585 -fi
   1.586 -rm -f core conftest.err conftest.$ac_objext \
   1.587 -    conftest$ac_exeext conftest.$ac_ext
   1.588 -fi # $ac_x_libraries = no
   1.589 -
   1.590 -case $ac_x_includes,$ac_x_libraries in #(
   1.591 -  no,* | *,no | *\'*)
   1.592 -    # Didn't find X, or a directory has "'" in its name.
   1.593 -    ac_cv_have_x="have_x=no";; #(
   1.594 -  *)
   1.595 -    # Record where we found X for the cache.
   1.596 -    ac_cv_have_x="have_x=yes\
   1.597 -	ac_x_includes='$ac_x_includes'\
   1.598 -	ac_x_libraries='$ac_x_libraries'"
   1.599 -esac
   1.600 -fi
   1.601 -;; #(
   1.602 -    *) have_x=yes;;
   1.603 -  esac
   1.604 -  eval "$ac_cv_have_x"
   1.605 -fi # $with_x != no
   1.606 -
   1.607 -if test "$have_x" != yes; then
   1.608 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
   1.609 -$as_echo "$have_x" >&6; }
   1.610 -  no_x=yes
   1.611 -else
   1.612 -  # If each of the values was on the command line, it overrides each guess.
   1.613 -  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
   1.614 -  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
   1.615 -  # Update the cache value to reflect the command line values.
   1.616 -  ac_cv_have_x="have_x=yes\
   1.617 -	ac_x_includes='$x_includes'\
   1.618 -	ac_x_libraries='$x_libraries'"
   1.619 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
   1.620 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
   1.621 -fi
   1.622 -
   1.623 -  if test "$no_x" = yes; then
   1.624 -  # Not all programs may use this symbol, but it does not hurt to define it.
   1.625 -
   1.626 -$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
   1.627 -
   1.628 -  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
   1.629 -else
   1.630 -  if test -n "$x_includes"; then
   1.631 -    X_CFLAGS="$X_CFLAGS -I$x_includes"
   1.632 -  fi
   1.633 -
   1.634 -  # It would also be nice to do this for all -L options, not just this one.
   1.635 -  if test -n "$x_libraries"; then
   1.636 -    X_LIBS="$X_LIBS -L$x_libraries"
   1.637 -    # For Solaris; some versions of Sun CC require a space after -R and
   1.638 -    # others require no space.  Words are not sufficient . . . .
   1.639 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
   1.640 -$as_echo_n "checking whether -R must be followed by a space... " >&6; }
   1.641 -    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
   1.642 -    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
   1.643 -    ac_cxx_werror_flag=yes
   1.644 -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.645 -/* end confdefs.h.  */
   1.646 -
   1.647 -int
   1.648 -main ()
   1.649 -{
   1.650 -
   1.651 -  ;
   1.652 -  return 0;
   1.653 -}
   1.654 -_ACEOF
   1.655 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.656 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
   1.657 -$as_echo "no" >&6; }
   1.658 -       X_LIBS="$X_LIBS -R$x_libraries"
   1.659 -else
   1.660 -  LIBS="$ac_xsave_LIBS -R $x_libraries"
   1.661 -       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.662 -/* end confdefs.h.  */
   1.663 -
   1.664 -int
   1.665 -main ()
   1.666 -{
   1.667 -
   1.668 -  ;
   1.669 -  return 0;
   1.670 -}
   1.671 -_ACEOF
   1.672 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.673 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
   1.674 -$as_echo "yes" >&6; }
   1.675 -	  X_LIBS="$X_LIBS -R $x_libraries"
   1.676 -else
   1.677 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
   1.678 -$as_echo "neither works" >&6; }
   1.679 -fi
   1.680 -rm -f core conftest.err conftest.$ac_objext \
   1.681 -    conftest$ac_exeext conftest.$ac_ext
   1.682 -fi
   1.683 -rm -f core conftest.err conftest.$ac_objext \
   1.684 -    conftest$ac_exeext conftest.$ac_ext
   1.685 -    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
   1.686 -    LIBS=$ac_xsave_LIBS
   1.687 -  fi
   1.688 -
   1.689 -  # Check for system-dependent libraries X programs must link with.
   1.690 -  # Do this before checking for the system-independent R6 libraries
   1.691 -  # (-lICE), since we may need -lsocket or whatever for X linking.
   1.692 -
   1.693 -  if test "$ISC" = yes; then
   1.694 -    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
   1.695 -  else
   1.696 -    # Martyn Johnson says this is needed for Ultrix, if the X
   1.697 -    # libraries were built with DECnet support.  And Karl Berry says
   1.698 -    # the Alpha needs dnet_stub (dnet does not exist).
   1.699 -    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
   1.700 -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.701 -/* end confdefs.h.  */
   1.702 -
   1.703 -/* Override any GCC internal prototype to avoid an error.
   1.704 -   Use char because int might match the return type of a GCC
   1.705 -   builtin and then its argument prototype would still apply.  */
   1.706 -#ifdef __cplusplus
   1.707 -extern "C"
   1.708 -#endif
   1.709 -char XOpenDisplay ();
   1.710 -int
   1.711 -main ()
   1.712 -{
   1.713 -return XOpenDisplay ();
   1.714 -  ;
   1.715 -  return 0;
   1.716 -}
   1.717 -_ACEOF
   1.718 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.719 -
   1.720 -else
   1.721 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
   1.722 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
   1.723 -if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
   1.724 -  $as_echo_n "(cached) " >&6
   1.725 -else
   1.726 -  ac_check_lib_save_LIBS=$LIBS
   1.727 -LIBS="-ldnet  $LIBS"
   1.728 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.729 -/* end confdefs.h.  */
   1.730 -
   1.731 -/* Override any GCC internal prototype to avoid an error.
   1.732 -   Use char because int might match the return type of a GCC
   1.733 -   builtin and then its argument prototype would still apply.  */
   1.734 -#ifdef __cplusplus
   1.735 -extern "C"
   1.736 -#endif
   1.737 -char dnet_ntoa ();
   1.738 -int
   1.739 -main ()
   1.740 -{
   1.741 -return dnet_ntoa ();
   1.742 -  ;
   1.743 -  return 0;
   1.744 -}
   1.745 -_ACEOF
   1.746 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.747 -  ac_cv_lib_dnet_dnet_ntoa=yes
   1.748 -else
   1.749 -  ac_cv_lib_dnet_dnet_ntoa=no
   1.750 -fi
   1.751 -rm -f core conftest.err conftest.$ac_objext \
   1.752 -    conftest$ac_exeext conftest.$ac_ext
   1.753 -LIBS=$ac_check_lib_save_LIBS
   1.754 -fi
   1.755 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
   1.756 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
   1.757 -if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
   1.758 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
   1.759 -fi
   1.760 -
   1.761 -    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
   1.762 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
   1.763 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
   1.764 -if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
   1.765 -  $as_echo_n "(cached) " >&6
   1.766 -else
   1.767 -  ac_check_lib_save_LIBS=$LIBS
   1.768 -LIBS="-ldnet_stub  $LIBS"
   1.769 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.770 -/* end confdefs.h.  */
   1.771 -
   1.772 -/* Override any GCC internal prototype to avoid an error.
   1.773 -   Use char because int might match the return type of a GCC
   1.774 -   builtin and then its argument prototype would still apply.  */
   1.775 -#ifdef __cplusplus
   1.776 -extern "C"
   1.777 -#endif
   1.778 -char dnet_ntoa ();
   1.779 -int
   1.780 -main ()
   1.781 -{
   1.782 -return dnet_ntoa ();
   1.783 -  ;
   1.784 -  return 0;
   1.785 -}
   1.786 -_ACEOF
   1.787 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.788 -  ac_cv_lib_dnet_stub_dnet_ntoa=yes
   1.789 -else
   1.790 -  ac_cv_lib_dnet_stub_dnet_ntoa=no
   1.791 -fi
   1.792 -rm -f core conftest.err conftest.$ac_objext \
   1.793 -    conftest$ac_exeext conftest.$ac_ext
   1.794 -LIBS=$ac_check_lib_save_LIBS
   1.795 -fi
   1.796 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
   1.797 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
   1.798 -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
   1.799 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
   1.800 -fi
   1.801 -
   1.802 -    fi
   1.803 -fi
   1.804 -rm -f core conftest.err conftest.$ac_objext \
   1.805 -    conftest$ac_exeext conftest.$ac_ext
   1.806 -    LIBS="$ac_xsave_LIBS"
   1.807 -
   1.808 -    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
   1.809 -    # to get the SysV transport functions.
   1.810 -    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
   1.811 -    # needs -lnsl.
   1.812 -    # The nsl library prevents programs from opening the X display
   1.813 -    # on Irix 5.2, according to T.E. Dickey.
   1.814 -    # The functions gethostbyname, getservbyname, and inet_addr are
   1.815 -    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
   1.816 -    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
   1.817 -if test "x$ac_cv_func_gethostbyname" = xyes; then :
   1.818 -
   1.819 -fi
   1.820 -
   1.821 -    if test $ac_cv_func_gethostbyname = no; then
   1.822 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
   1.823 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
   1.824 -if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   1.825 -  $as_echo_n "(cached) " >&6
   1.826 -else
   1.827 -  ac_check_lib_save_LIBS=$LIBS
   1.828 -LIBS="-lnsl  $LIBS"
   1.829 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.830 -/* end confdefs.h.  */
   1.831 -
   1.832 -/* Override any GCC internal prototype to avoid an error.
   1.833 -   Use char because int might match the return type of a GCC
   1.834 -   builtin and then its argument prototype would still apply.  */
   1.835 -#ifdef __cplusplus
   1.836 -extern "C"
   1.837 -#endif
   1.838 -char gethostbyname ();
   1.839 -int
   1.840 -main ()
   1.841 -{
   1.842 -return gethostbyname ();
   1.843 -  ;
   1.844 -  return 0;
   1.845 -}
   1.846 -_ACEOF
   1.847 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.848 -  ac_cv_lib_nsl_gethostbyname=yes
   1.849 -else
   1.850 -  ac_cv_lib_nsl_gethostbyname=no
   1.851 -fi
   1.852 -rm -f core conftest.err conftest.$ac_objext \
   1.853 -    conftest$ac_exeext conftest.$ac_ext
   1.854 -LIBS=$ac_check_lib_save_LIBS
   1.855 -fi
   1.856 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
   1.857 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
   1.858 -if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   1.859 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
   1.860 -fi
   1.861 -
   1.862 -      if test $ac_cv_lib_nsl_gethostbyname = no; then
   1.863 -	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
   1.864 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
   1.865 -if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
   1.866 -  $as_echo_n "(cached) " >&6
   1.867 -else
   1.868 -  ac_check_lib_save_LIBS=$LIBS
   1.869 -LIBS="-lbsd  $LIBS"
   1.870 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.871 -/* end confdefs.h.  */
   1.872 -
   1.873 -/* Override any GCC internal prototype to avoid an error.
   1.874 -   Use char because int might match the return type of a GCC
   1.875 -   builtin and then its argument prototype would still apply.  */
   1.876 -#ifdef __cplusplus
   1.877 -extern "C"
   1.878 -#endif
   1.879 -char gethostbyname ();
   1.880 -int
   1.881 -main ()
   1.882 -{
   1.883 -return gethostbyname ();
   1.884 -  ;
   1.885 -  return 0;
   1.886 -}
   1.887 -_ACEOF
   1.888 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.889 -  ac_cv_lib_bsd_gethostbyname=yes
   1.890 -else
   1.891 -  ac_cv_lib_bsd_gethostbyname=no
   1.892 -fi
   1.893 -rm -f core conftest.err conftest.$ac_objext \
   1.894 -    conftest$ac_exeext conftest.$ac_ext
   1.895 -LIBS=$ac_check_lib_save_LIBS
   1.896 -fi
   1.897 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
   1.898 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
   1.899 -if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
   1.900 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
   1.901 -fi
   1.902 -
   1.903 -      fi
   1.904 -    fi
   1.905 -
   1.906 -    # lieder@skyler.mavd.honeywell.com says without -lsocket,
   1.907 -    # socket/setsockopt and other routines are undefined under SCO ODT
   1.908 -    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
   1.909 -    # on later versions), says Simon Leinen: it contains gethostby*
   1.910 -    # variants that don't use the name server (or something).  -lsocket
   1.911 -    # must be given before -lnsl if both are needed.  We assume that
   1.912 -    # if connect needs -lnsl, so does gethostbyname.
   1.913 -    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
   1.914 -if test "x$ac_cv_func_connect" = xyes; then :
   1.915 -
   1.916 -fi
   1.917 -
   1.918 -    if test $ac_cv_func_connect = no; then
   1.919 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
   1.920 -$as_echo_n "checking for connect in -lsocket... " >&6; }
   1.921 -if ${ac_cv_lib_socket_connect+:} false; then :
   1.922 -  $as_echo_n "(cached) " >&6
   1.923 -else
   1.924 -  ac_check_lib_save_LIBS=$LIBS
   1.925 -LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
   1.926 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.927 -/* end confdefs.h.  */
   1.928 -
   1.929 -/* Override any GCC internal prototype to avoid an error.
   1.930 -   Use char because int might match the return type of a GCC
   1.931 -   builtin and then its argument prototype would still apply.  */
   1.932 -#ifdef __cplusplus
   1.933 -extern "C"
   1.934 -#endif
   1.935 -char connect ();
   1.936 -int
   1.937 -main ()
   1.938 -{
   1.939 -return connect ();
   1.940 -  ;
   1.941 -  return 0;
   1.942 -}
   1.943 -_ACEOF
   1.944 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.945 -  ac_cv_lib_socket_connect=yes
   1.946 -else
   1.947 -  ac_cv_lib_socket_connect=no
   1.948 -fi
   1.949 -rm -f core conftest.err conftest.$ac_objext \
   1.950 -    conftest$ac_exeext conftest.$ac_ext
   1.951 -LIBS=$ac_check_lib_save_LIBS
   1.952 -fi
   1.953 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
   1.954 -$as_echo "$ac_cv_lib_socket_connect" >&6; }
   1.955 -if test "x$ac_cv_lib_socket_connect" = xyes; then :
   1.956 -  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
   1.957 -fi
   1.958 -
   1.959 -    fi
   1.960 -
   1.961 -    # Guillermo Gomez says -lposix is necessary on A/UX.
   1.962 -    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
   1.963 -if test "x$ac_cv_func_remove" = xyes; then :
   1.964 -
   1.965 -fi
   1.966 -
   1.967 -    if test $ac_cv_func_remove = no; then
   1.968 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
   1.969 -$as_echo_n "checking for remove in -lposix... " >&6; }
   1.970 -if ${ac_cv_lib_posix_remove+:} false; then :
   1.971 -  $as_echo_n "(cached) " >&6
   1.972 -else
   1.973 -  ac_check_lib_save_LIBS=$LIBS
   1.974 -LIBS="-lposix  $LIBS"
   1.975 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   1.976 -/* end confdefs.h.  */
   1.977 -
   1.978 -/* Override any GCC internal prototype to avoid an error.
   1.979 -   Use char because int might match the return type of a GCC
   1.980 -   builtin and then its argument prototype would still apply.  */
   1.981 -#ifdef __cplusplus
   1.982 -extern "C"
   1.983 -#endif
   1.984 -char remove ();
   1.985 -int
   1.986 -main ()
   1.987 -{
   1.988 -return remove ();
   1.989 -  ;
   1.990 -  return 0;
   1.991 -}
   1.992 -_ACEOF
   1.993 -if ac_fn_cxx_try_link "$LINENO"; then :
   1.994 -  ac_cv_lib_posix_remove=yes
   1.995 -else
   1.996 -  ac_cv_lib_posix_remove=no
   1.997 -fi
   1.998 -rm -f core conftest.err conftest.$ac_objext \
   1.999 -    conftest$ac_exeext conftest.$ac_ext
  1.1000 -LIBS=$ac_check_lib_save_LIBS
  1.1001 -fi
  1.1002 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
  1.1003 -$as_echo "$ac_cv_lib_posix_remove" >&6; }
  1.1004 -if test "x$ac_cv_lib_posix_remove" = xyes; then :
  1.1005 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  1.1006 -fi
  1.1007 -
  1.1008 -    fi
  1.1009 -
  1.1010 -    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  1.1011 -    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
  1.1012 -if test "x$ac_cv_func_shmat" = xyes; then :
  1.1013 -
  1.1014 -fi
  1.1015 -
  1.1016 -    if test $ac_cv_func_shmat = no; then
  1.1017 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
  1.1018 -$as_echo_n "checking for shmat in -lipc... " >&6; }
  1.1019 -if ${ac_cv_lib_ipc_shmat+:} false; then :
  1.1020 -  $as_echo_n "(cached) " >&6
  1.1021 -else
  1.1022 -  ac_check_lib_save_LIBS=$LIBS
  1.1023 -LIBS="-lipc  $LIBS"
  1.1024 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.1025 -/* end confdefs.h.  */
  1.1026 -
  1.1027 -/* Override any GCC internal prototype to avoid an error.
  1.1028 -   Use char because int might match the return type of a GCC
  1.1029 -   builtin and then its argument prototype would still apply.  */
  1.1030 -#ifdef __cplusplus
  1.1031 -extern "C"
  1.1032 -#endif
  1.1033 -char shmat ();
  1.1034 -int
  1.1035 -main ()
  1.1036 -{
  1.1037 -return shmat ();
  1.1038 -  ;
  1.1039 -  return 0;
  1.1040 -}
  1.1041 -_ACEOF
  1.1042 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.1043 -  ac_cv_lib_ipc_shmat=yes
  1.1044 -else
  1.1045 -  ac_cv_lib_ipc_shmat=no
  1.1046 -fi
  1.1047 -rm -f core conftest.err conftest.$ac_objext \
  1.1048 -    conftest$ac_exeext conftest.$ac_ext
  1.1049 -LIBS=$ac_check_lib_save_LIBS
  1.1050 -fi
  1.1051 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
  1.1052 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
  1.1053 -if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
  1.1054 -  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  1.1055 -fi
  1.1056 -
  1.1057 -    fi
  1.1058 -  fi
  1.1059 -
  1.1060 -  # Check for libraries that X11R6 Xt/Xaw programs need.
  1.1061 -  ac_save_LDFLAGS=$LDFLAGS
  1.1062 -  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  1.1063 -  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  1.1064 -  # check for ICE first), but we must link in the order -lSM -lICE or
  1.1065 -  # we get undefined symbols.  So assume we have SM if we have ICE.
  1.1066 -  # These have to be linked with before -lX11, unlike the other
  1.1067 -  # libraries we check for below, so use a different variable.
  1.1068 -  # John Interrante, Karl Berry
  1.1069 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
  1.1070 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
  1.1071 -if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
  1.1072 -  $as_echo_n "(cached) " >&6
  1.1073 -else
  1.1074 -  ac_check_lib_save_LIBS=$LIBS
  1.1075 -LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  1.1076 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.1077 -/* end confdefs.h.  */
  1.1078 -
  1.1079 -/* Override any GCC internal prototype to avoid an error.
  1.1080 -   Use char because int might match the return type of a GCC
  1.1081 -   builtin and then its argument prototype would still apply.  */
  1.1082 -#ifdef __cplusplus
  1.1083 -extern "C"
  1.1084 -#endif
  1.1085 -char IceConnectionNumber ();
  1.1086 -int
  1.1087 -main ()
  1.1088 -{
  1.1089 -return IceConnectionNumber ();
  1.1090 -  ;
  1.1091 -  return 0;
  1.1092 -}
  1.1093 -_ACEOF
  1.1094 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.1095 -  ac_cv_lib_ICE_IceConnectionNumber=yes
  1.1096 -else
  1.1097 -  ac_cv_lib_ICE_IceConnectionNumber=no
  1.1098 -fi
  1.1099 -rm -f core conftest.err conftest.$ac_objext \
  1.1100 -    conftest$ac_exeext conftest.$ac_ext
  1.1101 -LIBS=$ac_check_lib_save_LIBS
  1.1102 -fi
  1.1103 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
  1.1104 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
  1.1105 -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
  1.1106 -  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  1.1107 -fi
  1.1108 -
  1.1109 -  LDFLAGS=$ac_save_LDFLAGS
  1.1110 -
  1.1111 -fi
  1.1112 -
  1.1113 -
  1.1114 -  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
  1.1115 -  # this doesn't make sense so we remove it.
  1.1116 -  if test "x$COMPILE_TYPE" = xcross; then
  1.1117 -    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
  1.1118 -  fi
  1.1119 -
  1.1120 -  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
  1.1121 -
  1.1122 -  # Print a helpful message on how to acquire the necessary build dependency.
  1.1123 -  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
  1.1124 -  MISSING_DEPENDENCY=x11
  1.1125 -
  1.1126 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1127 -    cygwin_help $MISSING_DEPENDENCY
  1.1128 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1129 -    msys_help $MISSING_DEPENDENCY
  1.1130 -  else
  1.1131 -    PKGHANDLER_COMMAND=
  1.1132 -
  1.1133 -    case $PKGHANDLER in
  1.1134 -      apt-get)
  1.1135 -        apt_help     $MISSING_DEPENDENCY ;;
  1.1136 -      yum)
  1.1137 -        yum_help     $MISSING_DEPENDENCY ;;
  1.1138 -      port)
  1.1139 -        port_help    $MISSING_DEPENDENCY ;;
  1.1140 -      pkgutil)
  1.1141 -        pkgutil_help $MISSING_DEPENDENCY ;;
  1.1142 -      pkgadd)
  1.1143 -        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.1144 -      * )
  1.1145 -        break ;;
  1.1146 -    esac
  1.1147 -
  1.1148 -    if test "x$PKGHANDLER_COMMAND" != x; then
  1.1149 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.1150 -    fi
  1.1151 -  fi
  1.1152 -
  1.1153 -    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
  1.1154 -  fi
  1.1155 -
  1.1156 -  # Some of the old makefiles require a setting of OPENWIN_HOME
  1.1157 -  # Since the X11R6 directory has disappeared on later Linuxes,
  1.1158 -  # we need to probe for it.
  1.1159 -  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1160 -    if test -d "$SYS_ROOT/usr/X11R6"; then
  1.1161 -      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
  1.1162 -    elif test -d "$SYS_ROOT/usr/include/X11"; then
  1.1163 -      OPENWIN_HOME="$SYS_ROOT/usr"
  1.1164 -    fi
  1.1165 -  fi
  1.1166 -  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1167 -    OPENWIN_HOME="/usr/openwin"
  1.1168 -  fi
  1.1169 -
  1.1170 -
  1.1171 -
  1.1172 -  #
  1.1173 -  # Weird Sol10 something check...TODO change to try compile
  1.1174 -  #
  1.1175 -  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
  1.1176 -    if test "`uname -r`" = "5.10"; then
  1.1177 -      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
  1.1178 -        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
  1.1179 -      fi
  1.1180 -    fi
  1.1181 -  fi
  1.1182 -
  1.1183 -  ac_ext=c
  1.1184 -ac_cpp='$CPP $CPPFLAGS'
  1.1185 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.1186 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.1187 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
  1.1188 -
  1.1189 -  OLD_CFLAGS="$CFLAGS"
  1.1190 -  CFLAGS="$CFLAGS $X_CFLAGS"
  1.1191 -
  1.1192 -  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
  1.1193 -  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
  1.1194 -do :
  1.1195 -  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  1.1196 -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
  1.1197 -        # include <X11/Xlib.h>
  1.1198 -        # include <X11/Xutil.h>
  1.1199 -
  1.1200 -
  1.1201 -"
  1.1202 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  1.1203 -  cat >>confdefs.h <<_ACEOF
  1.1204 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  1.1205 -_ACEOF
  1.1206 - X11_A_OK=yes
  1.1207 -else
  1.1208 -  X11_A_OK=no; break
  1.1209 -fi
  1.1210 -
  1.1211 -done
  1.1212 -
  1.1213 -
  1.1214 -  CFLAGS="$OLD_CFLAGS"
  1.1215 -  ac_ext=cpp
  1.1216 -ac_cpp='$CXXCPP $CPPFLAGS'
  1.1217 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.1218 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.1219 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.1220 -
  1.1221 -
  1.1222 -  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
  1.1223 -
  1.1224 -  # Print a helpful message on how to acquire the necessary build dependency.
  1.1225 -  # x11 is the help tag: freetyp2, cups, pulse, alsa etc
  1.1226 -  MISSING_DEPENDENCY=x11
  1.1227 -
  1.1228 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1229 -    cygwin_help $MISSING_DEPENDENCY
  1.1230 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1231 -    msys_help $MISSING_DEPENDENCY
  1.1232 -  else
  1.1233 -    PKGHANDLER_COMMAND=
  1.1234 -
  1.1235 -    case $PKGHANDLER in
  1.1236 -      apt-get)
  1.1237 -        apt_help     $MISSING_DEPENDENCY ;;
  1.1238 -      yum)
  1.1239 -        yum_help     $MISSING_DEPENDENCY ;;
  1.1240 -      port)
  1.1241 -        port_help    $MISSING_DEPENDENCY ;;
  1.1242 -      pkgutil)
  1.1243 -        pkgutil_help $MISSING_DEPENDENCY ;;
  1.1244 -      pkgadd)
  1.1245 -        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.1246 -      * )
  1.1247 -        break ;;
  1.1248 -    esac
  1.1249 -
  1.1250 -    if test "x$PKGHANDLER_COMMAND" != x; then
  1.1251 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.1252 -    fi
  1.1253 -  fi
  1.1254 -
  1.1255 -    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
  1.1256 -  fi
  1.1257 -
  1.1258 -
  1.1259 -
  1.1260 -
  1.1261 -
  1.1262 -
  1.1263 -  ###############################################################################
  1.1264 -  #
  1.1265 -  # The common unix printing system cups is used to print from java.
  1.1266 -  #
  1.1267 -
  1.1268 -# Check whether --with-cups was given.
  1.1269 -if test "${with_cups+set}" = set; then :
  1.1270 -  withval=$with_cups;
  1.1271 -fi
  1.1272 -
  1.1273 -
  1.1274 -# Check whether --with-cups-include was given.
  1.1275 -if test "${with_cups_include+set}" = set; then :
  1.1276 -  withval=$with_cups_include;
  1.1277 -fi
  1.1278 -
  1.1279 -
  1.1280 -  if test "x$CUPS_NOT_NEEDED" = xyes; then
  1.1281 -    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
  1.1282 -      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
  1.1283 -$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
  1.1284 -    fi
  1.1285 -    CUPS_CFLAGS=
  1.1286 -  else
  1.1287 -    CUPS_FOUND=no
  1.1288 -
  1.1289 -    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
  1.1290 -      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
  1.1291 -    fi
  1.1292 -
  1.1293 -    if test "x${with_cups}" != x; then
  1.1294 -      CUPS_CFLAGS="-I${with_cups}/include"
  1.1295 -      CUPS_FOUND=yes
  1.1296 -    fi
  1.1297 -    if test "x${with_cups_include}" != x; then
  1.1298 -      CUPS_CFLAGS="-I${with_cups_include}"
  1.1299 -      CUPS_FOUND=yes
  1.1300 -    fi
  1.1301 -    if test "x$CUPS_FOUND" = xno; then
  1.1302 -
  1.1303 -
  1.1304 -  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.1305 -    # Source the builddeps file again, to make sure it uses the latest variables!
  1.1306 -    . $builddepsfile
  1.1307 -    # Look for a target and build machine specific resource!
  1.1308 -    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.1309 -    if test "x$resource" = x; then
  1.1310 -      # Ok, lets instead look for a target specific resource
  1.1311 -      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
  1.1312 -    fi
  1.1313 -    if test "x$resource" = x; then
  1.1314 -      # Ok, lets instead look for a build specific resource
  1.1315 -      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
  1.1316 -    fi
  1.1317 -    if test "x$resource" = x; then
  1.1318 -      # Ok, lets instead look for a generic resource
  1.1319 -      # (The cups comes from M4 and not the shell, thus no need for eval here.)
  1.1320 -      resource=${builddep_cups}
  1.1321 -    fi
  1.1322 -    if test "x$resource" != x; then
  1.1323 -      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
  1.1324 -$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
  1.1325 -      # If the resource in the builddeps.conf file is an existing directory,
  1.1326 -      # for example /java/linux/cups
  1.1327 -      if test -d ${resource}; then
  1.1328 -        depdir=${resource}
  1.1329 -      else
  1.1330 -
  1.1331 -  # cups is for example mymodule
  1.1332 -  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.1333 -  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.1334 -  # $with_builddeps_dir is for example /localhome/builddeps
  1.1335 -  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.1336 -  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.1337 -  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.1338 -  filename=`basename $resource`
  1.1339 -  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.1340 -  filebase=${filename%%.*}
  1.1341 -  extension=${filename#*.}
  1.1342 -  installdir=$with_builddeps_dir/$filebase
  1.1343 -  if test ! -f $installdir/$filename.unpacked; then
  1.1344 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.1345 -$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.1346 -    if test ! -d $installdir; then
  1.1347 -      mkdir -p $installdir
  1.1348 -    fi
  1.1349 -    if test ! -d $installdir; then
  1.1350 -      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.1351 -    fi
  1.1352 -    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
  1.1353 -    touch $tmpfile
  1.1354 -    if test ! -f $tmpfile; then
  1.1355 -      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.1356 -    fi
  1.1357 -
  1.1358 -  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.1359 -  # $tmpfile is the local file name for the downloaded file.
  1.1360 -  VALID_TOOL=no
  1.1361 -  if test "x$BDEPS_FTP" = xwget; then
  1.1362 -    VALID_TOOL=yes
  1.1363 -    wget -O $tmpfile $with_builddeps_server/$resource
  1.1364 -  fi
  1.1365 -  if test "x$BDEPS_FTP" = xlftp; then
  1.1366 -    VALID_TOOL=yes
  1.1367 -    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.1368 -  fi
  1.1369 -  if test "x$BDEPS_FTP" = xftp; then
  1.1370 -    VALID_TOOL=yes
  1.1371 -    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.1372 -    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.1373 -    FTPUSERPWD=${FTPSERVER%%@*}
  1.1374 -    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.1375 -      FTPUSER=${userpwd%%:*}
  1.1376 -      FTPPWD=${userpwd#*@}
  1.1377 -      FTPSERVER=${FTPSERVER#*@}
  1.1378 -    else
  1.1379 -      FTPUSER=ftp
  1.1380 -      FTPPWD=ftp
  1.1381 -    fi
  1.1382 -    # the "pass" command does not work on some
  1.1383 -    # ftp clients (read ftp.exe) but if it works,
  1.1384 -    # passive mode is better!
  1.1385 -    ( \
  1.1386 -        echo "user $FTPUSER $FTPPWD"        ; \
  1.1387 -        echo "pass"                         ; \
  1.1388 -        echo "bin"                          ; \
  1.1389 -        echo "get $FTPPATH $tmpfile"              ; \
  1.1390 -    ) | ftp -in $FTPSERVER
  1.1391 -  fi
  1.1392 -  if test "x$VALID_TOOL" != xyes; then
  1.1393 -    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.1394 -  fi
  1.1395 -
  1.1396 -    mv $tmpfile $installdir/$filename
  1.1397 -    if test ! -s $installdir/$filename; then
  1.1398 -      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.1399 -    fi
  1.1400 -    case "$extension" in
  1.1401 -      zip)  echo "Unzipping $installdir/$filename..."
  1.1402 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.1403 -        ;;
  1.1404 -      tar.gz) echo "Untaring $installdir/$filename..."
  1.1405 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.1406 -        ;;
  1.1407 -      tgz) echo "Untaring $installdir/$filename..."
  1.1408 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.1409 -        ;;
  1.1410 -      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.1411 -        ;;
  1.1412 -    esac
  1.1413 -  fi
  1.1414 -  if test -f $installdir/$filename.unpacked; then
  1.1415 -    depdir=$installdir
  1.1416 -  fi
  1.1417 -
  1.1418 -      fi
  1.1419 -      # Source the builddeps file again, because in the previous command, the depdir
  1.1420 -      # was updated to point at the current build dependency install directory.
  1.1421 -      . $builddepsfile
  1.1422 -      # Now extract variables from the builddeps.conf files.
  1.1423 -      theroot=${builddep_cups_ROOT}
  1.1424 -      thecflags=${builddep_cups_CFLAGS}
  1.1425 -      thelibs=${builddep_cups_LIBS}
  1.1426 -      if test "x$depdir" = x; then
  1.1427 -        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
  1.1428 -      fi
  1.1429 -      CUPS=$depdir
  1.1430 -      if test "x$theroot" != x; then
  1.1431 -        CUPS="$theroot"
  1.1432 -      fi
  1.1433 -      if test "x$thecflags" != x; then
  1.1434 -        CUPS_CFLAGS="$thecflags"
  1.1435 -      fi
  1.1436 -      if test "x$thelibs" != x; then
  1.1437 -        CUPS_LIBS="$thelibs"
  1.1438 -      fi
  1.1439 -      CUPS_FOUND=yes
  1.1440 -
  1.1441 -    fi
  1.1442 -
  1.1443 -  fi
  1.1444 -
  1.1445 -    fi
  1.1446 -    if test "x$CUPS_FOUND" = xno; then
  1.1447 -      # Are the cups headers installed in the default /usr/include location?
  1.1448 -      for ac_header in cups/cups.h cups/ppd.h
  1.1449 -do :
  1.1450 -  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  1.1451 -ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  1.1452 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  1.1453 -  cat >>confdefs.h <<_ACEOF
  1.1454 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  1.1455 -_ACEOF
  1.1456 -
  1.1457 -            CUPS_FOUND=yes
  1.1458 -            CUPS_CFLAGS=
  1.1459 -            DEFAULT_CUPS=yes
  1.1460 -
  1.1461 -
  1.1462 -fi
  1.1463 -
  1.1464 -done
  1.1465 -
  1.1466 -    fi
  1.1467 -    if test "x$CUPS_FOUND" = xno; then
  1.1468 -      # Getting nervous now? Lets poke around for standard Solaris third-party
  1.1469 -      # package installation locations.
  1.1470 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
  1.1471 -$as_echo_n "checking for cups headers... " >&6; }
  1.1472 -      if test -s /opt/sfw/cups/include/cups/cups.h; then
  1.1473 -        # An SFW package seems to be installed!
  1.1474 -        CUPS_FOUND=yes
  1.1475 -        CUPS_CFLAGS="-I/opt/sfw/cups/include"
  1.1476 -      elif test -s /opt/csw/include/cups/cups.h; then
  1.1477 -        # A CSW package seems to be installed!
  1.1478 -        CUPS_FOUND=yes
  1.1479 -        CUPS_CFLAGS="-I/opt/csw/include"
  1.1480 -      fi
  1.1481 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
  1.1482 -$as_echo "$CUPS_FOUND" >&6; }
  1.1483 -    fi
  1.1484 -    if test "x$CUPS_FOUND" = xno; then
  1.1485 -
  1.1486 -  # Print a helpful message on how to acquire the necessary build dependency.
  1.1487 -  # cups is the help tag: freetyp2, cups, pulse, alsa etc
  1.1488 -  MISSING_DEPENDENCY=cups
  1.1489 -
  1.1490 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1491 -    cygwin_help $MISSING_DEPENDENCY
  1.1492 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1493 -    msys_help $MISSING_DEPENDENCY
  1.1494 -  else
  1.1495 -    PKGHANDLER_COMMAND=
  1.1496 -
  1.1497 -    case $PKGHANDLER in
  1.1498 -      apt-get)
  1.1499 -        apt_help     $MISSING_DEPENDENCY ;;
  1.1500 -      yum)
  1.1501 -        yum_help     $MISSING_DEPENDENCY ;;
  1.1502 -      port)
  1.1503 -        port_help    $MISSING_DEPENDENCY ;;
  1.1504 -      pkgutil)
  1.1505 -        pkgutil_help $MISSING_DEPENDENCY ;;
  1.1506 -      pkgadd)
  1.1507 -        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.1508 -      * )
  1.1509 -        break ;;
  1.1510 -    esac
  1.1511 -
  1.1512 -    if test "x$PKGHANDLER_COMMAND" != x; then
  1.1513 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.1514 -    fi
  1.1515 -  fi
  1.1516 -
  1.1517 -      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
  1.1518 -    fi
  1.1519 -  fi
  1.1520 -
  1.1521 -
  1.1522 -
  1.1523 -
  1.1524 -
  1.1525 -
  1.1526 -  ###############################################################################
  1.1527 -  #
  1.1528 -  # The ubiquitous freetype2 library is used to render fonts.
  1.1529 -  #
  1.1530 -
  1.1531 -# Check whether --with-freetype was given.
  1.1532 -if test "${with_freetype+set}" = set; then :
  1.1533 -  withval=$with_freetype;
  1.1534 -fi
  1.1535 -
  1.1536 -
  1.1537 -  # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
  1.1538 -  USING_SYSTEM_FT_LIB=false
  1.1539 -
  1.1540 -  if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
  1.1541 -    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
  1.1542 -      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
  1.1543 -$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
  1.1544 -    fi
  1.1545 -    FREETYPE2_CFLAGS=
  1.1546 -    FREETYPE2_LIBS=
  1.1547 -    FREETYPE2_LIB_PATH=
  1.1548 -  else
  1.1549 -    FREETYPE2_FOUND=no
  1.1550 -
  1.1551 -    if test "x$with_freetype" != x; then
  1.1552 -
  1.1553 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1554 -
  1.1555 -  # Input might be given as Windows format, start by converting to
  1.1556 -  # unix format.
  1.1557 -  path="$with_freetype"
  1.1558 -  new_path=`$CYGPATH -u "$path"`
  1.1559 -
  1.1560 -  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.1561 -  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.1562 -  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.1563 -  # "foo.exe" is OK but "foo" is an error.
  1.1564 -  #
  1.1565 -  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.1566 -  # It is also a way to make sure we got the proper file name for the real test later on.
  1.1567 -  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.1568 -  if test "x$test_shortpath" = x; then
  1.1569 -    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
  1.1570 -$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
  1.1571 -    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
  1.1572 -  fi
  1.1573 -
  1.1574 -  # Call helper function which possibly converts this using DOS-style short mode.
  1.1575 -  # If so, the updated path is stored in $new_path.
  1.1576 -
  1.1577 -  input_path="$new_path"
  1.1578 -  # Check if we need to convert this using DOS-style short mode. If the path
  1.1579 -  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.1580 -  # take no chances and rewrite it.
  1.1581 -  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.1582 -  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.1583 -  if test "x$has_forbidden_chars" != x; then
  1.1584 -    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.1585 -    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.1586 -    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.1587 -    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.1588 -      # Going to short mode and back again did indeed matter. Since short mode is
  1.1589 -      # case insensitive, let's make it lowercase to improve readability.
  1.1590 -      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.1591 -      # Now convert it back to Unix-stile (cygpath)
  1.1592 -      input_path=`$CYGPATH -u "$shortmode_path"`
  1.1593 -      new_path="$input_path"
  1.1594 -    fi
  1.1595 -  fi
  1.1596 -
  1.1597 -  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.1598 -  if test "x$test_cygdrive_prefix" = x; then
  1.1599 -    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.1600 -    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.1601 -      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.1602 -      # a path prefixed by /cygdrive for fixpath to work.
  1.1603 -      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.1604 -    fi
  1.1605 -  fi
  1.1606 -
  1.1607 -
  1.1608 -  if test "x$path" != "x$new_path"; then
  1.1609 -    with_freetype="$new_path"
  1.1610 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
  1.1611 -$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
  1.1612 -  fi
  1.1613 -
  1.1614 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1615 -
  1.1616 -  path="$with_freetype"
  1.1617 -  has_colon=`$ECHO $path | $GREP ^.:`
  1.1618 -  new_path="$path"
  1.1619 -  if test "x$has_colon" = x; then
  1.1620 -    # Not in mixed or Windows style, start by that.
  1.1621 -    new_path=`cmd //c echo $path`
  1.1622 -  fi
  1.1623 -
  1.1624 -
  1.1625 -  input_path="$new_path"
  1.1626 -  # Check if we need to convert this using DOS-style short mode. If the path
  1.1627 -  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.1628 -  # take no chances and rewrite it.
  1.1629 -  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.1630 -  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.1631 -  if test "x$has_forbidden_chars" != x; then
  1.1632 -    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.1633 -    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.1634 -  fi
  1.1635 -
  1.1636 -
  1.1637 -  windows_path="$new_path"
  1.1638 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1639 -    unix_path=`$CYGPATH -u "$windows_path"`
  1.1640 -    new_path="$unix_path"
  1.1641 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1642 -    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.1643 -    new_path="$unix_path"
  1.1644 -  fi
  1.1645 -
  1.1646 -  if test "x$path" != "x$new_path"; then
  1.1647 -    with_freetype="$new_path"
  1.1648 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
  1.1649 -$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
  1.1650 -  fi
  1.1651 -
  1.1652 -  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.1653 -  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.1654 -
  1.1655 -  else
  1.1656 -    # We're on a posix platform. Hooray! :)
  1.1657 -    path="$with_freetype"
  1.1658 -    has_space=`$ECHO "$path" | $GREP " "`
  1.1659 -    if test "x$has_space" != x; then
  1.1660 -      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
  1.1661 -$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
  1.1662 -      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.1663 -    fi
  1.1664 -
  1.1665 -    # Use eval to expand a potential ~
  1.1666 -    eval path="$path"
  1.1667 -    if test ! -f "$path" && test ! -d "$path"; then
  1.1668 -      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
  1.1669 -    fi
  1.1670 -
  1.1671 -    with_freetype="`cd "$path"; $THEPWDCMD -L`"
  1.1672 -  fi
  1.1673 -
  1.1674 -      FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
  1.1675 -      FREETYPE2_LIB_PATH="$with_freetype/lib"
  1.1676 -      if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
  1.1677 -        FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
  1.1678 -        FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
  1.1679 -      fi
  1.1680 -      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.1681 -        FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
  1.1682 -      fi
  1.1683 -      FREETYPE2_CFLAGS="-I$with_freetype/include"
  1.1684 -      if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
  1.1685 -        FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
  1.1686 -      fi
  1.1687 -      FREETYPE2_FOUND=yes
  1.1688 -      if test "x$FREETYPE2_FOUND" = xyes; then
  1.1689 -        # Verify that the directories exist
  1.1690 -        if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
  1.1691 -          as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
  1.1692 -        fi
  1.1693 -        # List the contents of the lib.
  1.1694 -        FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
  1.1695 -        if test "x$FREETYPELIB" = x; then
  1.1696 -          as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
  1.1697 -        fi
  1.1698 -        # Check one h-file
  1.1699 -        if ! test -s "$with_freetype/include/ft2build.h"; then
  1.1700 -          as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
  1.1701 -        fi
  1.1702 -      fi
  1.1703 -    fi
  1.1704 -    if test "x$FREETYPE2_FOUND" = xno; then
  1.1705 -
  1.1706 -
  1.1707 -  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.1708 -    # Source the builddeps file again, to make sure it uses the latest variables!
  1.1709 -    . $builddepsfile
  1.1710 -    # Look for a target and build machine specific resource!
  1.1711 -    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.1712 -    if test "x$resource" = x; then
  1.1713 -      # Ok, lets instead look for a target specific resource
  1.1714 -      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
  1.1715 -    fi
  1.1716 -    if test "x$resource" = x; then
  1.1717 -      # Ok, lets instead look for a build specific resource
  1.1718 -      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
  1.1719 -    fi
  1.1720 -    if test "x$resource" = x; then
  1.1721 -      # Ok, lets instead look for a generic resource
  1.1722 -      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
  1.1723 -      resource=${builddep_freetype2}
  1.1724 -    fi
  1.1725 -    if test "x$resource" != x; then
  1.1726 -      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
  1.1727 -$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
  1.1728 -      # If the resource in the builddeps.conf file is an existing directory,
  1.1729 -      # for example /java/linux/cups
  1.1730 -      if test -d ${resource}; then
  1.1731 -        depdir=${resource}
  1.1732 -      else
  1.1733 -
  1.1734 -  # freetype2 is for example mymodule
  1.1735 -  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.1736 -  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.1737 -  # $with_builddeps_dir is for example /localhome/builddeps
  1.1738 -  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.1739 -  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.1740 -  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.1741 -  filename=`basename $resource`
  1.1742 -  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.1743 -  filebase=${filename%%.*}
  1.1744 -  extension=${filename#*.}
  1.1745 -  installdir=$with_builddeps_dir/$filebase
  1.1746 -  if test ! -f $installdir/$filename.unpacked; then
  1.1747 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.1748 -$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.1749 -    if test ! -d $installdir; then
  1.1750 -      mkdir -p $installdir
  1.1751 -    fi
  1.1752 -    if test ! -d $installdir; then
  1.1753 -      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.1754 -    fi
  1.1755 -    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
  1.1756 -    touch $tmpfile
  1.1757 -    if test ! -f $tmpfile; then
  1.1758 -      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.1759 -    fi
  1.1760 -
  1.1761 -  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.1762 -  # $tmpfile is the local file name for the downloaded file.
  1.1763 -  VALID_TOOL=no
  1.1764 -  if test "x$BDEPS_FTP" = xwget; then
  1.1765 -    VALID_TOOL=yes
  1.1766 -    wget -O $tmpfile $with_builddeps_server/$resource
  1.1767 -  fi
  1.1768 -  if test "x$BDEPS_FTP" = xlftp; then
  1.1769 -    VALID_TOOL=yes
  1.1770 -    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.1771 -  fi
  1.1772 -  if test "x$BDEPS_FTP" = xftp; then
  1.1773 -    VALID_TOOL=yes
  1.1774 -    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.1775 -    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.1776 -    FTPUSERPWD=${FTPSERVER%%@*}
  1.1777 -    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.1778 -      FTPUSER=${userpwd%%:*}
  1.1779 -      FTPPWD=${userpwd#*@}
  1.1780 -      FTPSERVER=${FTPSERVER#*@}
  1.1781 -    else
  1.1782 -      FTPUSER=ftp
  1.1783 -      FTPPWD=ftp
  1.1784 -    fi
  1.1785 -    # the "pass" command does not work on some
  1.1786 -    # ftp clients (read ftp.exe) but if it works,
  1.1787 -    # passive mode is better!
  1.1788 -    ( \
  1.1789 -        echo "user $FTPUSER $FTPPWD"        ; \
  1.1790 -        echo "pass"                         ; \
  1.1791 -        echo "bin"                          ; \
  1.1792 -        echo "get $FTPPATH $tmpfile"              ; \
  1.1793 -    ) | ftp -in $FTPSERVER
  1.1794 -  fi
  1.1795 -  if test "x$VALID_TOOL" != xyes; then
  1.1796 -    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.1797 -  fi
  1.1798 -
  1.1799 -    mv $tmpfile $installdir/$filename
  1.1800 -    if test ! -s $installdir/$filename; then
  1.1801 -      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.1802 -    fi
  1.1803 -    case "$extension" in
  1.1804 -      zip)  echo "Unzipping $installdir/$filename..."
  1.1805 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.1806 -        ;;
  1.1807 -      tar.gz) echo "Untaring $installdir/$filename..."
  1.1808 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.1809 -        ;;
  1.1810 -      tgz) echo "Untaring $installdir/$filename..."
  1.1811 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.1812 -        ;;
  1.1813 -      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.1814 -        ;;
  1.1815 -    esac
  1.1816 -  fi
  1.1817 -  if test -f $installdir/$filename.unpacked; then
  1.1818 -    depdir=$installdir
  1.1819 -  fi
  1.1820 -
  1.1821 -      fi
  1.1822 -      # Source the builddeps file again, because in the previous command, the depdir
  1.1823 -      # was updated to point at the current build dependency install directory.
  1.1824 -      . $builddepsfile
  1.1825 -      # Now extract variables from the builddeps.conf files.
  1.1826 -      theroot=${builddep_freetype2_ROOT}
  1.1827 -      thecflags=${builddep_freetype2_CFLAGS}
  1.1828 -      thelibs=${builddep_freetype2_LIBS}
  1.1829 -      if test "x$depdir" = x; then
  1.1830 -        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
  1.1831 -      fi
  1.1832 -      FREETYPE2=$depdir
  1.1833 -      if test "x$theroot" != x; then
  1.1834 -        FREETYPE2="$theroot"
  1.1835 -      fi
  1.1836 -      if test "x$thecflags" != x; then
  1.1837 -        FREETYPE2_CFLAGS="$thecflags"
  1.1838 -      fi
  1.1839 -      if test "x$thelibs" != x; then
  1.1840 -        FREETYPE2_LIBS="$thelibs"
  1.1841 -      fi
  1.1842 -      FREETYPE2_FOUND=yes
  1.1843 -      else FREETYPE2_FOUND=no
  1.1844 -
  1.1845 -    fi
  1.1846 -    else FREETYPE2_FOUND=no
  1.1847 -
  1.1848 -  fi
  1.1849 -
  1.1850 -      USING_SYSTEM_FT_LIB=true
  1.1851 -    fi
  1.1852 -    if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.1853 -      FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
  1.1854 -
  1.1855 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1856 -
  1.1857 -  # Input might be given as Windows format, start by converting to
  1.1858 -  # unix format.
  1.1859 -  path="$FREETYPELOCATION"
  1.1860 -  new_path=`$CYGPATH -u "$path"`
  1.1861 -
  1.1862 -  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.1863 -  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.1864 -  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.1865 -  # "foo.exe" is OK but "foo" is an error.
  1.1866 -  #
  1.1867 -  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.1868 -  # It is also a way to make sure we got the proper file name for the real test later on.
  1.1869 -  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.1870 -  if test "x$test_shortpath" = x; then
  1.1871 -    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
  1.1872 -$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
  1.1873 -    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
  1.1874 -  fi
  1.1875 -
  1.1876 -  # Call helper function which possibly converts this using DOS-style short mode.
  1.1877 -  # If so, the updated path is stored in $new_path.
  1.1878 -
  1.1879 -  input_path="$new_path"
  1.1880 -  # Check if we need to convert this using DOS-style short mode. If the path
  1.1881 -  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.1882 -  # take no chances and rewrite it.
  1.1883 -  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.1884 -  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.1885 -  if test "x$has_forbidden_chars" != x; then
  1.1886 -    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.1887 -    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.1888 -    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.1889 -    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.1890 -      # Going to short mode and back again did indeed matter. Since short mode is
  1.1891 -      # case insensitive, let's make it lowercase to improve readability.
  1.1892 -      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.1893 -      # Now convert it back to Unix-stile (cygpath)
  1.1894 -      input_path=`$CYGPATH -u "$shortmode_path"`
  1.1895 -      new_path="$input_path"
  1.1896 -    fi
  1.1897 -  fi
  1.1898 -
  1.1899 -  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.1900 -  if test "x$test_cygdrive_prefix" = x; then
  1.1901 -    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.1902 -    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.1903 -      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.1904 -      # a path prefixed by /cygdrive for fixpath to work.
  1.1905 -      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.1906 -    fi
  1.1907 -  fi
  1.1908 -
  1.1909 -
  1.1910 -  if test "x$path" != "x$new_path"; then
  1.1911 -    FREETYPELOCATION="$new_path"
  1.1912 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
  1.1913 -$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
  1.1914 -  fi
  1.1915 -
  1.1916 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1917 -
  1.1918 -  path="$FREETYPELOCATION"
  1.1919 -  has_colon=`$ECHO $path | $GREP ^.:`
  1.1920 -  new_path="$path"
  1.1921 -  if test "x$has_colon" = x; then
  1.1922 -    # Not in mixed or Windows style, start by that.
  1.1923 -    new_path=`cmd //c echo $path`
  1.1924 -  fi
  1.1925 -
  1.1926 -
  1.1927 -  input_path="$new_path"
  1.1928 -  # Check if we need to convert this using DOS-style short mode. If the path
  1.1929 -  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.1930 -  # take no chances and rewrite it.
  1.1931 -  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.1932 -  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.1933 -  if test "x$has_forbidden_chars" != x; then
  1.1934 -    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.1935 -    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.1936 -  fi
  1.1937 -
  1.1938 -
  1.1939 -  windows_path="$new_path"
  1.1940 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.1941 -    unix_path=`$CYGPATH -u "$windows_path"`
  1.1942 -    new_path="$unix_path"
  1.1943 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.1944 -    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.1945 -    new_path="$unix_path"
  1.1946 -  fi
  1.1947 -
  1.1948 -  if test "x$path" != "x$new_path"; then
  1.1949 -    FREETYPELOCATION="$new_path"
  1.1950 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
  1.1951 -$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
  1.1952 -  fi
  1.1953 -
  1.1954 -  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.1955 -  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.1956 -
  1.1957 -  else
  1.1958 -    # We're on a posix platform. Hooray! :)
  1.1959 -    path="$FREETYPELOCATION"
  1.1960 -    has_space=`$ECHO "$path" | $GREP " "`
  1.1961 -    if test "x$has_space" != x; then
  1.1962 -      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
  1.1963 -$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
  1.1964 -      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.1965 -    fi
  1.1966 -
  1.1967 -    # Use eval to expand a potential ~
  1.1968 -    eval path="$path"
  1.1969 -    if test ! -f "$path" && test ! -d "$path"; then
  1.1970 -      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
  1.1971 -    fi
  1.1972 -
  1.1973 -    FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
  1.1974 -  fi
  1.1975 -
  1.1976 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
  1.1977 -$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
  1.1978 -      if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
  1.1979 -        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
  1.1980 -        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
  1.1981 -        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
  1.1982 -        if ! test -s "$FREETYPE2_LIBS"; then
  1.1983 -          as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
  1.1984 -        fi
  1.1985 -        if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
  1.1986 -          as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
  1.1987 -        fi
  1.1988 -        USING_SYSTEM_FT_LIB=true
  1.1989 -        FREETYPE2_FOUND=yes
  1.1990 -      fi
  1.1991 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
  1.1992 -$as_echo "$FREETYPE2_FOUND" >&6; }
  1.1993 -    fi
  1.1994 -    if test "x$FREETYPE2_FOUND" = xno; then
  1.1995 -
  1.1996 -pkg_failed=no
  1.1997 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
  1.1998 -$as_echo_n "checking for FREETYPE2... " >&6; }
  1.1999 -
  1.2000 -if test -n "$FREETYPE2_CFLAGS"; then
  1.2001 -    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
  1.2002 - elif test -n "$PKG_CONFIG"; then
  1.2003 -    if test -n "$PKG_CONFIG" && \
  1.2004 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  1.2005 -  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  1.2006 -  ac_status=$?
  1.2007 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.2008 -  test $ac_status = 0; }; then
  1.2009 -  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
  1.2010 -else
  1.2011 -  pkg_failed=yes
  1.2012 -fi
  1.2013 - else
  1.2014 -    pkg_failed=untried
  1.2015 -fi
  1.2016 -if test -n "$FREETYPE2_LIBS"; then
  1.2017 -    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
  1.2018 - elif test -n "$PKG_CONFIG"; then
  1.2019 -    if test -n "$PKG_CONFIG" && \
  1.2020 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  1.2021 -  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  1.2022 -  ac_status=$?
  1.2023 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.2024 -  test $ac_status = 0; }; then
  1.2025 -  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
  1.2026 -else
  1.2027 -  pkg_failed=yes
  1.2028 -fi
  1.2029 - else
  1.2030 -    pkg_failed=untried
  1.2031 -fi
  1.2032 -
  1.2033 -
  1.2034 -
  1.2035 -if test $pkg_failed = yes; then
  1.2036 -
  1.2037 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.2038 -        _pkg_short_errors_supported=yes
  1.2039 -else
  1.2040 -        _pkg_short_errors_supported=no
  1.2041 -fi
  1.2042 -        if test $_pkg_short_errors_supported = yes; then
  1.2043 -	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
  1.2044 -        else
  1.2045 -	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
  1.2046 -        fi
  1.2047 -	# Put the nasty error message in config.log where it belongs
  1.2048 -	echo "$FREETYPE2_PKG_ERRORS" >&5
  1.2049 -
  1.2050 -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.2051 -$as_echo "no" >&6; }
  1.2052 -                FREETYPE2_FOUND=no
  1.2053 -elif test $pkg_failed = untried; then
  1.2054 -	FREETYPE2_FOUND=no
  1.2055 -else
  1.2056 -	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
  1.2057 -	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
  1.2058 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.2059 -$as_echo "yes" >&6; }
  1.2060 -	FREETYPE2_FOUND=yes
  1.2061 -fi
  1.2062 -      # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
  1.2063 -      FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
  1.2064 -      USING_SYSTEM_FT_LIB=true
  1.2065 -      # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
  1.2066 -      if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
  1.2067 -        FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
  1.2068 -      fi
  1.2069 -    fi
  1.2070 -    if test "x$FREETYPE2_FOUND" = xno; then
  1.2071 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
  1.2072 -$as_echo_n "checking for freetype in some standard locations... " >&6; }
  1.2073 -
  1.2074 -      if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
  1.2075 -        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
  1.2076 -        DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
  1.2077 -      fi
  1.2078 -      if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
  1.2079 -        DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
  1.2080 -        DEFAULT_FREETYPE_LIBS="-lfreetype"
  1.2081 -      fi
  1.2082 -
  1.2083 -      PREV_CXXCFLAGS="$CXXFLAGS"
  1.2084 -      PREV_LDFLAGS="$LDFLAGS"
  1.2085 -      CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
  1.2086 -      LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
  1.2087 -      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2088 -/* end confdefs.h.  */
  1.2089 -
  1.2090 -            #include<ft2build.h>
  1.2091 -            #include FT_FREETYPE_H
  1.2092 -            int main() { return 0; }
  1.2093 -
  1.2094 -_ACEOF
  1.2095 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2096 -
  1.2097 -            # Yes, the default cflags and libs did the trick.
  1.2098 -            FREETYPE2_FOUND=yes
  1.2099 -            FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
  1.2100 -            FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
  1.2101 -
  1.2102 -else
  1.2103 -
  1.2104 -            FREETYPE2_FOUND=no
  1.2105 -
  1.2106 -
  1.2107 -fi
  1.2108 -rm -f core conftest.err conftest.$ac_objext \
  1.2109 -    conftest$ac_exeext conftest.$ac_ext
  1.2110 -      CXXCFLAGS="$PREV_CXXFLAGS"
  1.2111 -      LDFLAGS="$PREV_LDFLAGS"
  1.2112 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
  1.2113 -$as_echo "$FREETYPE2_FOUND" >&6; }
  1.2114 -      USING_SYSTEM_FT_LIB=true
  1.2115 -    fi
  1.2116 -    if test "x$FREETYPE2_FOUND" = xno; then
  1.2117 -
  1.2118 -  # Print a helpful message on how to acquire the necessary build dependency.
  1.2119 -  # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
  1.2120 -  MISSING_DEPENDENCY=freetype2
  1.2121 -
  1.2122 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.2123 -    cygwin_help $MISSING_DEPENDENCY
  1.2124 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.2125 -    msys_help $MISSING_DEPENDENCY
  1.2126 -  else
  1.2127 -    PKGHANDLER_COMMAND=
  1.2128 -
  1.2129 -    case $PKGHANDLER in
  1.2130 -      apt-get)
  1.2131 -        apt_help     $MISSING_DEPENDENCY ;;
  1.2132 -      yum)
  1.2133 -        yum_help     $MISSING_DEPENDENCY ;;
  1.2134 -      port)
  1.2135 -        port_help    $MISSING_DEPENDENCY ;;
  1.2136 -      pkgutil)
  1.2137 -        pkgutil_help $MISSING_DEPENDENCY ;;
  1.2138 -      pkgadd)
  1.2139 -        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.2140 -      * )
  1.2141 -        break ;;
  1.2142 -    esac
  1.2143 -
  1.2144 -    if test "x$PKGHANDLER_COMMAND" != x; then
  1.2145 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.2146 -    fi
  1.2147 -  fi
  1.2148 -
  1.2149 -      as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
  1.2150 -    fi
  1.2151 -
  1.2152 -    if test "x$OPENJDK_TARGET_OS" != xwindows; then
  1.2153 -      # AC_CHECK_LIB does not support use of cl.exe
  1.2154 -      PREV_LDFLAGS="$LDFLAGS"
  1.2155 -      LDFLAGS="$FREETYPE2_LIBS"
  1.2156 -      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
  1.2157 -$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
  1.2158 -if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
  1.2159 -  $as_echo_n "(cached) " >&6
  1.2160 -else
  1.2161 -  ac_check_lib_save_LIBS=$LIBS
  1.2162 -LIBS="-lfreetype  $LIBS"
  1.2163 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2164 -/* end confdefs.h.  */
  1.2165 -
  1.2166 -/* Override any GCC internal prototype to avoid an error.
  1.2167 -   Use char because int might match the return type of a GCC
  1.2168 -   builtin and then its argument prototype would still apply.  */
  1.2169 -#ifdef __cplusplus
  1.2170 -extern "C"
  1.2171 -#endif
  1.2172 -char FT_Init_FreeType ();
  1.2173 -int
  1.2174 -main ()
  1.2175 -{
  1.2176 -return FT_Init_FreeType ();
  1.2177 -  ;
  1.2178 -  return 0;
  1.2179 -}
  1.2180 -_ACEOF
  1.2181 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2182 -  ac_cv_lib_freetype_FT_Init_FreeType=yes
  1.2183 -else
  1.2184 -  ac_cv_lib_freetype_FT_Init_FreeType=no
  1.2185 -fi
  1.2186 -rm -f core conftest.err conftest.$ac_objext \
  1.2187 -    conftest$ac_exeext conftest.$ac_ext
  1.2188 -LIBS=$ac_check_lib_save_LIBS
  1.2189 -fi
  1.2190 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
  1.2191 -$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
  1.2192 -if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
  1.2193 -  FREETYPE2_FOUND=true
  1.2194 -else
  1.2195 -  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
  1.2196 -fi
  1.2197 -
  1.2198 -      LDFLAGS="$PREV_LDFLAGS"
  1.2199 -    fi
  1.2200 -  fi
  1.2201 -
  1.2202 -
  1.2203 -
  1.2204 -
  1.2205 -
  1.2206 -
  1.2207 -
  1.2208 -
  1.2209 -  ###############################################################################
  1.2210 -  #
  1.2211 -  # Check for alsa headers and libraries. Used on Linux/GNU systems.
  1.2212 -  #
  1.2213 -
  1.2214 -# Check whether --with-alsa was given.
  1.2215 -if test "${with_alsa+set}" = set; then :
  1.2216 -  withval=$with_alsa;
  1.2217 -fi
  1.2218 -
  1.2219 -
  1.2220 -# Check whether --with-alsa-include was given.
  1.2221 -if test "${with_alsa_include+set}" = set; then :
  1.2222 -  withval=$with_alsa_include;
  1.2223 -fi
  1.2224 -
  1.2225 -
  1.2226 -# Check whether --with-alsa-lib was given.
  1.2227 -if test "${with_alsa_lib+set}" = set; then :
  1.2228 -  withval=$with_alsa_lib;
  1.2229 -fi
  1.2230 -
  1.2231 -
  1.2232 -  if test "x$ALSA_NOT_NEEDED" = xyes; then
  1.2233 -    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
  1.2234 -      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
  1.2235 -$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
  1.2236 -    fi
  1.2237 -    ALSA_CFLAGS=
  1.2238 -    ALSA_LIBS=
  1.2239 -  else
  1.2240 -    ALSA_FOUND=no
  1.2241 -
  1.2242 -    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
  1.2243 -      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
  1.2244 -    fi
  1.2245 -
  1.2246 -    if test "x${with_alsa}" != x; then
  1.2247 -      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
  1.2248 -      ALSA_CFLAGS="-I${with_alsa}/include"
  1.2249 -      ALSA_FOUND=yes
  1.2250 -    fi
  1.2251 -    if test "x${with_alsa_include}" != x; then
  1.2252 -      ALSA_CFLAGS="-I${with_alsa_include}"
  1.2253 -      ALSA_FOUND=yes
  1.2254 -    fi
  1.2255 -    if test "x${with_alsa_lib}" != x; then
  1.2256 -      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
  1.2257 -      ALSA_FOUND=yes
  1.2258 -    fi
  1.2259 -    if test "x$ALSA_FOUND" = xno; then
  1.2260 -
  1.2261 -
  1.2262 -  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.2263 -    # Source the builddeps file again, to make sure it uses the latest variables!
  1.2264 -    . $builddepsfile
  1.2265 -    # Look for a target and build machine specific resource!
  1.2266 -    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.2267 -    if test "x$resource" = x; then
  1.2268 -      # Ok, lets instead look for a target specific resource
  1.2269 -      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
  1.2270 -    fi
  1.2271 -    if test "x$resource" = x; then
  1.2272 -      # Ok, lets instead look for a build specific resource
  1.2273 -      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
  1.2274 -    fi
  1.2275 -    if test "x$resource" = x; then
  1.2276 -      # Ok, lets instead look for a generic resource
  1.2277 -      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
  1.2278 -      resource=${builddep_alsa}
  1.2279 -    fi
  1.2280 -    if test "x$resource" != x; then
  1.2281 -      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
  1.2282 -$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
  1.2283 -      # If the resource in the builddeps.conf file is an existing directory,
  1.2284 -      # for example /java/linux/cups
  1.2285 -      if test -d ${resource}; then
  1.2286 -        depdir=${resource}
  1.2287 -      else
  1.2288 -
  1.2289 -  # alsa is for example mymodule
  1.2290 -  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.2291 -  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.2292 -  # $with_builddeps_dir is for example /localhome/builddeps
  1.2293 -  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.2294 -  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.2295 -  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.2296 -  filename=`basename $resource`
  1.2297 -  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.2298 -  filebase=${filename%%.*}
  1.2299 -  extension=${filename#*.}
  1.2300 -  installdir=$with_builddeps_dir/$filebase
  1.2301 -  if test ! -f $installdir/$filename.unpacked; then
  1.2302 -    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.2303 -$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.2304 -    if test ! -d $installdir; then
  1.2305 -      mkdir -p $installdir
  1.2306 -    fi
  1.2307 -    if test ! -d $installdir; then
  1.2308 -      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.2309 -    fi
  1.2310 -    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
  1.2311 -    touch $tmpfile
  1.2312 -    if test ! -f $tmpfile; then
  1.2313 -      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.2314 -    fi
  1.2315 -
  1.2316 -  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.2317 -  # $tmpfile is the local file name for the downloaded file.
  1.2318 -  VALID_TOOL=no
  1.2319 -  if test "x$BDEPS_FTP" = xwget; then
  1.2320 -    VALID_TOOL=yes
  1.2321 -    wget -O $tmpfile $with_builddeps_server/$resource
  1.2322 -  fi
  1.2323 -  if test "x$BDEPS_FTP" = xlftp; then
  1.2324 -    VALID_TOOL=yes
  1.2325 -    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.2326 -  fi
  1.2327 -  if test "x$BDEPS_FTP" = xftp; then
  1.2328 -    VALID_TOOL=yes
  1.2329 -    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.2330 -    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.2331 -    FTPUSERPWD=${FTPSERVER%%@*}
  1.2332 -    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.2333 -      FTPUSER=${userpwd%%:*}
  1.2334 -      FTPPWD=${userpwd#*@}
  1.2335 -      FTPSERVER=${FTPSERVER#*@}
  1.2336 -    else
  1.2337 -      FTPUSER=ftp
  1.2338 -      FTPPWD=ftp
  1.2339 -    fi
  1.2340 -    # the "pass" command does not work on some
  1.2341 -    # ftp clients (read ftp.exe) but if it works,
  1.2342 -    # passive mode is better!
  1.2343 -    ( \
  1.2344 -        echo "user $FTPUSER $FTPPWD"        ; \
  1.2345 -        echo "pass"                         ; \
  1.2346 -        echo "bin"                          ; \
  1.2347 -        echo "get $FTPPATH $tmpfile"              ; \
  1.2348 -    ) | ftp -in $FTPSERVER
  1.2349 -  fi
  1.2350 -  if test "x$VALID_TOOL" != xyes; then
  1.2351 -    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.2352 -  fi
  1.2353 -
  1.2354 -    mv $tmpfile $installdir/$filename
  1.2355 -    if test ! -s $installdir/$filename; then
  1.2356 -      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.2357 -    fi
  1.2358 -    case "$extension" in
  1.2359 -      zip)  echo "Unzipping $installdir/$filename..."
  1.2360 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.2361 -        ;;
  1.2362 -      tar.gz) echo "Untaring $installdir/$filename..."
  1.2363 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.2364 -        ;;
  1.2365 -      tgz) echo "Untaring $installdir/$filename..."
  1.2366 -        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.2367 -        ;;
  1.2368 -      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.2369 -        ;;
  1.2370 -    esac
  1.2371 -  fi
  1.2372 -  if test -f $installdir/$filename.unpacked; then
  1.2373 -    depdir=$installdir
  1.2374 -  fi
  1.2375 -
  1.2376 -      fi
  1.2377 -      # Source the builddeps file again, because in the previous command, the depdir
  1.2378 -      # was updated to point at the current build dependency install directory.
  1.2379 -      . $builddepsfile
  1.2380 -      # Now extract variables from the builddeps.conf files.
  1.2381 -      theroot=${builddep_alsa_ROOT}
  1.2382 -      thecflags=${builddep_alsa_CFLAGS}
  1.2383 -      thelibs=${builddep_alsa_LIBS}
  1.2384 -      if test "x$depdir" = x; then
  1.2385 -        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
  1.2386 -      fi
  1.2387 -      ALSA=$depdir
  1.2388 -      if test "x$theroot" != x; then
  1.2389 -        ALSA="$theroot"
  1.2390 -      fi
  1.2391 -      if test "x$thecflags" != x; then
  1.2392 -        ALSA_CFLAGS="$thecflags"
  1.2393 -      fi
  1.2394 -      if test "x$thelibs" != x; then
  1.2395 -        ALSA_LIBS="$thelibs"
  1.2396 -      fi
  1.2397 -      ALSA_FOUND=yes
  1.2398 -      else ALSA_FOUND=no
  1.2399 -
  1.2400 -    fi
  1.2401 -    else ALSA_FOUND=no
  1.2402 -
  1.2403 -  fi
  1.2404 -
  1.2405 -    fi
  1.2406 -    if test "x$ALSA_FOUND" = xno; then
  1.2407 -
  1.2408 -pkg_failed=no
  1.2409 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
  1.2410 -$as_echo_n "checking for ALSA... " >&6; }
  1.2411 -
  1.2412 -if test -n "$ALSA_CFLAGS"; then
  1.2413 -    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
  1.2414 - elif test -n "$PKG_CONFIG"; then
  1.2415 -    if test -n "$PKG_CONFIG" && \
  1.2416 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
  1.2417 -  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
  1.2418 -  ac_status=$?
  1.2419 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.2420 -  test $ac_status = 0; }; then
  1.2421 -  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
  1.2422 -else
  1.2423 -  pkg_failed=yes
  1.2424 -fi
  1.2425 - else
  1.2426 -    pkg_failed=untried
  1.2427 -fi
  1.2428 -if test -n "$ALSA_LIBS"; then
  1.2429 -    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
  1.2430 - elif test -n "$PKG_CONFIG"; then
  1.2431 -    if test -n "$PKG_CONFIG" && \
  1.2432 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
  1.2433 -  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
  1.2434 -  ac_status=$?
  1.2435 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.2436 -  test $ac_status = 0; }; then
  1.2437 -  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
  1.2438 -else
  1.2439 -  pkg_failed=yes
  1.2440 -fi
  1.2441 - else
  1.2442 -    pkg_failed=untried
  1.2443 -fi
  1.2444 -
  1.2445 -
  1.2446 -
  1.2447 -if test $pkg_failed = yes; then
  1.2448 -
  1.2449 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.2450 -        _pkg_short_errors_supported=yes
  1.2451 -else
  1.2452 -        _pkg_short_errors_supported=no
  1.2453 -fi
  1.2454 -        if test $_pkg_short_errors_supported = yes; then
  1.2455 -	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
  1.2456 -        else
  1.2457 -	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
  1.2458 -        fi
  1.2459 -	# Put the nasty error message in config.log where it belongs
  1.2460 -	echo "$ALSA_PKG_ERRORS" >&5
  1.2461 -
  1.2462 -	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.2463 -$as_echo "no" >&6; }
  1.2464 -                ALSA_FOUND=no
  1.2465 -elif test $pkg_failed = untried; then
  1.2466 -	ALSA_FOUND=no
  1.2467 -else
  1.2468 -	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
  1.2469 -	ALSA_LIBS=$pkg_cv_ALSA_LIBS
  1.2470 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.2471 -$as_echo "yes" >&6; }
  1.2472 -	ALSA_FOUND=yes
  1.2473 -fi
  1.2474 -    fi
  1.2475 -    if test "x$ALSA_FOUND" = xno; then
  1.2476 -      for ac_header in alsa/asoundlib.h
  1.2477 -do :
  1.2478 -  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
  1.2479 -if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
  1.2480 -  cat >>confdefs.h <<_ACEOF
  1.2481 -#define HAVE_ALSA_ASOUNDLIB_H 1
  1.2482 -_ACEOF
  1.2483 -
  1.2484 -            ALSA_FOUND=yes
  1.2485 -            ALSA_CFLAGS=-Iignoreme
  1.2486 -            ALSA_LIBS=-lasound
  1.2487 -            DEFAULT_ALSA=yes
  1.2488 -
  1.2489 -else
  1.2490 -  ALSA_FOUND=no
  1.2491 -fi
  1.2492 -
  1.2493 -done
  1.2494 -
  1.2495 -    fi
  1.2496 -    if test "x$ALSA_FOUND" = xno; then
  1.2497 -
  1.2498 -  # Print a helpful message on how to acquire the necessary build dependency.
  1.2499 -  # alsa is the help tag: freetyp2, cups, pulse, alsa etc
  1.2500 -  MISSING_DEPENDENCY=alsa
  1.2501 -
  1.2502 -  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.2503 -    cygwin_help $MISSING_DEPENDENCY
  1.2504 -  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.2505 -    msys_help $MISSING_DEPENDENCY
  1.2506 -  else
  1.2507 -    PKGHANDLER_COMMAND=
  1.2508 -
  1.2509 -    case $PKGHANDLER in
  1.2510 -      apt-get)
  1.2511 -        apt_help     $MISSING_DEPENDENCY ;;
  1.2512 -      yum)
  1.2513 -        yum_help     $MISSING_DEPENDENCY ;;
  1.2514 -      port)
  1.2515 -        port_help    $MISSING_DEPENDENCY ;;
  1.2516 -      pkgutil)
  1.2517 -        pkgutil_help $MISSING_DEPENDENCY ;;
  1.2518 -      pkgadd)
  1.2519 -        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.2520 -      * )
  1.2521 -        break ;;
  1.2522 -    esac
  1.2523 -
  1.2524 -    if test "x$PKGHANDLER_COMMAND" != x; then
  1.2525 -      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.2526 -    fi
  1.2527 -  fi
  1.2528 -
  1.2529 -      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
  1.2530 -    fi
  1.2531 -  fi
  1.2532 -
  1.2533 -
  1.2534 -
  1.2535 -
  1.2536 -
  1.2537 -
  1.2538 -  ###############################################################################
  1.2539 -  #
  1.2540 -  # Check for the jpeg library
  1.2541 -  #
  1.2542 -
  1.2543 -  USE_EXTERNAL_LIBJPEG=true
  1.2544 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
  1.2545 -$as_echo_n "checking for main in -ljpeg... " >&6; }
  1.2546 -if ${ac_cv_lib_jpeg_main+:} false; then :
  1.2547 -  $as_echo_n "(cached) " >&6
  1.2548 -else
  1.2549 -  ac_check_lib_save_LIBS=$LIBS
  1.2550 -LIBS="-ljpeg  $LIBS"
  1.2551 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2552 -/* end confdefs.h.  */
  1.2553 -
  1.2554 -
  1.2555 -int
  1.2556 -main ()
  1.2557 -{
  1.2558 -return main ();
  1.2559 -  ;
  1.2560 -  return 0;
  1.2561 -}
  1.2562 -_ACEOF
  1.2563 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2564 -  ac_cv_lib_jpeg_main=yes
  1.2565 -else
  1.2566 -  ac_cv_lib_jpeg_main=no
  1.2567 -fi
  1.2568 -rm -f core conftest.err conftest.$ac_objext \
  1.2569 -    conftest$ac_exeext conftest.$ac_ext
  1.2570 -LIBS=$ac_check_lib_save_LIBS
  1.2571 -fi
  1.2572 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
  1.2573 -$as_echo "$ac_cv_lib_jpeg_main" >&6; }
  1.2574 -if test "x$ac_cv_lib_jpeg_main" = xyes; then :
  1.2575 -  cat >>confdefs.h <<_ACEOF
  1.2576 -#define HAVE_LIBJPEG 1
  1.2577 -_ACEOF
  1.2578 -
  1.2579 -  LIBS="-ljpeg $LIBS"
  1.2580 -
  1.2581 -else
  1.2582 -   USE_EXTERNAL_LIBJPEG=false
  1.2583 -      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
  1.2584 -$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
  1.2585 -
  1.2586 -fi
  1.2587 -
  1.2588 -
  1.2589 -
  1.2590 -  ###############################################################################
  1.2591 -  #
  1.2592 -  # Check for the gif library
  1.2593 -  #
  1.2594 -
  1.2595 -
  1.2596 -# Check whether --with-giflib was given.
  1.2597 -if test "${with_giflib+set}" = set; then :
  1.2598 -  withval=$with_giflib;
  1.2599 -fi
  1.2600 -
  1.2601 -
  1.2602 -
  1.2603 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
  1.2604 -$as_echo_n "checking for which giflib to use... " >&6; }
  1.2605 -
  1.2606 -  # default is bundled
  1.2607 -  DEFAULT_GIFLIB=bundled
  1.2608 -
  1.2609 -  #
  1.2610 -  # if user didn't specify, use DEFAULT_GIFLIB
  1.2611 -  #
  1.2612 -  if test "x${with_giflib}" = "x"; then
  1.2613 -    with_giflib=${DEFAULT_GIFLIB}
  1.2614 -  fi
  1.2615 -
  1.2616 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
  1.2617 -$as_echo "${with_giflib}" >&6; }
  1.2618 -
  1.2619 -  if test "x${with_giflib}" = "xbundled"; then
  1.2620 -    USE_EXTERNAL_LIBGIF=false
  1.2621 -  elif test "x${with_giflib}" = "xsystem"; then
  1.2622 -    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
  1.2623 -if test "x$ac_cv_header_gif_lib_h" = xyes; then :
  1.2624 -
  1.2625 -else
  1.2626 -   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
  1.2627 -fi
  1.2628 -
  1.2629 -
  1.2630 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
  1.2631 -$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
  1.2632 -if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
  1.2633 -  $as_echo_n "(cached) " >&6
  1.2634 -else
  1.2635 -  ac_check_lib_save_LIBS=$LIBS
  1.2636 -LIBS="-lgif  $LIBS"
  1.2637 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2638 -/* end confdefs.h.  */
  1.2639 -
  1.2640 -/* Override any GCC internal prototype to avoid an error.
  1.2641 -   Use char because int might match the return type of a GCC
  1.2642 -   builtin and then its argument prototype would still apply.  */
  1.2643 -#ifdef __cplusplus
  1.2644 -extern "C"
  1.2645 -#endif
  1.2646 -char DGifGetCode ();
  1.2647 -int
  1.2648 -main ()
  1.2649 -{
  1.2650 -return DGifGetCode ();
  1.2651 -  ;
  1.2652 -  return 0;
  1.2653 -}
  1.2654 -_ACEOF
  1.2655 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2656 -  ac_cv_lib_gif_DGifGetCode=yes
  1.2657 -else
  1.2658 -  ac_cv_lib_gif_DGifGetCode=no
  1.2659 -fi
  1.2660 -rm -f core conftest.err conftest.$ac_objext \
  1.2661 -    conftest$ac_exeext conftest.$ac_ext
  1.2662 -LIBS=$ac_check_lib_save_LIBS
  1.2663 -fi
  1.2664 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
  1.2665 -$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
  1.2666 -if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
  1.2667 -  cat >>confdefs.h <<_ACEOF
  1.2668 -#define HAVE_LIBGIF 1
  1.2669 -_ACEOF
  1.2670 -
  1.2671 -  LIBS="-lgif $LIBS"
  1.2672 -
  1.2673 -else
  1.2674 -   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
  1.2675 -fi
  1.2676 -
  1.2677 -
  1.2678 -    USE_EXTERNAL_LIBGIF=true
  1.2679 -  else
  1.2680 -    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
  1.2681 -  fi
  1.2682 -
  1.2683 -
  1.2684 -  ###############################################################################
  1.2685 -  #
  1.2686 -  # Check for the zlib library
  1.2687 -  #
  1.2688 -
  1.2689 -
  1.2690 -# Check whether --with-zlib was given.
  1.2691 -if test "${with_zlib+set}" = set; then :
  1.2692 -  withval=$with_zlib;
  1.2693 -fi
  1.2694 -
  1.2695 -
  1.2696 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
  1.2697 -$as_echo_n "checking for compress in -lz... " >&6; }
  1.2698 -if ${ac_cv_lib_z_compress+:} false; then :
  1.2699 -  $as_echo_n "(cached) " >&6
  1.2700 -else
  1.2701 -  ac_check_lib_save_LIBS=$LIBS
  1.2702 -LIBS="-lz  $LIBS"
  1.2703 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2704 -/* end confdefs.h.  */
  1.2705 -
  1.2706 -/* Override any GCC internal prototype to avoid an error.
  1.2707 -   Use char because int might match the return type of a GCC
  1.2708 -   builtin and then its argument prototype would still apply.  */
  1.2709 -#ifdef __cplusplus
  1.2710 -extern "C"
  1.2711 -#endif
  1.2712 -char compress ();
  1.2713 -int
  1.2714 -main ()
  1.2715 -{
  1.2716 -return compress ();
  1.2717 -  ;
  1.2718 -  return 0;
  1.2719 -}
  1.2720 -_ACEOF
  1.2721 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2722 -  ac_cv_lib_z_compress=yes
  1.2723 -else
  1.2724 -  ac_cv_lib_z_compress=no
  1.2725 -fi
  1.2726 -rm -f core conftest.err conftest.$ac_objext \
  1.2727 -    conftest$ac_exeext conftest.$ac_ext
  1.2728 -LIBS=$ac_check_lib_save_LIBS
  1.2729 -fi
  1.2730 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
  1.2731 -$as_echo "$ac_cv_lib_z_compress" >&6; }
  1.2732 -if test "x$ac_cv_lib_z_compress" = xyes; then :
  1.2733 -   ZLIB_FOUND=yes
  1.2734 -else
  1.2735 -   ZLIB_FOUND=no
  1.2736 -fi
  1.2737 -
  1.2738 -
  1.2739 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
  1.2740 -$as_echo_n "checking for which zlib to use... " >&6; }
  1.2741 -
  1.2742 -  DEFAULT_ZLIB=bundled
  1.2743 -  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  1.2744 -    #
  1.2745 -    # On macosx default is system...on others default is
  1.2746 -    #
  1.2747 -    DEFAULT_ZLIB=system
  1.2748 -  fi
  1.2749 -
  1.2750 -  if test "x${ZLIB_FOUND}" != "xyes"; then
  1.2751 -    #
  1.2752 -    # If we don't find any system...set default to bundled
  1.2753 -    #
  1.2754 -    DEFAULT_ZLIB=bundled
  1.2755 -  fi
  1.2756 -
  1.2757 -  #
  1.2758 -  # If user didn't specify, use DEFAULT_ZLIB
  1.2759 -  #
  1.2760 -  if test "x${with_zlib}" = "x"; then
  1.2761 -    with_zlib=${DEFAULT_ZLIB}
  1.2762 -  fi
  1.2763 -
  1.2764 -  if test "x${with_zlib}" = "xbundled"; then
  1.2765 -    USE_EXTERNAL_LIBZ=false
  1.2766 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
  1.2767 -$as_echo "bundled" >&6; }
  1.2768 -  elif test "x${with_zlib}" = "xsystem"; then
  1.2769 -    if test "x${ZLIB_FOUND}" = "xyes"; then
  1.2770 -      USE_EXTERNAL_LIBZ=true
  1.2771 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
  1.2772 -$as_echo "system" >&6; }
  1.2773 -    else
  1.2774 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
  1.2775 -$as_echo "system not found" >&6; }
  1.2776 -      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
  1.2777 -    fi
  1.2778 -  else
  1.2779 -    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
  1.2780 -  fi
  1.2781 -
  1.2782 -
  1.2783 -
  1.2784 -  ###############################################################################
  1.2785 -  LIBZIP_CAN_USE_MMAP=true
  1.2786 -
  1.2787 -
  1.2788 -
  1.2789 -  ###############################################################################
  1.2790 -  #
  1.2791 -  # Check if altzone exists in time.h
  1.2792 -  #
  1.2793 -
  1.2794 -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2795 -/* end confdefs.h.  */
  1.2796 -#include <time.h>
  1.2797 -int
  1.2798 -main ()
  1.2799 -{
  1.2800 -return (int)altzone;
  1.2801 -  ;
  1.2802 -  return 0;
  1.2803 -}
  1.2804 -_ACEOF
  1.2805 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2806 -  has_altzone=yes
  1.2807 -else
  1.2808 -  has_altzone=no
  1.2809 -fi
  1.2810 -rm -f core conftest.err conftest.$ac_objext \
  1.2811 -    conftest$ac_exeext conftest.$ac_ext
  1.2812 -  if test "x$has_altzone" = xyes; then
  1.2813 -
  1.2814 -$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
  1.2815 -
  1.2816 -  fi
  1.2817 -
  1.2818 -  ###############################################################################
  1.2819 -  #
  1.2820 -  # Check the maths library
  1.2821 -  #
  1.2822 -
  1.2823 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
  1.2824 -$as_echo_n "checking for cos in -lm... " >&6; }
  1.2825 -if ${ac_cv_lib_m_cos+:} false; then :
  1.2826 -  $as_echo_n "(cached) " >&6
  1.2827 -else
  1.2828 -  ac_check_lib_save_LIBS=$LIBS
  1.2829 -LIBS="-lm  $LIBS"
  1.2830 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2831 -/* end confdefs.h.  */
  1.2832 -
  1.2833 -/* Override any GCC internal prototype to avoid an error.
  1.2834 -   Use char because int might match the return type of a GCC
  1.2835 -   builtin and then its argument prototype would still apply.  */
  1.2836 -#ifdef __cplusplus
  1.2837 -extern "C"
  1.2838 -#endif
  1.2839 -char cos ();
  1.2840 -int
  1.2841 -main ()
  1.2842 -{
  1.2843 -return cos ();
  1.2844 -  ;
  1.2845 -  return 0;
  1.2846 -}
  1.2847 -_ACEOF
  1.2848 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2849 -  ac_cv_lib_m_cos=yes
  1.2850 -else
  1.2851 -  ac_cv_lib_m_cos=no
  1.2852 -fi
  1.2853 -rm -f core conftest.err conftest.$ac_objext \
  1.2854 -    conftest$ac_exeext conftest.$ac_ext
  1.2855 -LIBS=$ac_check_lib_save_LIBS
  1.2856 -fi
  1.2857 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
  1.2858 -$as_echo "$ac_cv_lib_m_cos" >&6; }
  1.2859 -if test "x$ac_cv_lib_m_cos" = xyes; then :
  1.2860 -  cat >>confdefs.h <<_ACEOF
  1.2861 -#define HAVE_LIBM 1
  1.2862 -_ACEOF
  1.2863 -
  1.2864 -  LIBS="-lm $LIBS"
  1.2865 -
  1.2866 -else
  1.2867 -
  1.2868 -        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
  1.2869 -$as_echo "$as_me: Maths library was not found" >&6;}
  1.2870 -
  1.2871 -
  1.2872 -fi
  1.2873 -
  1.2874 -
  1.2875 -
  1.2876 -  ###############################################################################
  1.2877 -  #
  1.2878 -  # Check for libdl.so
  1.2879 -
  1.2880 -  save_LIBS="$LIBS"
  1.2881 -  LIBS=""
  1.2882 -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  1.2883 -$as_echo_n "checking for dlopen in -ldl... " >&6; }
  1.2884 -if ${ac_cv_lib_dl_dlopen+:} false; then :
  1.2885 -  $as_echo_n "(cached) " >&6
  1.2886 -else
  1.2887 -  ac_check_lib_save_LIBS=$LIBS
  1.2888 -LIBS="-ldl  $LIBS"
  1.2889 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2890 -/* end confdefs.h.  */
  1.2891 -
  1.2892 -/* Override any GCC internal prototype to avoid an error.
  1.2893 -   Use char because int might match the return type of a GCC
  1.2894 -   builtin and then its argument prototype would still apply.  */
  1.2895 -#ifdef __cplusplus
  1.2896 -extern "C"
  1.2897 -#endif
  1.2898 -char dlopen ();
  1.2899 -int
  1.2900 -main ()
  1.2901 -{
  1.2902 -return dlopen ();
  1.2903 -  ;
  1.2904 -  return 0;
  1.2905 -}
  1.2906 -_ACEOF
  1.2907 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2908 -  ac_cv_lib_dl_dlopen=yes
  1.2909 -else
  1.2910 -  ac_cv_lib_dl_dlopen=no
  1.2911 -fi
  1.2912 -rm -f core conftest.err conftest.$ac_objext \
  1.2913 -    conftest$ac_exeext conftest.$ac_ext
  1.2914 -LIBS=$ac_check_lib_save_LIBS
  1.2915 -fi
  1.2916 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  1.2917 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
  1.2918 -if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
  1.2919 -  cat >>confdefs.h <<_ACEOF
  1.2920 -#define HAVE_LIBDL 1
  1.2921 -_ACEOF
  1.2922 -
  1.2923 -  LIBS="-ldl $LIBS"
  1.2924 -
  1.2925 -fi
  1.2926 -
  1.2927 -  LIBDL="$LIBS"
  1.2928 -
  1.2929 -  LIBS="$save_LIBS"
  1.2930 -
  1.2931 -
  1.2932 -  ###############################################################################
  1.2933 -  #
  1.2934 -  # statically link libstdc++ before C++ ABI is stablized on Linux unless
  1.2935 -  # dynamic build is configured on command line.
  1.2936 -  #
  1.2937 -
  1.2938 -# Check whether --with-stdc++lib was given.
  1.2939 -if test "${with_stdc__lib+set}" = set; then :
  1.2940 -  withval=$with_stdc__lib;
  1.2941 -        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
  1.2942 -                && test "x$with_stdc__lib" != xdefault; then
  1.2943 -          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
  1.2944 -        fi
  1.2945 -
  1.2946 -else
  1.2947 -  with_stdc__lib=default
  1.2948 -
  1.2949 -fi
  1.2950 -
  1.2951 -
  1.2952 -  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.2953 -    # Test if -lstdc++ works.
  1.2954 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
  1.2955 -$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
  1.2956 -    ac_ext=cpp
  1.2957 -ac_cpp='$CXXCPP $CPPFLAGS'
  1.2958 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.2959 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.2960 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.2961 -
  1.2962 -    OLD_CXXFLAGS="$CXXFLAGS"
  1.2963 -    CXXFLAGS="$CXXFLAGS -lstdc++"
  1.2964 -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.2965 -/* end confdefs.h.  */
  1.2966 -
  1.2967 -int
  1.2968 -main ()
  1.2969 -{
  1.2970 -return 0;
  1.2971 -  ;
  1.2972 -  return 0;
  1.2973 -}
  1.2974 -_ACEOF
  1.2975 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.2976 -  has_dynamic_libstdcxx=yes
  1.2977 -else
  1.2978 -  has_dynamic_libstdcxx=no
  1.2979 -fi
  1.2980 -rm -f core conftest.err conftest.$ac_objext \
  1.2981 -    conftest$ac_exeext conftest.$ac_ext
  1.2982 -    CXXFLAGS="$OLD_CXXFLAGS"
  1.2983 -    ac_ext=cpp
  1.2984 -ac_cpp='$CXXCPP $CPPFLAGS'
  1.2985 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.2986 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.2987 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.2988 -
  1.2989 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
  1.2990 -$as_echo "$has_dynamic_libstdcxx" >&6; }
  1.2991 -
  1.2992 -    # Test if stdc++ can be linked statically.
  1.2993 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
  1.2994 -$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
  1.2995 -    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
  1.2996 -    ac_ext=cpp
  1.2997 -ac_cpp='$CXXCPP $CPPFLAGS'
  1.2998 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.2999 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.3000 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.3001 -
  1.3002 -    OLD_LIBS="$LIBS"
  1.3003 -    OLD_CXX="$CXX"
  1.3004 -    LIBS="$STATIC_STDCXX_FLAGS"
  1.3005 -    CXX="$CC"
  1.3006 -    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3007 -/* end confdefs.h.  */
  1.3008 -
  1.3009 -int
  1.3010 -main ()
  1.3011 -{
  1.3012 -return 0;
  1.3013 -  ;
  1.3014 -  return 0;
  1.3015 -}
  1.3016 -_ACEOF
  1.3017 -if ac_fn_cxx_try_link "$LINENO"; then :
  1.3018 -  has_static_libstdcxx=yes
  1.3019 -else
  1.3020 -  has_static_libstdcxx=no
  1.3021 -fi
  1.3022 -rm -f core conftest.err conftest.$ac_objext \
  1.3023 -    conftest$ac_exeext conftest.$ac_ext
  1.3024 -    LIBS="$OLD_LIBS"
  1.3025 -    CXX="$OLD_CXX"
  1.3026 -    ac_ext=cpp
  1.3027 -ac_cpp='$CXXCPP $CPPFLAGS'
  1.3028 -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.3029 -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.3030 -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.3031 -
  1.3032 -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
  1.3033 -$as_echo "$has_static_libstdcxx" >&6; }
  1.3034 -
  1.3035 -    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
  1.3036 -      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
  1.3037 -    fi
  1.3038 -
  1.3039 -    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
  1.3040 -      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
  1.3041 -    fi
  1.3042 -
  1.3043 -    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
  1.3044 -      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
  1.3045 -    fi
  1.3046 -
  1.3047 -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
  1.3048 -$as_echo_n "checking how to link with libstdc++... " >&6; }
  1.3049 -    # If dynamic was requested, it's available since it would fail above otherwise.
  1.3050 -    # If dynamic wasn't requested, go with static unless it isn't available.
  1.3051 -    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.3052 -      LIBCXX="$LIBCXX -lstdc++"
  1.3053 -      LDCXX="$CXX"
  1.3054 -      STATIC_CXX_SETTING="STATIC_CXX=false"
  1.3055 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
  1.3056 -$as_echo "dynamic" >&6; }
  1.3057 -    else
  1.3058 -      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
  1.3059 -      LDCXX="$CC"
  1.3060 -      STATIC_CXX_SETTING="STATIC_CXX=true"
  1.3061 -      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
  1.3062 -$as_echo "static" >&6; }
  1.3063 -    fi
  1.3064 -  fi
  1.3065 -
  1.3066 -
  1.3067 -  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.3068 -    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
  1.3069 -
  1.3070 -pkg_failed=no
  1.3071 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
  1.3072 -$as_echo_n "checking for LIBFFI... " >&6; }
  1.3073 -
  1.3074 -if test -n "$LIBFFI_CFLAGS"; then
  1.3075 -    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
  1.3076 - elif test -n "$PKG_CONFIG"; then
  1.3077 -    if test -n "$PKG_CONFIG" && \
  1.3078 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  1.3079 -  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  1.3080 -  ac_status=$?
  1.3081 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.3082 -  test $ac_status = 0; }; then
  1.3083 -  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
  1.3084 -else
  1.3085 -  pkg_failed=yes
  1.3086 -fi
  1.3087 - else
  1.3088 -    pkg_failed=untried
  1.3089 -fi
  1.3090 -if test -n "$LIBFFI_LIBS"; then
  1.3091 -    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
  1.3092 - elif test -n "$PKG_CONFIG"; then
  1.3093 -    if test -n "$PKG_CONFIG" && \
  1.3094 -    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  1.3095 -  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  1.3096 -  ac_status=$?
  1.3097 -  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.3098 -  test $ac_status = 0; }; then
  1.3099 -  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
  1.3100 -else
  1.3101 -  pkg_failed=yes
  1.3102 -fi
  1.3103 - else
  1.3104 -    pkg_failed=untried
  1.3105 -fi
  1.3106 -
  1.3107 -
  1.3108 -
  1.3109 -if test $pkg_failed = yes; then
  1.3110 -
  1.3111 -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.3112 -        _pkg_short_errors_supported=yes
  1.3113 -else
  1.3114 -        _pkg_short_errors_supported=no
  1.3115 -fi
  1.3116 -        if test $_pkg_short_errors_supported = yes; then
  1.3117 -	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
  1.3118 -        else
  1.3119 -	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
  1.3120 -        fi
  1.3121 -	# Put the nasty error message in config.log where it belongs
  1.3122 -	echo "$LIBFFI_PKG_ERRORS" >&5
  1.3123 -
  1.3124 -	as_fn_error $? "Package requirements (libffi) were not met:
  1.3125 -
  1.3126 -$LIBFFI_PKG_ERRORS
  1.3127 -
  1.3128 -Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.3129 -installed software in a non-standard prefix.
  1.3130 -
  1.3131 -Alternatively, you may set the environment variables LIBFFI_CFLAGS
  1.3132 -and LIBFFI_LIBS to avoid the need to call pkg-config.
  1.3133 -See the pkg-config man page for more details.
  1.3134 -" "$LINENO" 5
  1.3135 -elif test $pkg_failed = untried; then
  1.3136 -	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.3137 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.3138 -as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.3139 -is in your PATH or set the PKG_CONFIG environment variable to the full
  1.3140 -path to pkg-config.
  1.3141 -
  1.3142 -Alternatively, you may set the environment variables LIBFFI_CFLAGS
  1.3143 -and LIBFFI_LIBS to avoid the need to call pkg-config.
  1.3144 -See the pkg-config man page for more details.
  1.3145 -
  1.3146 -To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.3147 -See \`config.log' for more details" "$LINENO" 5; }
  1.3148 -else
  1.3149 -	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
  1.3150 -	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
  1.3151 -        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.3152 -$as_echo "yes" >&6; }
  1.3153 -	:
  1.3154 -fi
  1.3155 -
  1.3156 -  fi
  1.3157 -
  1.3158 -  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.3159 -    # Extract the first word of "llvm-config", so it can be a program name with args.
  1.3160 -set dummy llvm-config; ac_word=$2
  1.3161 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.3162 -$as_echo_n "checking for $ac_word... " >&6; }
  1.3163 -if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
  1.3164 -  $as_echo_n "(cached) " >&6
  1.3165 -else
  1.3166 -  if test -n "$LLVM_CONFIG"; then
  1.3167 -  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
  1.3168 -else
  1.3169 -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.3170 -for as_dir in $PATH
  1.3171 -do
  1.3172 -  IFS=$as_save_IFS
  1.3173 -  test -z "$as_dir" && as_dir=.
  1.3174 -    for ac_exec_ext in '' $ac_executable_extensions; do
  1.3175 -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.3176 -    ac_cv_prog_LLVM_CONFIG="llvm-config"
  1.3177 -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.3178 -    break 2
  1.3179 -  fi
  1.3180 -done
  1.3181 -  done
  1.3182 -IFS=$as_save_IFS
  1.3183 -
  1.3184 -fi
  1.3185 -fi
  1.3186 -LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
  1.3187 -if test -n "$LLVM_CONFIG"; then
  1.3188 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
  1.3189 -$as_echo "$LLVM_CONFIG" >&6; }
  1.3190 -else
  1.3191 -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.3192 -$as_echo "no" >&6; }
  1.3193 -fi
  1.3194 -
  1.3195 -
  1.3196 -
  1.3197 -    if test "x$LLVM_CONFIG" != xllvm-config; then
  1.3198 -      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
  1.3199 -    fi
  1.3200 -
  1.3201 -    llvm_components="jit mcjit engine nativecodegen native"
  1.3202 -    unset LLVM_CFLAGS
  1.3203 -    for flag in $("$LLVM_CONFIG" --cxxflags); do
  1.3204 -      if echo "${flag}" | grep -q '^-[ID]'; then
  1.3205 -        if test "${flag}" != "-D_DEBUG" ; then
  1.3206 -          if test "${LLVM_CFLAGS}" != "" ; then
  1.3207 -            LLVM_CFLAGS="${LLVM_CFLAGS} "
  1.3208 -          fi
  1.3209 -          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
  1.3210 -        fi
  1.3211 -      fi
  1.3212 -    done
  1.3213 -    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
  1.3214 -    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
  1.3215 -
  1.3216 -    unset LLVM_LDFLAGS
  1.3217 -    for flag in $("${LLVM_CONFIG}" --ldflags); do
  1.3218 -      if echo "${flag}" | grep -q '^-L'; then
  1.3219 -        if test "${LLVM_LDFLAGS}" != ""; then
  1.3220 -          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
  1.3221 -        fi
  1.3222 -        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
  1.3223 -      fi
  1.3224 -    done
  1.3225 -
  1.3226 -    unset LLVM_LIBS
  1.3227 -    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
  1.3228 -      if echo "${flag}" | grep -q '^-l'; then
  1.3229 -        if test "${LLVM_LIBS}" != ""; then
  1.3230 -          LLVM_LIBS="${LLVM_LIBS} "
  1.3231 -        fi
  1.3232 -        LLVM_LIBS="${LLVM_LIBS}${flag}"
  1.3233 -      fi
  1.3234 -    done
  1.3235 -
  1.3236 -
  1.3237 -
  1.3238 -
  1.3239 -  fi
  1.3240 -
  1.3241 -  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
  1.3242 -  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
  1.3243 -    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
  1.3244 -  fi
  1.3245 -
  1.3246 -  # TODO better (platform agnostic) test
  1.3247 -  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
  1.3248 -    LIBCXX="-lstdc++"
  1.3249 -  fi
  1.3250 -
  1.3251 -
  1.3252 -
  1.3253 -
  1.3254 -# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
  1.3255 +# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
  1.3256  
  1.3257    # When using cygwin or msys, we need a wrapper binary that renames
  1.3258    # /cygdrive/c/ arguments into c:/ arguments and peeks into
  1.3259 @@ -32945,6 +30012,5390 @@
  1.3260  
  1.3261  
  1.3262  
  1.3263 +
  1.3264 +
  1.3265 +  ###############################################################################
  1.3266 +  #
  1.3267 +  # OS specific settings that we never will need to probe.
  1.3268 +  #
  1.3269 +  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.3270 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
  1.3271 +$as_echo_n "checking what is not needed on Linux?... " >&6; }
  1.3272 +    PULSE_NOT_NEEDED=yes
  1.3273 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
  1.3274 +$as_echo "pulse" >&6; }
  1.3275 +  fi
  1.3276 +
  1.3277 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.3278 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
  1.3279 +$as_echo_n "checking what is not needed on Solaris?... " >&6; }
  1.3280 +    ALSA_NOT_NEEDED=yes
  1.3281 +    PULSE_NOT_NEEDED=yes
  1.3282 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
  1.3283 +$as_echo "alsa pulse" >&6; }
  1.3284 +  fi
  1.3285 +
  1.3286 +  if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.3287 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
  1.3288 +$as_echo_n "checking what is not needed on Windows?... " >&6; }
  1.3289 +    CUPS_NOT_NEEDED=yes
  1.3290 +    ALSA_NOT_NEEDED=yes
  1.3291 +    PULSE_NOT_NEEDED=yes
  1.3292 +    X11_NOT_NEEDED=yes
  1.3293 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
  1.3294 +$as_echo "alsa cups pulse x11" >&6; }
  1.3295 +  fi
  1.3296 +
  1.3297 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  1.3298 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
  1.3299 +$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
  1.3300 +    ALSA_NOT_NEEDED=yes
  1.3301 +    PULSE_NOT_NEEDED=yes
  1.3302 +    X11_NOT_NEEDED=yes
  1.3303 +    # If the java runtime framework is disabled, then we need X11.
  1.3304 +    # This will be adjusted below.
  1.3305 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
  1.3306 +$as_echo "alsa pulse x11" >&6; }
  1.3307 +  fi
  1.3308 +
  1.3309 +  if test "x$OPENJDK_TARGET_OS" = xbsd; then
  1.3310 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
  1.3311 +$as_echo_n "checking what is not needed on bsd?... " >&6; }
  1.3312 +    ALSA_NOT_NEEDED=yes
  1.3313 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
  1.3314 +$as_echo "alsa" >&6; }
  1.3315 +  fi
  1.3316 +
  1.3317 +  if test "x$OPENJDK" = "xfalse"; then
  1.3318 +    FREETYPE_NOT_NEEDED=yes
  1.3319 +  fi
  1.3320 +
  1.3321 +  if test "x$SUPPORT_HEADFUL" = xno; then
  1.3322 +    X11_NOT_NEEDED=yes
  1.3323 +  fi
  1.3324 +
  1.3325 +  ###############################################################################
  1.3326 +  #
  1.3327 +  # Check for MacOSX support for OpenJDK.
  1.3328 +  #
  1.3329 +
  1.3330 +
  1.3331 +  # Check whether --enable-macosx-runtime-support was given.
  1.3332 +if test "${enable_macosx_runtime_support+set}" = set; then :
  1.3333 +  enableval=$enable_macosx_runtime_support;
  1.3334 +fi
  1.3335 +
  1.3336 +  if test "x$enable_macosx_runtime_support" != x; then
  1.3337 +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
  1.3338 +$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
  1.3339 +  fi
  1.3340 +
  1.3341 +
  1.3342 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
  1.3343 +$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
  1.3344 +  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
  1.3345 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
  1.3346 +$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
  1.3347 +  else
  1.3348 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.3349 +$as_echo "no" >&6; }
  1.3350 +  fi
  1.3351 +
  1.3352 +
  1.3353 +
  1.3354 +  ###############################################################################
  1.3355 +  #
  1.3356 +  # Check for X Windows
  1.3357 +  #
  1.3358 +
  1.3359 +  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
  1.3360 +  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
  1.3361 +  # --x-libraries for the sysroot, if that seems to be correct.
  1.3362 +  if test "x$SYS_ROOT" != "x/"; then
  1.3363 +    if test "x$x_includes" = xNONE; then
  1.3364 +      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
  1.3365 +        x_includes="$SYS_ROOT/usr/X11R6/include"
  1.3366 +      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
  1.3367 +        x_includes="$SYS_ROOT/usr/include"
  1.3368 +      fi
  1.3369 +    fi
  1.3370 +    if test "x$x_libraries" = xNONE; then
  1.3371 +      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
  1.3372 +        x_libraries="$SYS_ROOT/usr/X11R6/lib"
  1.3373 +      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
  1.3374 +        x_libraries="$SYS_ROOT/usr/lib64"
  1.3375 +      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
  1.3376 +        x_libraries="$SYS_ROOT/usr/lib"
  1.3377 +      fi
  1.3378 +    fi
  1.3379 +  fi
  1.3380 +
  1.3381 +  # Now let autoconf do it's magic
  1.3382 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
  1.3383 +$as_echo_n "checking for X... " >&6; }
  1.3384 +
  1.3385 +
  1.3386 +# Check whether --with-x was given.
  1.3387 +if test "${with_x+set}" = set; then :
  1.3388 +  withval=$with_x;
  1.3389 +fi
  1.3390 +
  1.3391 +# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1.3392 +if test "x$with_x" = xno; then
  1.3393 +  # The user explicitly disabled X.
  1.3394 +  have_x=disabled
  1.3395 +else
  1.3396 +  case $x_includes,$x_libraries in #(
  1.3397 +    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
  1.3398 +    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
  1.3399 +  $as_echo_n "(cached) " >&6
  1.3400 +else
  1.3401 +  # One or both of the vars are not set, and there is no cached value.
  1.3402 +ac_x_includes=no ac_x_libraries=no
  1.3403 +rm -f -r conftest.dir
  1.3404 +if mkdir conftest.dir; then
  1.3405 +  cd conftest.dir
  1.3406 +  cat >Imakefile <<'_ACEOF'
  1.3407 +incroot:
  1.3408 +	@echo incroot='${INCROOT}'
  1.3409 +usrlibdir:
  1.3410 +	@echo usrlibdir='${USRLIBDIR}'
  1.3411 +libdir:
  1.3412 +	@echo libdir='${LIBDIR}'
  1.3413 +_ACEOF
  1.3414 +  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
  1.3415 +    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
  1.3416 +    for ac_var in incroot usrlibdir libdir; do
  1.3417 +      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
  1.3418 +    done
  1.3419 +    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1.3420 +    for ac_extension in a so sl dylib la dll; do
  1.3421 +      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
  1.3422 +	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
  1.3423 +	ac_im_usrlibdir=$ac_im_libdir; break
  1.3424 +      fi
  1.3425 +    done
  1.3426 +    # Screen out bogus values from the imake configuration.  They are
  1.3427 +    # bogus both because they are the default anyway, and because
  1.3428 +    # using them would break gcc on systems where it needs fixed includes.
  1.3429 +    case $ac_im_incroot in
  1.3430 +	/usr/include) ac_x_includes= ;;
  1.3431 +	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
  1.3432 +    esac
  1.3433 +    case $ac_im_usrlibdir in
  1.3434 +	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
  1.3435 +	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
  1.3436 +    esac
  1.3437 +  fi
  1.3438 +  cd ..
  1.3439 +  rm -f -r conftest.dir
  1.3440 +fi
  1.3441 +
  1.3442 +# Standard set of common directories for X headers.
  1.3443 +# Check X11 before X11Rn because it is often a symlink to the current release.
  1.3444 +ac_x_header_dirs='
  1.3445 +/usr/X11/include
  1.3446 +/usr/X11R7/include
  1.3447 +/usr/X11R6/include
  1.3448 +/usr/X11R5/include
  1.3449 +/usr/X11R4/include
  1.3450 +
  1.3451 +/usr/include/X11
  1.3452 +/usr/include/X11R7
  1.3453 +/usr/include/X11R6
  1.3454 +/usr/include/X11R5
  1.3455 +/usr/include/X11R4
  1.3456 +
  1.3457 +/usr/local/X11/include
  1.3458 +/usr/local/X11R7/include
  1.3459 +/usr/local/X11R6/include
  1.3460 +/usr/local/X11R5/include
  1.3461 +/usr/local/X11R4/include
  1.3462 +
  1.3463 +/usr/local/include/X11
  1.3464 +/usr/local/include/X11R7
  1.3465 +/usr/local/include/X11R6
  1.3466 +/usr/local/include/X11R5
  1.3467 +/usr/local/include/X11R4
  1.3468 +
  1.3469 +/usr/X386/include
  1.3470 +/usr/x386/include
  1.3471 +/usr/XFree86/include/X11
  1.3472 +
  1.3473 +/usr/include
  1.3474 +/usr/local/include
  1.3475 +/usr/unsupported/include
  1.3476 +/usr/athena/include
  1.3477 +/usr/local/x11r5/include
  1.3478 +/usr/lpp/Xamples/include
  1.3479 +
  1.3480 +/usr/openwin/include
  1.3481 +/usr/openwin/share/include'
  1.3482 +
  1.3483 +if test "$ac_x_includes" = no; then
  1.3484 +  # Guess where to find include files, by looking for Xlib.h.
  1.3485 +  # First, try using that file with no special directory specified.
  1.3486 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3487 +/* end confdefs.h.  */
  1.3488 +#include <X11/Xlib.h>
  1.3489 +_ACEOF
  1.3490 +if ac_fn_cxx_try_cpp "$LINENO"; then :
  1.3491 +  # We can compile using X headers with no special include directory.
  1.3492 +ac_x_includes=
  1.3493 +else
  1.3494 +  for ac_dir in $ac_x_header_dirs; do
  1.3495 +  if test -r "$ac_dir/X11/Xlib.h"; then
  1.3496 +    ac_x_includes=$ac_dir
  1.3497 +    break
  1.3498 +  fi
  1.3499 +done
  1.3500 +fi
  1.3501 +rm -f conftest.err conftest.i conftest.$ac_ext
  1.3502 +fi # $ac_x_includes = no
  1.3503 +
  1.3504 +if test "$ac_x_libraries" = no; then
  1.3505 +  # Check for the libraries.
  1.3506 +  # See if we find them without any special options.
  1.3507 +  # Don't add to $LIBS permanently.
  1.3508 +  ac_save_LIBS=$LIBS
  1.3509 +  LIBS="-lX11 $LIBS"
  1.3510 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3511 +/* end confdefs.h.  */
  1.3512 +#include <X11/Xlib.h>
  1.3513 +int
  1.3514 +main ()
  1.3515 +{
  1.3516 +XrmInitialize ()
  1.3517 +  ;
  1.3518 +  return 0;
  1.3519 +}
  1.3520 +_ACEOF
  1.3521 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3522 +  LIBS=$ac_save_LIBS
  1.3523 +# We can link X programs with no special library path.
  1.3524 +ac_x_libraries=
  1.3525 +else
  1.3526 +  LIBS=$ac_save_LIBS
  1.3527 +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
  1.3528 +do
  1.3529 +  # Don't even attempt the hair of trying to link an X program!
  1.3530 +  for ac_extension in a so sl dylib la dll; do
  1.3531 +    if test -r "$ac_dir/libX11.$ac_extension"; then
  1.3532 +      ac_x_libraries=$ac_dir
  1.3533 +      break 2
  1.3534 +    fi
  1.3535 +  done
  1.3536 +done
  1.3537 +fi
  1.3538 +rm -f core conftest.err conftest.$ac_objext \
  1.3539 +    conftest$ac_exeext conftest.$ac_ext
  1.3540 +fi # $ac_x_libraries = no
  1.3541 +
  1.3542 +case $ac_x_includes,$ac_x_libraries in #(
  1.3543 +  no,* | *,no | *\'*)
  1.3544 +    # Didn't find X, or a directory has "'" in its name.
  1.3545 +    ac_cv_have_x="have_x=no";; #(
  1.3546 +  *)
  1.3547 +    # Record where we found X for the cache.
  1.3548 +    ac_cv_have_x="have_x=yes\
  1.3549 +	ac_x_includes='$ac_x_includes'\
  1.3550 +	ac_x_libraries='$ac_x_libraries'"
  1.3551 +esac
  1.3552 +fi
  1.3553 +;; #(
  1.3554 +    *) have_x=yes;;
  1.3555 +  esac
  1.3556 +  eval "$ac_cv_have_x"
  1.3557 +fi # $with_x != no
  1.3558 +
  1.3559 +if test "$have_x" != yes; then
  1.3560 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
  1.3561 +$as_echo "$have_x" >&6; }
  1.3562 +  no_x=yes
  1.3563 +else
  1.3564 +  # If each of the values was on the command line, it overrides each guess.
  1.3565 +  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1.3566 +  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1.3567 +  # Update the cache value to reflect the command line values.
  1.3568 +  ac_cv_have_x="have_x=yes\
  1.3569 +	ac_x_includes='$x_includes'\
  1.3570 +	ac_x_libraries='$x_libraries'"
  1.3571 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
  1.3572 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
  1.3573 +fi
  1.3574 +
  1.3575 +  if test "$no_x" = yes; then
  1.3576 +  # Not all programs may use this symbol, but it does not hurt to define it.
  1.3577 +
  1.3578 +$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
  1.3579 +
  1.3580 +  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1.3581 +else
  1.3582 +  if test -n "$x_includes"; then
  1.3583 +    X_CFLAGS="$X_CFLAGS -I$x_includes"
  1.3584 +  fi
  1.3585 +
  1.3586 +  # It would also be nice to do this for all -L options, not just this one.
  1.3587 +  if test -n "$x_libraries"; then
  1.3588 +    X_LIBS="$X_LIBS -L$x_libraries"
  1.3589 +    # For Solaris; some versions of Sun CC require a space after -R and
  1.3590 +    # others require no space.  Words are not sufficient . . . .
  1.3591 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
  1.3592 +$as_echo_n "checking whether -R must be followed by a space... " >&6; }
  1.3593 +    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
  1.3594 +    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
  1.3595 +    ac_cxx_werror_flag=yes
  1.3596 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3597 +/* end confdefs.h.  */
  1.3598 +
  1.3599 +int
  1.3600 +main ()
  1.3601 +{
  1.3602 +
  1.3603 +  ;
  1.3604 +  return 0;
  1.3605 +}
  1.3606 +_ACEOF
  1.3607 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3608 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.3609 +$as_echo "no" >&6; }
  1.3610 +       X_LIBS="$X_LIBS -R$x_libraries"
  1.3611 +else
  1.3612 +  LIBS="$ac_xsave_LIBS -R $x_libraries"
  1.3613 +       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3614 +/* end confdefs.h.  */
  1.3615 +
  1.3616 +int
  1.3617 +main ()
  1.3618 +{
  1.3619 +
  1.3620 +  ;
  1.3621 +  return 0;
  1.3622 +}
  1.3623 +_ACEOF
  1.3624 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3625 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.3626 +$as_echo "yes" >&6; }
  1.3627 +	  X_LIBS="$X_LIBS -R $x_libraries"
  1.3628 +else
  1.3629 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
  1.3630 +$as_echo "neither works" >&6; }
  1.3631 +fi
  1.3632 +rm -f core conftest.err conftest.$ac_objext \
  1.3633 +    conftest$ac_exeext conftest.$ac_ext
  1.3634 +fi
  1.3635 +rm -f core conftest.err conftest.$ac_objext \
  1.3636 +    conftest$ac_exeext conftest.$ac_ext
  1.3637 +    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
  1.3638 +    LIBS=$ac_xsave_LIBS
  1.3639 +  fi
  1.3640 +
  1.3641 +  # Check for system-dependent libraries X programs must link with.
  1.3642 +  # Do this before checking for the system-independent R6 libraries
  1.3643 +  # (-lICE), since we may need -lsocket or whatever for X linking.
  1.3644 +
  1.3645 +  if test "$ISC" = yes; then
  1.3646 +    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1.3647 +  else
  1.3648 +    # Martyn Johnson says this is needed for Ultrix, if the X
  1.3649 +    # libraries were built with DECnet support.  And Karl Berry says
  1.3650 +    # the Alpha needs dnet_stub (dnet does not exist).
  1.3651 +    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
  1.3652 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3653 +/* end confdefs.h.  */
  1.3654 +
  1.3655 +/* Override any GCC internal prototype to avoid an error.
  1.3656 +   Use char because int might match the return type of a GCC
  1.3657 +   builtin and then its argument prototype would still apply.  */
  1.3658 +#ifdef __cplusplus
  1.3659 +extern "C"
  1.3660 +#endif
  1.3661 +char XOpenDisplay ();
  1.3662 +int
  1.3663 +main ()
  1.3664 +{
  1.3665 +return XOpenDisplay ();
  1.3666 +  ;
  1.3667 +  return 0;
  1.3668 +}
  1.3669 +_ACEOF
  1.3670 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3671 +
  1.3672 +else
  1.3673 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
  1.3674 +$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
  1.3675 +if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
  1.3676 +  $as_echo_n "(cached) " >&6
  1.3677 +else
  1.3678 +  ac_check_lib_save_LIBS=$LIBS
  1.3679 +LIBS="-ldnet  $LIBS"
  1.3680 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3681 +/* end confdefs.h.  */
  1.3682 +
  1.3683 +/* Override any GCC internal prototype to avoid an error.
  1.3684 +   Use char because int might match the return type of a GCC
  1.3685 +   builtin and then its argument prototype would still apply.  */
  1.3686 +#ifdef __cplusplus
  1.3687 +extern "C"
  1.3688 +#endif
  1.3689 +char dnet_ntoa ();
  1.3690 +int
  1.3691 +main ()
  1.3692 +{
  1.3693 +return dnet_ntoa ();
  1.3694 +  ;
  1.3695 +  return 0;
  1.3696 +}
  1.3697 +_ACEOF
  1.3698 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3699 +  ac_cv_lib_dnet_dnet_ntoa=yes
  1.3700 +else
  1.3701 +  ac_cv_lib_dnet_dnet_ntoa=no
  1.3702 +fi
  1.3703 +rm -f core conftest.err conftest.$ac_objext \
  1.3704 +    conftest$ac_exeext conftest.$ac_ext
  1.3705 +LIBS=$ac_check_lib_save_LIBS
  1.3706 +fi
  1.3707 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
  1.3708 +$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
  1.3709 +if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
  1.3710 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  1.3711 +fi
  1.3712 +
  1.3713 +    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  1.3714 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
  1.3715 +$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
  1.3716 +if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
  1.3717 +  $as_echo_n "(cached) " >&6
  1.3718 +else
  1.3719 +  ac_check_lib_save_LIBS=$LIBS
  1.3720 +LIBS="-ldnet_stub  $LIBS"
  1.3721 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3722 +/* end confdefs.h.  */
  1.3723 +
  1.3724 +/* Override any GCC internal prototype to avoid an error.
  1.3725 +   Use char because int might match the return type of a GCC
  1.3726 +   builtin and then its argument prototype would still apply.  */
  1.3727 +#ifdef __cplusplus
  1.3728 +extern "C"
  1.3729 +#endif
  1.3730 +char dnet_ntoa ();
  1.3731 +int
  1.3732 +main ()
  1.3733 +{
  1.3734 +return dnet_ntoa ();
  1.3735 +  ;
  1.3736 +  return 0;
  1.3737 +}
  1.3738 +_ACEOF
  1.3739 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3740 +  ac_cv_lib_dnet_stub_dnet_ntoa=yes
  1.3741 +else
  1.3742 +  ac_cv_lib_dnet_stub_dnet_ntoa=no
  1.3743 +fi
  1.3744 +rm -f core conftest.err conftest.$ac_objext \
  1.3745 +    conftest$ac_exeext conftest.$ac_ext
  1.3746 +LIBS=$ac_check_lib_save_LIBS
  1.3747 +fi
  1.3748 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
  1.3749 +$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
  1.3750 +if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
  1.3751 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  1.3752 +fi
  1.3753 +
  1.3754 +    fi
  1.3755 +fi
  1.3756 +rm -f core conftest.err conftest.$ac_objext \
  1.3757 +    conftest$ac_exeext conftest.$ac_ext
  1.3758 +    LIBS="$ac_xsave_LIBS"
  1.3759 +
  1.3760 +    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
  1.3761 +    # to get the SysV transport functions.
  1.3762 +    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
  1.3763 +    # needs -lnsl.
  1.3764 +    # The nsl library prevents programs from opening the X display
  1.3765 +    # on Irix 5.2, according to T.E. Dickey.
  1.3766 +    # The functions gethostbyname, getservbyname, and inet_addr are
  1.3767 +    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
  1.3768 +    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
  1.3769 +if test "x$ac_cv_func_gethostbyname" = xyes; then :
  1.3770 +
  1.3771 +fi
  1.3772 +
  1.3773 +    if test $ac_cv_func_gethostbyname = no; then
  1.3774 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
  1.3775 +$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
  1.3776 +if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
  1.3777 +  $as_echo_n "(cached) " >&6
  1.3778 +else
  1.3779 +  ac_check_lib_save_LIBS=$LIBS
  1.3780 +LIBS="-lnsl  $LIBS"
  1.3781 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3782 +/* end confdefs.h.  */
  1.3783 +
  1.3784 +/* Override any GCC internal prototype to avoid an error.
  1.3785 +   Use char because int might match the return type of a GCC
  1.3786 +   builtin and then its argument prototype would still apply.  */
  1.3787 +#ifdef __cplusplus
  1.3788 +extern "C"
  1.3789 +#endif
  1.3790 +char gethostbyname ();
  1.3791 +int
  1.3792 +main ()
  1.3793 +{
  1.3794 +return gethostbyname ();
  1.3795 +  ;
  1.3796 +  return 0;
  1.3797 +}
  1.3798 +_ACEOF
  1.3799 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3800 +  ac_cv_lib_nsl_gethostbyname=yes
  1.3801 +else
  1.3802 +  ac_cv_lib_nsl_gethostbyname=no
  1.3803 +fi
  1.3804 +rm -f core conftest.err conftest.$ac_objext \
  1.3805 +    conftest$ac_exeext conftest.$ac_ext
  1.3806 +LIBS=$ac_check_lib_save_LIBS
  1.3807 +fi
  1.3808 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
  1.3809 +$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
  1.3810 +if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
  1.3811 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  1.3812 +fi
  1.3813 +
  1.3814 +      if test $ac_cv_lib_nsl_gethostbyname = no; then
  1.3815 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
  1.3816 +$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
  1.3817 +if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
  1.3818 +  $as_echo_n "(cached) " >&6
  1.3819 +else
  1.3820 +  ac_check_lib_save_LIBS=$LIBS
  1.3821 +LIBS="-lbsd  $LIBS"
  1.3822 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3823 +/* end confdefs.h.  */
  1.3824 +
  1.3825 +/* Override any GCC internal prototype to avoid an error.
  1.3826 +   Use char because int might match the return type of a GCC
  1.3827 +   builtin and then its argument prototype would still apply.  */
  1.3828 +#ifdef __cplusplus
  1.3829 +extern "C"
  1.3830 +#endif
  1.3831 +char gethostbyname ();
  1.3832 +int
  1.3833 +main ()
  1.3834 +{
  1.3835 +return gethostbyname ();
  1.3836 +  ;
  1.3837 +  return 0;
  1.3838 +}
  1.3839 +_ACEOF
  1.3840 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3841 +  ac_cv_lib_bsd_gethostbyname=yes
  1.3842 +else
  1.3843 +  ac_cv_lib_bsd_gethostbyname=no
  1.3844 +fi
  1.3845 +rm -f core conftest.err conftest.$ac_objext \
  1.3846 +    conftest$ac_exeext conftest.$ac_ext
  1.3847 +LIBS=$ac_check_lib_save_LIBS
  1.3848 +fi
  1.3849 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
  1.3850 +$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
  1.3851 +if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
  1.3852 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
  1.3853 +fi
  1.3854 +
  1.3855 +      fi
  1.3856 +    fi
  1.3857 +
  1.3858 +    # lieder@skyler.mavd.honeywell.com says without -lsocket,
  1.3859 +    # socket/setsockopt and other routines are undefined under SCO ODT
  1.3860 +    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
  1.3861 +    # on later versions), says Simon Leinen: it contains gethostby*
  1.3862 +    # variants that don't use the name server (or something).  -lsocket
  1.3863 +    # must be given before -lnsl if both are needed.  We assume that
  1.3864 +    # if connect needs -lnsl, so does gethostbyname.
  1.3865 +    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
  1.3866 +if test "x$ac_cv_func_connect" = xyes; then :
  1.3867 +
  1.3868 +fi
  1.3869 +
  1.3870 +    if test $ac_cv_func_connect = no; then
  1.3871 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
  1.3872 +$as_echo_n "checking for connect in -lsocket... " >&6; }
  1.3873 +if ${ac_cv_lib_socket_connect+:} false; then :
  1.3874 +  $as_echo_n "(cached) " >&6
  1.3875 +else
  1.3876 +  ac_check_lib_save_LIBS=$LIBS
  1.3877 +LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  1.3878 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3879 +/* end confdefs.h.  */
  1.3880 +
  1.3881 +/* Override any GCC internal prototype to avoid an error.
  1.3882 +   Use char because int might match the return type of a GCC
  1.3883 +   builtin and then its argument prototype would still apply.  */
  1.3884 +#ifdef __cplusplus
  1.3885 +extern "C"
  1.3886 +#endif
  1.3887 +char connect ();
  1.3888 +int
  1.3889 +main ()
  1.3890 +{
  1.3891 +return connect ();
  1.3892 +  ;
  1.3893 +  return 0;
  1.3894 +}
  1.3895 +_ACEOF
  1.3896 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3897 +  ac_cv_lib_socket_connect=yes
  1.3898 +else
  1.3899 +  ac_cv_lib_socket_connect=no
  1.3900 +fi
  1.3901 +rm -f core conftest.err conftest.$ac_objext \
  1.3902 +    conftest$ac_exeext conftest.$ac_ext
  1.3903 +LIBS=$ac_check_lib_save_LIBS
  1.3904 +fi
  1.3905 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
  1.3906 +$as_echo "$ac_cv_lib_socket_connect" >&6; }
  1.3907 +if test "x$ac_cv_lib_socket_connect" = xyes; then :
  1.3908 +  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  1.3909 +fi
  1.3910 +
  1.3911 +    fi
  1.3912 +
  1.3913 +    # Guillermo Gomez says -lposix is necessary on A/UX.
  1.3914 +    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
  1.3915 +if test "x$ac_cv_func_remove" = xyes; then :
  1.3916 +
  1.3917 +fi
  1.3918 +
  1.3919 +    if test $ac_cv_func_remove = no; then
  1.3920 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
  1.3921 +$as_echo_n "checking for remove in -lposix... " >&6; }
  1.3922 +if ${ac_cv_lib_posix_remove+:} false; then :
  1.3923 +  $as_echo_n "(cached) " >&6
  1.3924 +else
  1.3925 +  ac_check_lib_save_LIBS=$LIBS
  1.3926 +LIBS="-lposix  $LIBS"
  1.3927 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3928 +/* end confdefs.h.  */
  1.3929 +
  1.3930 +/* Override any GCC internal prototype to avoid an error.
  1.3931 +   Use char because int might match the return type of a GCC
  1.3932 +   builtin and then its argument prototype would still apply.  */
  1.3933 +#ifdef __cplusplus
  1.3934 +extern "C"
  1.3935 +#endif
  1.3936 +char remove ();
  1.3937 +int
  1.3938 +main ()
  1.3939 +{
  1.3940 +return remove ();
  1.3941 +  ;
  1.3942 +  return 0;
  1.3943 +}
  1.3944 +_ACEOF
  1.3945 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3946 +  ac_cv_lib_posix_remove=yes
  1.3947 +else
  1.3948 +  ac_cv_lib_posix_remove=no
  1.3949 +fi
  1.3950 +rm -f core conftest.err conftest.$ac_objext \
  1.3951 +    conftest$ac_exeext conftest.$ac_ext
  1.3952 +LIBS=$ac_check_lib_save_LIBS
  1.3953 +fi
  1.3954 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
  1.3955 +$as_echo "$ac_cv_lib_posix_remove" >&6; }
  1.3956 +if test "x$ac_cv_lib_posix_remove" = xyes; then :
  1.3957 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  1.3958 +fi
  1.3959 +
  1.3960 +    fi
  1.3961 +
  1.3962 +    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  1.3963 +    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
  1.3964 +if test "x$ac_cv_func_shmat" = xyes; then :
  1.3965 +
  1.3966 +fi
  1.3967 +
  1.3968 +    if test $ac_cv_func_shmat = no; then
  1.3969 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
  1.3970 +$as_echo_n "checking for shmat in -lipc... " >&6; }
  1.3971 +if ${ac_cv_lib_ipc_shmat+:} false; then :
  1.3972 +  $as_echo_n "(cached) " >&6
  1.3973 +else
  1.3974 +  ac_check_lib_save_LIBS=$LIBS
  1.3975 +LIBS="-lipc  $LIBS"
  1.3976 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.3977 +/* end confdefs.h.  */
  1.3978 +
  1.3979 +/* Override any GCC internal prototype to avoid an error.
  1.3980 +   Use char because int might match the return type of a GCC
  1.3981 +   builtin and then its argument prototype would still apply.  */
  1.3982 +#ifdef __cplusplus
  1.3983 +extern "C"
  1.3984 +#endif
  1.3985 +char shmat ();
  1.3986 +int
  1.3987 +main ()
  1.3988 +{
  1.3989 +return shmat ();
  1.3990 +  ;
  1.3991 +  return 0;
  1.3992 +}
  1.3993 +_ACEOF
  1.3994 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.3995 +  ac_cv_lib_ipc_shmat=yes
  1.3996 +else
  1.3997 +  ac_cv_lib_ipc_shmat=no
  1.3998 +fi
  1.3999 +rm -f core conftest.err conftest.$ac_objext \
  1.4000 +    conftest$ac_exeext conftest.$ac_ext
  1.4001 +LIBS=$ac_check_lib_save_LIBS
  1.4002 +fi
  1.4003 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
  1.4004 +$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
  1.4005 +if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
  1.4006 +  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  1.4007 +fi
  1.4008 +
  1.4009 +    fi
  1.4010 +  fi
  1.4011 +
  1.4012 +  # Check for libraries that X11R6 Xt/Xaw programs need.
  1.4013 +  ac_save_LDFLAGS=$LDFLAGS
  1.4014 +  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  1.4015 +  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  1.4016 +  # check for ICE first), but we must link in the order -lSM -lICE or
  1.4017 +  # we get undefined symbols.  So assume we have SM if we have ICE.
  1.4018 +  # These have to be linked with before -lX11, unlike the other
  1.4019 +  # libraries we check for below, so use a different variable.
  1.4020 +  # John Interrante, Karl Berry
  1.4021 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
  1.4022 +$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
  1.4023 +if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
  1.4024 +  $as_echo_n "(cached) " >&6
  1.4025 +else
  1.4026 +  ac_check_lib_save_LIBS=$LIBS
  1.4027 +LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  1.4028 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.4029 +/* end confdefs.h.  */
  1.4030 +
  1.4031 +/* Override any GCC internal prototype to avoid an error.
  1.4032 +   Use char because int might match the return type of a GCC
  1.4033 +   builtin and then its argument prototype would still apply.  */
  1.4034 +#ifdef __cplusplus
  1.4035 +extern "C"
  1.4036 +#endif
  1.4037 +char IceConnectionNumber ();
  1.4038 +int
  1.4039 +main ()
  1.4040 +{
  1.4041 +return IceConnectionNumber ();
  1.4042 +  ;
  1.4043 +  return 0;
  1.4044 +}
  1.4045 +_ACEOF
  1.4046 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.4047 +  ac_cv_lib_ICE_IceConnectionNumber=yes
  1.4048 +else
  1.4049 +  ac_cv_lib_ICE_IceConnectionNumber=no
  1.4050 +fi
  1.4051 +rm -f core conftest.err conftest.$ac_objext \
  1.4052 +    conftest$ac_exeext conftest.$ac_ext
  1.4053 +LIBS=$ac_check_lib_save_LIBS
  1.4054 +fi
  1.4055 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
  1.4056 +$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
  1.4057 +if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
  1.4058 +  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  1.4059 +fi
  1.4060 +
  1.4061 +  LDFLAGS=$ac_save_LDFLAGS
  1.4062 +
  1.4063 +fi
  1.4064 +
  1.4065 +
  1.4066 +  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
  1.4067 +  # this doesn't make sense so we remove it.
  1.4068 +  if test "x$COMPILE_TYPE" = xcross; then
  1.4069 +    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
  1.4070 +  fi
  1.4071 +
  1.4072 +  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
  1.4073 +
  1.4074 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.4075 +  # x11 is the help tag: freetype, cups, pulse, alsa etc
  1.4076 +  MISSING_DEPENDENCY=x11
  1.4077 +
  1.4078 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4079 +    cygwin_help $MISSING_DEPENDENCY
  1.4080 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4081 +    msys_help $MISSING_DEPENDENCY
  1.4082 +  else
  1.4083 +    PKGHANDLER_COMMAND=
  1.4084 +
  1.4085 +    case $PKGHANDLER in
  1.4086 +      apt-get)
  1.4087 +        apt_help     $MISSING_DEPENDENCY ;;
  1.4088 +      yum)
  1.4089 +        yum_help     $MISSING_DEPENDENCY ;;
  1.4090 +      port)
  1.4091 +        port_help    $MISSING_DEPENDENCY ;;
  1.4092 +      pkgutil)
  1.4093 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.4094 +      pkgadd)
  1.4095 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.4096 +      * )
  1.4097 +        break ;;
  1.4098 +    esac
  1.4099 +
  1.4100 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.4101 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.4102 +    fi
  1.4103 +  fi
  1.4104 +
  1.4105 +    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
  1.4106 +  fi
  1.4107 +
  1.4108 +  # Some of the old makefiles require a setting of OPENWIN_HOME
  1.4109 +  # Since the X11R6 directory has disappeared on later Linuxes,
  1.4110 +  # we need to probe for it.
  1.4111 +  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.4112 +    if test -d "$SYS_ROOT/usr/X11R6"; then
  1.4113 +      OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
  1.4114 +    elif test -d "$SYS_ROOT/usr/include/X11"; then
  1.4115 +      OPENWIN_HOME="$SYS_ROOT/usr"
  1.4116 +    fi
  1.4117 +  fi
  1.4118 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.4119 +    OPENWIN_HOME="/usr/openwin"
  1.4120 +  fi
  1.4121 +
  1.4122 +
  1.4123 +
  1.4124 +  #
  1.4125 +  # Weird Sol10 something check...TODO change to try compile
  1.4126 +  #
  1.4127 +  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
  1.4128 +    if test "`uname -r`" = "5.10"; then
  1.4129 +      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
  1.4130 +        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
  1.4131 +      fi
  1.4132 +    fi
  1.4133 +  fi
  1.4134 +
  1.4135 +  ac_ext=c
  1.4136 +ac_cpp='$CPP $CPPFLAGS'
  1.4137 +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.4138 +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.4139 +ac_compiler_gnu=$ac_cv_c_compiler_gnu
  1.4140 +
  1.4141 +  OLD_CFLAGS="$CFLAGS"
  1.4142 +  CFLAGS="$CFLAGS $X_CFLAGS"
  1.4143 +
  1.4144 +  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
  1.4145 +  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
  1.4146 +do :
  1.4147 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  1.4148 +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
  1.4149 +        # include <X11/Xlib.h>
  1.4150 +        # include <X11/Xutil.h>
  1.4151 +
  1.4152 +
  1.4153 +"
  1.4154 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  1.4155 +  cat >>confdefs.h <<_ACEOF
  1.4156 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  1.4157 +_ACEOF
  1.4158 + X11_A_OK=yes
  1.4159 +else
  1.4160 +  X11_A_OK=no; break
  1.4161 +fi
  1.4162 +
  1.4163 +done
  1.4164 +
  1.4165 +
  1.4166 +  CFLAGS="$OLD_CFLAGS"
  1.4167 +  ac_ext=cpp
  1.4168 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.4169 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.4170 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.4171 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.4172 +
  1.4173 +
  1.4174 +  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
  1.4175 +
  1.4176 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.4177 +  # x11 is the help tag: freetype, cups, pulse, alsa etc
  1.4178 +  MISSING_DEPENDENCY=x11
  1.4179 +
  1.4180 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4181 +    cygwin_help $MISSING_DEPENDENCY
  1.4182 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4183 +    msys_help $MISSING_DEPENDENCY
  1.4184 +  else
  1.4185 +    PKGHANDLER_COMMAND=
  1.4186 +
  1.4187 +    case $PKGHANDLER in
  1.4188 +      apt-get)
  1.4189 +        apt_help     $MISSING_DEPENDENCY ;;
  1.4190 +      yum)
  1.4191 +        yum_help     $MISSING_DEPENDENCY ;;
  1.4192 +      port)
  1.4193 +        port_help    $MISSING_DEPENDENCY ;;
  1.4194 +      pkgutil)
  1.4195 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.4196 +      pkgadd)
  1.4197 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.4198 +      * )
  1.4199 +        break ;;
  1.4200 +    esac
  1.4201 +
  1.4202 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.4203 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.4204 +    fi
  1.4205 +  fi
  1.4206 +
  1.4207 +    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
  1.4208 +  fi
  1.4209 +
  1.4210 +
  1.4211 +
  1.4212 +
  1.4213 +
  1.4214 +
  1.4215 +  ###############################################################################
  1.4216 +  #
  1.4217 +  # The common unix printing system cups is used to print from java.
  1.4218 +  #
  1.4219 +
  1.4220 +# Check whether --with-cups was given.
  1.4221 +if test "${with_cups+set}" = set; then :
  1.4222 +  withval=$with_cups;
  1.4223 +fi
  1.4224 +
  1.4225 +
  1.4226 +# Check whether --with-cups-include was given.
  1.4227 +if test "${with_cups_include+set}" = set; then :
  1.4228 +  withval=$with_cups_include;
  1.4229 +fi
  1.4230 +
  1.4231 +
  1.4232 +  if test "x$CUPS_NOT_NEEDED" = xyes; then
  1.4233 +    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
  1.4234 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
  1.4235 +$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
  1.4236 +    fi
  1.4237 +    CUPS_CFLAGS=
  1.4238 +  else
  1.4239 +    CUPS_FOUND=no
  1.4240 +
  1.4241 +    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
  1.4242 +      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
  1.4243 +    fi
  1.4244 +
  1.4245 +    if test "x${with_cups}" != x; then
  1.4246 +      CUPS_CFLAGS="-I${with_cups}/include"
  1.4247 +      CUPS_FOUND=yes
  1.4248 +    fi
  1.4249 +    if test "x${with_cups_include}" != x; then
  1.4250 +      CUPS_CFLAGS="-I${with_cups_include}"
  1.4251 +      CUPS_FOUND=yes
  1.4252 +    fi
  1.4253 +    if test "x$CUPS_FOUND" = xno; then
  1.4254 +
  1.4255 +
  1.4256 +  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.4257 +    # Source the builddeps file again, to make sure it uses the latest variables!
  1.4258 +    . $builddepsfile
  1.4259 +    # Look for a target and build machine specific resource!
  1.4260 +    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.4261 +    if test "x$resource" = x; then
  1.4262 +      # Ok, lets instead look for a target specific resource
  1.4263 +      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
  1.4264 +    fi
  1.4265 +    if test "x$resource" = x; then
  1.4266 +      # Ok, lets instead look for a build specific resource
  1.4267 +      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
  1.4268 +    fi
  1.4269 +    if test "x$resource" = x; then
  1.4270 +      # Ok, lets instead look for a generic resource
  1.4271 +      # (The cups comes from M4 and not the shell, thus no need for eval here.)
  1.4272 +      resource=${builddep_cups}
  1.4273 +    fi
  1.4274 +    if test "x$resource" != x; then
  1.4275 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
  1.4276 +$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
  1.4277 +      # If the resource in the builddeps.conf file is an existing directory,
  1.4278 +      # for example /java/linux/cups
  1.4279 +      if test -d ${resource}; then
  1.4280 +        depdir=${resource}
  1.4281 +      else
  1.4282 +
  1.4283 +  # cups is for example mymodule
  1.4284 +  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.4285 +  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.4286 +  # $with_builddeps_dir is for example /localhome/builddeps
  1.4287 +  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.4288 +  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.4289 +  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.4290 +  filename=`basename $resource`
  1.4291 +  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.4292 +  filebase=${filename%%.*}
  1.4293 +  extension=${filename#*.}
  1.4294 +  installdir=$with_builddeps_dir/$filebase
  1.4295 +  if test ! -f $installdir/$filename.unpacked; then
  1.4296 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.4297 +$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.4298 +    if test ! -d $installdir; then
  1.4299 +      mkdir -p $installdir
  1.4300 +    fi
  1.4301 +    if test ! -d $installdir; then
  1.4302 +      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.4303 +    fi
  1.4304 +    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
  1.4305 +    touch $tmpfile
  1.4306 +    if test ! -f $tmpfile; then
  1.4307 +      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.4308 +    fi
  1.4309 +
  1.4310 +  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.4311 +  # $tmpfile is the local file name for the downloaded file.
  1.4312 +  VALID_TOOL=no
  1.4313 +  if test "x$BDEPS_FTP" = xwget; then
  1.4314 +    VALID_TOOL=yes
  1.4315 +    wget -O $tmpfile $with_builddeps_server/$resource
  1.4316 +  fi
  1.4317 +  if test "x$BDEPS_FTP" = xlftp; then
  1.4318 +    VALID_TOOL=yes
  1.4319 +    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.4320 +  fi
  1.4321 +  if test "x$BDEPS_FTP" = xftp; then
  1.4322 +    VALID_TOOL=yes
  1.4323 +    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.4324 +    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.4325 +    FTPUSERPWD=${FTPSERVER%%@*}
  1.4326 +    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.4327 +      FTPUSER=${userpwd%%:*}
  1.4328 +      FTPPWD=${userpwd#*@}
  1.4329 +      FTPSERVER=${FTPSERVER#*@}
  1.4330 +    else
  1.4331 +      FTPUSER=ftp
  1.4332 +      FTPPWD=ftp
  1.4333 +    fi
  1.4334 +    # the "pass" command does not work on some
  1.4335 +    # ftp clients (read ftp.exe) but if it works,
  1.4336 +    # passive mode is better!
  1.4337 +    ( \
  1.4338 +        echo "user $FTPUSER $FTPPWD"        ; \
  1.4339 +        echo "pass"                         ; \
  1.4340 +        echo "bin"                          ; \
  1.4341 +        echo "get $FTPPATH $tmpfile"              ; \
  1.4342 +    ) | ftp -in $FTPSERVER
  1.4343 +  fi
  1.4344 +  if test "x$VALID_TOOL" != xyes; then
  1.4345 +    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.4346 +  fi
  1.4347 +
  1.4348 +    mv $tmpfile $installdir/$filename
  1.4349 +    if test ! -s $installdir/$filename; then
  1.4350 +      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.4351 +    fi
  1.4352 +    case "$extension" in
  1.4353 +      zip)  echo "Unzipping $installdir/$filename..."
  1.4354 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.4355 +        ;;
  1.4356 +      tar.gz) echo "Untaring $installdir/$filename..."
  1.4357 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.4358 +        ;;
  1.4359 +      tgz) echo "Untaring $installdir/$filename..."
  1.4360 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.4361 +        ;;
  1.4362 +      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.4363 +        ;;
  1.4364 +    esac
  1.4365 +  fi
  1.4366 +  if test -f $installdir/$filename.unpacked; then
  1.4367 +    depdir=$installdir
  1.4368 +  fi
  1.4369 +
  1.4370 +      fi
  1.4371 +      # Source the builddeps file again, because in the previous command, the depdir
  1.4372 +      # was updated to point at the current build dependency install directory.
  1.4373 +      . $builddepsfile
  1.4374 +      # Now extract variables from the builddeps.conf files.
  1.4375 +      theroot=${builddep_cups_ROOT}
  1.4376 +      thecflags=${builddep_cups_CFLAGS}
  1.4377 +      thelibs=${builddep_cups_LIBS}
  1.4378 +      if test "x$depdir" = x; then
  1.4379 +        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
  1.4380 +      fi
  1.4381 +      CUPS=$depdir
  1.4382 +      if test "x$theroot" != x; then
  1.4383 +        CUPS="$theroot"
  1.4384 +      fi
  1.4385 +      if test "x$thecflags" != x; then
  1.4386 +        CUPS_CFLAGS="$thecflags"
  1.4387 +      fi
  1.4388 +      if test "x$thelibs" != x; then
  1.4389 +        CUPS_LIBS="$thelibs"
  1.4390 +      fi
  1.4391 +      CUPS_FOUND=yes
  1.4392 +
  1.4393 +    fi
  1.4394 +
  1.4395 +  fi
  1.4396 +
  1.4397 +    fi
  1.4398 +    if test "x$CUPS_FOUND" = xno; then
  1.4399 +      # Are the cups headers installed in the default /usr/include location?
  1.4400 +      for ac_header in cups/cups.h cups/ppd.h
  1.4401 +do :
  1.4402 +  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
  1.4403 +ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
  1.4404 +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  1.4405 +  cat >>confdefs.h <<_ACEOF
  1.4406 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
  1.4407 +_ACEOF
  1.4408 +
  1.4409 +            CUPS_FOUND=yes
  1.4410 +            CUPS_CFLAGS=
  1.4411 +            DEFAULT_CUPS=yes
  1.4412 +
  1.4413 +
  1.4414 +fi
  1.4415 +
  1.4416 +done
  1.4417 +
  1.4418 +    fi
  1.4419 +    if test "x$CUPS_FOUND" = xno; then
  1.4420 +      # Getting nervous now? Lets poke around for standard Solaris third-party
  1.4421 +      # package installation locations.
  1.4422 +      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
  1.4423 +$as_echo_n "checking for cups headers... " >&6; }
  1.4424 +      if test -s /opt/sfw/cups/include/cups/cups.h; then
  1.4425 +        # An SFW package seems to be installed!
  1.4426 +        CUPS_FOUND=yes
  1.4427 +        CUPS_CFLAGS="-I/opt/sfw/cups/include"
  1.4428 +      elif test -s /opt/csw/include/cups/cups.h; then
  1.4429 +        # A CSW package seems to be installed!
  1.4430 +        CUPS_FOUND=yes
  1.4431 +        CUPS_CFLAGS="-I/opt/csw/include"
  1.4432 +      fi
  1.4433 +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
  1.4434 +$as_echo "$CUPS_FOUND" >&6; }
  1.4435 +    fi
  1.4436 +    if test "x$CUPS_FOUND" = xno; then
  1.4437 +
  1.4438 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.4439 +  # cups is the help tag: freetype, cups, pulse, alsa etc
  1.4440 +  MISSING_DEPENDENCY=cups
  1.4441 +
  1.4442 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4443 +    cygwin_help $MISSING_DEPENDENCY
  1.4444 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4445 +    msys_help $MISSING_DEPENDENCY
  1.4446 +  else
  1.4447 +    PKGHANDLER_COMMAND=
  1.4448 +
  1.4449 +    case $PKGHANDLER in
  1.4450 +      apt-get)
  1.4451 +        apt_help     $MISSING_DEPENDENCY ;;
  1.4452 +      yum)
  1.4453 +        yum_help     $MISSING_DEPENDENCY ;;
  1.4454 +      port)
  1.4455 +        port_help    $MISSING_DEPENDENCY ;;
  1.4456 +      pkgutil)
  1.4457 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.4458 +      pkgadd)
  1.4459 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.4460 +      * )
  1.4461 +        break ;;
  1.4462 +    esac
  1.4463 +
  1.4464 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.4465 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.4466 +    fi
  1.4467 +  fi
  1.4468 +
  1.4469 +      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
  1.4470 +    fi
  1.4471 +  fi
  1.4472 +
  1.4473 +
  1.4474 +
  1.4475 +
  1.4476 +
  1.4477 +
  1.4478 +  ###############################################################################
  1.4479 +  #
  1.4480 +  # The ubiquitous freetype library is used to render fonts.
  1.4481 +  #
  1.4482 +
  1.4483 +# Check whether --with-freetype was given.
  1.4484 +if test "${with_freetype+set}" = set; then :
  1.4485 +  withval=$with_freetype;
  1.4486 +fi
  1.4487 +
  1.4488 +
  1.4489 +# Check whether --with-freetype-include was given.
  1.4490 +if test "${with_freetype_include+set}" = set; then :
  1.4491 +  withval=$with_freetype_include;
  1.4492 +fi
  1.4493 +
  1.4494 +
  1.4495 +# Check whether --with-freetype-lib was given.
  1.4496 +if test "${with_freetype_lib+set}" = set; then :
  1.4497 +  withval=$with_freetype_lib;
  1.4498 +fi
  1.4499 +
  1.4500 +  # Check whether --enable-freetype-bundling was given.
  1.4501 +if test "${enable_freetype_bundling+set}" = set; then :
  1.4502 +  enableval=$enable_freetype_bundling;
  1.4503 +fi
  1.4504 +
  1.4505 +
  1.4506 +  FREETYPE_CFLAGS=
  1.4507 +  FREETYPE_LIBS=
  1.4508 +  FREETYPE_BUNDLE_LIB_PATH=
  1.4509 +
  1.4510 +  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
  1.4511 +    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
  1.4512 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
  1.4513 +$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
  1.4514 +    fi
  1.4515 +    if test "x$enable_freetype_bundling" != x; then
  1.4516 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
  1.4517 +$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
  1.4518 +    fi
  1.4519 +  else
  1.4520 +    # freetype is needed to build; go get it!
  1.4521 +
  1.4522 +    BUNDLE_FREETYPE="$enable_freetype_bundling"
  1.4523 +
  1.4524 +    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
  1.4525 +      # User has specified settings
  1.4526 +
  1.4527 +      if test "x$BUNDLE_FREETYPE" = x; then
  1.4528 +        # If not specified, default is to bundle freetype
  1.4529 +        BUNDLE_FREETYPE=yes
  1.4530 +      fi
  1.4531 +
  1.4532 +      if test "x$with_freetype" != x; then
  1.4533 +        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
  1.4534 +        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
  1.4535 +      fi
  1.4536 +
  1.4537 +      # Allow --with-freetype-lib and --with-freetype-include to override
  1.4538 +      if test "x$with_freetype_include" != x; then
  1.4539 +        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
  1.4540 +      fi
  1.4541 +      if test "x$with_freetype_lib" != x; then
  1.4542 +        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
  1.4543 +      fi
  1.4544 +
  1.4545 +      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
  1.4546 +        # Okay, we got it. Check that it works.
  1.4547 +
  1.4548 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.4549 +  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.4550 +  METHOD="--with-freetype"
  1.4551 +
  1.4552 +  # First check if the files exists.
  1.4553 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.4554 +    # We found an arbitrary include file. That's a good sign.
  1.4555 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.4556 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.4557 +    FOUND_FREETYPE=yes
  1.4558 +
  1.4559 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.4560 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.4561 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.4562 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.4563 +      FOUND_FREETYPE=no
  1.4564 +    else
  1.4565 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.4566 +        # On Windows, we will need both .lib and .dll file.
  1.4567 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.4568 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.4569 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.4570 +          FOUND_FREETYPE=no
  1.4571 +        fi
  1.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
  1.4573 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.4574 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.4575 +      fi
  1.4576 +    fi
  1.4577 +  fi
  1.4578 +
  1.4579 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.4580 +
  1.4581 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4582 +
  1.4583 +  # Input might be given as Windows format, start by converting to
  1.4584 +  # unix format.
  1.4585 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.4586 +  new_path=`$CYGPATH -u "$path"`
  1.4587 +
  1.4588 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.4589 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.4590 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.4591 +  # "foo.exe" is OK but "foo" is an error.
  1.4592 +  #
  1.4593 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.4594 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.4595 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.4596 +  if test "x$test_shortpath" = x; then
  1.4597 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.4598 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.4599 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.4600 +  fi
  1.4601 +
  1.4602 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.4603 +  # If so, the updated path is stored in $new_path.
  1.4604 +
  1.4605 +  input_path="$new_path"
  1.4606 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.4607 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.4608 +  # take no chances and rewrite it.
  1.4609 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.4610 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.4611 +  if test "x$has_forbidden_chars" != x; then
  1.4612 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.4613 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.4614 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.4615 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.4616 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.4617 +      # case insensitive, let's make it lowercase to improve readability.
  1.4618 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.4619 +      # Now convert it back to Unix-stile (cygpath)
  1.4620 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.4621 +      new_path="$input_path"
  1.4622 +    fi
  1.4623 +  fi
  1.4624 +
  1.4625 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.4626 +  if test "x$test_cygdrive_prefix" = x; then
  1.4627 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.4628 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.4629 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.4630 +      # a path prefixed by /cygdrive for fixpath to work.
  1.4631 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.4632 +    fi
  1.4633 +  fi
  1.4634 +
  1.4635 +
  1.4636 +  if test "x$path" != "x$new_path"; then
  1.4637 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.4638 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.4639 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.4640 +  fi
  1.4641 +
  1.4642 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4643 +
  1.4644 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.4645 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.4646 +  new_path="$path"
  1.4647 +  if test "x$has_colon" = x; then
  1.4648 +    # Not in mixed or Windows style, start by that.
  1.4649 +    new_path=`cmd //c echo $path`
  1.4650 +  fi
  1.4651 +
  1.4652 +
  1.4653 +  input_path="$new_path"
  1.4654 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.4655 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.4656 +  # take no chances and rewrite it.
  1.4657 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.4658 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.4659 +  if test "x$has_forbidden_chars" != x; then
  1.4660 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.4661 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.4662 +  fi
  1.4663 +
  1.4664 +
  1.4665 +  windows_path="$new_path"
  1.4666 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4667 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.4668 +    new_path="$unix_path"
  1.4669 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4670 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.4671 +    new_path="$unix_path"
  1.4672 +  fi
  1.4673 +
  1.4674 +  if test "x$path" != "x$new_path"; then
  1.4675 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.4676 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.4677 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.4678 +  fi
  1.4679 +
  1.4680 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.4681 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.4682 +
  1.4683 +  else
  1.4684 +    # We're on a posix platform. Hooray! :)
  1.4685 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.4686 +    has_space=`$ECHO "$path" | $GREP " "`
  1.4687 +    if test "x$has_space" != x; then
  1.4688 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.4689 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.4690 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.4691 +    fi
  1.4692 +
  1.4693 +    # Use eval to expand a potential ~
  1.4694 +    eval path="$path"
  1.4695 +    if test ! -f "$path" && test ! -d "$path"; then
  1.4696 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.4697 +    fi
  1.4698 +
  1.4699 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.4700 +  fi
  1.4701 +
  1.4702 +
  1.4703 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4704 +
  1.4705 +  # Input might be given as Windows format, start by converting to
  1.4706 +  # unix format.
  1.4707 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.4708 +  new_path=`$CYGPATH -u "$path"`
  1.4709 +
  1.4710 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.4711 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.4712 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.4713 +  # "foo.exe" is OK but "foo" is an error.
  1.4714 +  #
  1.4715 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.4716 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.4717 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.4718 +  if test "x$test_shortpath" = x; then
  1.4719 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.4720 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.4721 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.4722 +  fi
  1.4723 +
  1.4724 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.4725 +  # If so, the updated path is stored in $new_path.
  1.4726 +
  1.4727 +  input_path="$new_path"
  1.4728 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.4729 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.4730 +  # take no chances and rewrite it.
  1.4731 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.4732 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.4733 +  if test "x$has_forbidden_chars" != x; then
  1.4734 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.4735 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.4736 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.4737 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.4738 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.4739 +      # case insensitive, let's make it lowercase to improve readability.
  1.4740 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.4741 +      # Now convert it back to Unix-stile (cygpath)
  1.4742 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.4743 +      new_path="$input_path"
  1.4744 +    fi
  1.4745 +  fi
  1.4746 +
  1.4747 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.4748 +  if test "x$test_cygdrive_prefix" = x; then
  1.4749 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.4750 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.4751 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.4752 +      # a path prefixed by /cygdrive for fixpath to work.
  1.4753 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.4754 +    fi
  1.4755 +  fi
  1.4756 +
  1.4757 +
  1.4758 +  if test "x$path" != "x$new_path"; then
  1.4759 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.4760 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.4761 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.4762 +  fi
  1.4763 +
  1.4764 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4765 +
  1.4766 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.4767 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.4768 +  new_path="$path"
  1.4769 +  if test "x$has_colon" = x; then
  1.4770 +    # Not in mixed or Windows style, start by that.
  1.4771 +    new_path=`cmd //c echo $path`
  1.4772 +  fi
  1.4773 +
  1.4774 +
  1.4775 +  input_path="$new_path"
  1.4776 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.4777 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.4778 +  # take no chances and rewrite it.
  1.4779 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.4780 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.4781 +  if test "x$has_forbidden_chars" != x; then
  1.4782 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.4783 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.4784 +  fi
  1.4785 +
  1.4786 +
  1.4787 +  windows_path="$new_path"
  1.4788 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.4789 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.4790 +    new_path="$unix_path"
  1.4791 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.4792 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.4793 +    new_path="$unix_path"
  1.4794 +  fi
  1.4795 +
  1.4796 +  if test "x$path" != "x$new_path"; then
  1.4797 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.4798 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.4799 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.4800 +  fi
  1.4801 +
  1.4802 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.4803 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.4804 +
  1.4805 +  else
  1.4806 +    # We're on a posix platform. Hooray! :)
  1.4807 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.4808 +    has_space=`$ECHO "$path" | $GREP " "`
  1.4809 +    if test "x$has_space" != x; then
  1.4810 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.4811 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.4812 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.4813 +    fi
  1.4814 +
  1.4815 +    # Use eval to expand a potential ~
  1.4816 +    eval path="$path"
  1.4817 +    if test ! -f "$path" && test ! -d "$path"; then
  1.4818 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.4819 +    fi
  1.4820 +
  1.4821 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.4822 +  fi
  1.4823 +
  1.4824 +
  1.4825 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.4826 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.4827 +$as_echo_n "checking for freetype includes... " >&6; }
  1.4828 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.4829 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.4830 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.4831 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.4832 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.4833 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.4834 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.4835 +  fi
  1.4836 +
  1.4837 +        if test "x$FOUND_FREETYPE" != xyes; then
  1.4838 +          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
  1.4839 +        fi
  1.4840 +      else
  1.4841 +        # User specified only one of lib or include. This is an error.
  1.4842 +        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
  1.4843 +          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
  1.4844 +$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
  1.4845 +          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
  1.4846 +        else
  1.4847 +          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
  1.4848 +$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
  1.4849 +          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
  1.4850 +        fi
  1.4851 +      fi
  1.4852 +    else
  1.4853 +      # User did not specify settings, but we need freetype. Try to locate it.
  1.4854 +
  1.4855 +      if test "x$BUNDLE_FREETYPE" = x; then
  1.4856 +        # If not specified, default is to bundle freetype only on windows
  1.4857 +        if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.4858 +          BUNDLE_FREETYPE=yes
  1.4859 +        else
  1.4860 +          BUNDLE_FREETYPE=no
  1.4861 +        fi
  1.4862 +      fi
  1.4863 +
  1.4864 +      if test "x$FOUND_FREETYPE" != xyes; then
  1.4865 +        # Check builddeps
  1.4866 +
  1.4867 +
  1.4868 +  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.4869 +    # Source the builddeps file again, to make sure it uses the latest variables!
  1.4870 +    . $builddepsfile
  1.4871 +    # Look for a target and build machine specific resource!
  1.4872 +    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.4873 +    if test "x$resource" = x; then
  1.4874 +      # Ok, lets instead look for a target specific resource
  1.4875 +      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
  1.4876 +    fi
  1.4877 +    if test "x$resource" = x; then
  1.4878 +      # Ok, lets instead look for a build specific resource
  1.4879 +      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
  1.4880 +    fi
  1.4881 +    if test "x$resource" = x; then
  1.4882 +      # Ok, lets instead look for a generic resource
  1.4883 +      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
  1.4884 +      resource=${builddep_freetype2}
  1.4885 +    fi
  1.4886 +    if test "x$resource" != x; then
  1.4887 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
  1.4888 +$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
  1.4889 +      # If the resource in the builddeps.conf file is an existing directory,
  1.4890 +      # for example /java/linux/cups
  1.4891 +      if test -d ${resource}; then
  1.4892 +        depdir=${resource}
  1.4893 +      else
  1.4894 +
  1.4895 +  # freetype2 is for example mymodule
  1.4896 +  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.4897 +  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.4898 +  # $with_builddeps_dir is for example /localhome/builddeps
  1.4899 +  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.4900 +  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.4901 +  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.4902 +  filename=`basename $resource`
  1.4903 +  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.4904 +  filebase=${filename%%.*}
  1.4905 +  extension=${filename#*.}
  1.4906 +  installdir=$with_builddeps_dir/$filebase
  1.4907 +  if test ! -f $installdir/$filename.unpacked; then
  1.4908 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.4909 +$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.4910 +    if test ! -d $installdir; then
  1.4911 +      mkdir -p $installdir
  1.4912 +    fi
  1.4913 +    if test ! -d $installdir; then
  1.4914 +      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.4915 +    fi
  1.4916 +    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
  1.4917 +    touch $tmpfile
  1.4918 +    if test ! -f $tmpfile; then
  1.4919 +      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.4920 +    fi
  1.4921 +
  1.4922 +  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.4923 +  # $tmpfile is the local file name for the downloaded file.
  1.4924 +  VALID_TOOL=no
  1.4925 +  if test "x$BDEPS_FTP" = xwget; then
  1.4926 +    VALID_TOOL=yes
  1.4927 +    wget -O $tmpfile $with_builddeps_server/$resource
  1.4928 +  fi
  1.4929 +  if test "x$BDEPS_FTP" = xlftp; then
  1.4930 +    VALID_TOOL=yes
  1.4931 +    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.4932 +  fi
  1.4933 +  if test "x$BDEPS_FTP" = xftp; then
  1.4934 +    VALID_TOOL=yes
  1.4935 +    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.4936 +    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.4937 +    FTPUSERPWD=${FTPSERVER%%@*}
  1.4938 +    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.4939 +      FTPUSER=${userpwd%%:*}
  1.4940 +      FTPPWD=${userpwd#*@}
  1.4941 +      FTPSERVER=${FTPSERVER#*@}
  1.4942 +    else
  1.4943 +      FTPUSER=ftp
  1.4944 +      FTPPWD=ftp
  1.4945 +    fi
  1.4946 +    # the "pass" command does not work on some
  1.4947 +    # ftp clients (read ftp.exe) but if it works,
  1.4948 +    # passive mode is better!
  1.4949 +    ( \
  1.4950 +        echo "user $FTPUSER $FTPPWD"        ; \
  1.4951 +        echo "pass"                         ; \
  1.4952 +        echo "bin"                          ; \
  1.4953 +        echo "get $FTPPATH $tmpfile"              ; \
  1.4954 +    ) | ftp -in $FTPSERVER
  1.4955 +  fi
  1.4956 +  if test "x$VALID_TOOL" != xyes; then
  1.4957 +    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.4958 +  fi
  1.4959 +
  1.4960 +    mv $tmpfile $installdir/$filename
  1.4961 +    if test ! -s $installdir/$filename; then
  1.4962 +      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.4963 +    fi
  1.4964 +    case "$extension" in
  1.4965 +      zip)  echo "Unzipping $installdir/$filename..."
  1.4966 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.4967 +        ;;
  1.4968 +      tar.gz) echo "Untaring $installdir/$filename..."
  1.4969 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.4970 +        ;;
  1.4971 +      tgz) echo "Untaring $installdir/$filename..."
  1.4972 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.4973 +        ;;
  1.4974 +      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.4975 +        ;;
  1.4976 +    esac
  1.4977 +  fi
  1.4978 +  if test -f $installdir/$filename.unpacked; then
  1.4979 +    depdir=$installdir
  1.4980 +  fi
  1.4981 +
  1.4982 +      fi
  1.4983 +      # Source the builddeps file again, because in the previous command, the depdir
  1.4984 +      # was updated to point at the current build dependency install directory.
  1.4985 +      . $builddepsfile
  1.4986 +      # Now extract variables from the builddeps.conf files.
  1.4987 +      theroot=${builddep_freetype2_ROOT}
  1.4988 +      thecflags=${builddep_freetype2_CFLAGS}
  1.4989 +      thelibs=${builddep_freetype2_LIBS}
  1.4990 +      if test "x$depdir" = x; then
  1.4991 +        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
  1.4992 +      fi
  1.4993 +      FREETYPE=$depdir
  1.4994 +      if test "x$theroot" != x; then
  1.4995 +        FREETYPE="$theroot"
  1.4996 +      fi
  1.4997 +      if test "x$thecflags" != x; then
  1.4998 +        FREETYPE_CFLAGS="$thecflags"
  1.4999 +      fi
  1.5000 +      if test "x$thelibs" != x; then
  1.5001 +        FREETYPE_LIBS="$thelibs"
  1.5002 +      fi
  1.5003 +      FOUND_FREETYPE=yes
  1.5004 +      else FOUND_FREETYPE=no
  1.5005 +
  1.5006 +    fi
  1.5007 +    else FOUND_FREETYPE=no
  1.5008 +
  1.5009 +  fi
  1.5010 +
  1.5011 +        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
  1.5012 +        if test "x$FOUND_FREETYPE" = xyes; then
  1.5013 +          if test "x$BUNDLE_FREETYPE" = xyes; then
  1.5014 +            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
  1.5015 +$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
  1.5016 +            FOUND_FREETYPE=no
  1.5017 +          else
  1.5018 +            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
  1.5019 +$as_echo_n "checking for freetype... " >&6; }
  1.5020 +            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
  1.5021 +$as_echo "yes (using builddeps)" >&6; }
  1.5022 +          fi
  1.5023 +        fi
  1.5024 +      fi
  1.5025 +
  1.5026 +      if test "x$FOUND_FREETYPE" != xyes; then
  1.5027 +        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
  1.5028 +        if test "x$PKG_CONFIG" != x; then
  1.5029 +
  1.5030 +pkg_failed=no
  1.5031 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
  1.5032 +$as_echo_n "checking for FREETYPE... " >&6; }
  1.5033 +
  1.5034 +if test -n "$FREETYPE_CFLAGS"; then
  1.5035 +    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
  1.5036 + elif test -n "$PKG_CONFIG"; then
  1.5037 +    if test -n "$PKG_CONFIG" && \
  1.5038 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  1.5039 +  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  1.5040 +  ac_status=$?
  1.5041 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.5042 +  test $ac_status = 0; }; then
  1.5043 +  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
  1.5044 +else
  1.5045 +  pkg_failed=yes
  1.5046 +fi
  1.5047 + else
  1.5048 +    pkg_failed=untried
  1.5049 +fi
  1.5050 +if test -n "$FREETYPE_LIBS"; then
  1.5051 +    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
  1.5052 + elif test -n "$PKG_CONFIG"; then
  1.5053 +    if test -n "$PKG_CONFIG" && \
  1.5054 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
  1.5055 +  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
  1.5056 +  ac_status=$?
  1.5057 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.5058 +  test $ac_status = 0; }; then
  1.5059 +  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
  1.5060 +else
  1.5061 +  pkg_failed=yes
  1.5062 +fi
  1.5063 + else
  1.5064 +    pkg_failed=untried
  1.5065 +fi
  1.5066 +
  1.5067 +
  1.5068 +
  1.5069 +if test $pkg_failed = yes; then
  1.5070 +
  1.5071 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.5072 +        _pkg_short_errors_supported=yes
  1.5073 +else
  1.5074 +        _pkg_short_errors_supported=no
  1.5075 +fi
  1.5076 +        if test $_pkg_short_errors_supported = yes; then
  1.5077 +	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
  1.5078 +        else
  1.5079 +	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
  1.5080 +        fi
  1.5081 +	# Put the nasty error message in config.log where it belongs
  1.5082 +	echo "$FREETYPE_PKG_ERRORS" >&5
  1.5083 +
  1.5084 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.5085 +$as_echo "no" >&6; }
  1.5086 +                FOUND_FREETYPE=no
  1.5087 +elif test $pkg_failed = untried; then
  1.5088 +	FOUND_FREETYPE=no
  1.5089 +else
  1.5090 +	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
  1.5091 +	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
  1.5092 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.5093 +$as_echo "yes" >&6; }
  1.5094 +	FOUND_FREETYPE=yes
  1.5095 +fi
  1.5096 +          if test "x$FOUND_FREETYPE" = xyes; then
  1.5097 +            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
  1.5098 +            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
  1.5099 +            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
  1.5100 +            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
  1.5101 +              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
  1.5102 +            fi
  1.5103 +            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
  1.5104 +            if test "x$BUNDLE_FREETYPE" = xyes; then
  1.5105 +              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
  1.5106 +$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
  1.5107 +              FOUND_FREETYPE=no
  1.5108 +            else
  1.5109 +              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
  1.5110 +$as_echo_n "checking for freetype... " >&6; }
  1.5111 +              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
  1.5112 +$as_echo "yes (using pkg-config)" >&6; }
  1.5113 +            fi
  1.5114 +          fi
  1.5115 +        fi
  1.5116 +      fi
  1.5117 +
  1.5118 +      if test "x$FOUND_FREETYPE" != xyes; then
  1.5119 +        # Check in well-known locations
  1.5120 +        if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.5121 +          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
  1.5122 +
  1.5123 +  windows_path="$FREETYPE_BASE_DIR"
  1.5124 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5125 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5126 +    FREETYPE_BASE_DIR="$unix_path"
  1.5127 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5128 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5129 +    FREETYPE_BASE_DIR="$unix_path"
  1.5130 +  fi
  1.5131 +
  1.5132 +
  1.5133 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.5134 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  1.5135 +  METHOD="well-known location"
  1.5136 +
  1.5137 +  # First check if the files exists.
  1.5138 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.5139 +    # We found an arbitrary include file. That's a good sign.
  1.5140 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.5141 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.5142 +    FOUND_FREETYPE=yes
  1.5143 +
  1.5144 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.5145 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.5146 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.5147 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.5148 +      FOUND_FREETYPE=no
  1.5149 +    else
  1.5150 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.5151 +        # On Windows, we will need both .lib and .dll file.
  1.5152 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.5153 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.5154 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.5155 +          FOUND_FREETYPE=no
  1.5156 +        fi
  1.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
  1.5158 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.5159 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.5160 +      fi
  1.5161 +    fi
  1.5162 +  fi
  1.5163 +
  1.5164 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.5165 +
  1.5166 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5167 +
  1.5168 +  # Input might be given as Windows format, start by converting to
  1.5169 +  # unix format.
  1.5170 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5171 +  new_path=`$CYGPATH -u "$path"`
  1.5172 +
  1.5173 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5174 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5175 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5176 +  # "foo.exe" is OK but "foo" is an error.
  1.5177 +  #
  1.5178 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5179 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5180 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5181 +  if test "x$test_shortpath" = x; then
  1.5182 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5183 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5184 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.5185 +  fi
  1.5186 +
  1.5187 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5188 +  # If so, the updated path is stored in $new_path.
  1.5189 +
  1.5190 +  input_path="$new_path"
  1.5191 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5192 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5193 +  # take no chances and rewrite it.
  1.5194 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5195 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5196 +  if test "x$has_forbidden_chars" != x; then
  1.5197 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5198 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5199 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5200 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5201 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5202 +      # case insensitive, let's make it lowercase to improve readability.
  1.5203 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5204 +      # Now convert it back to Unix-stile (cygpath)
  1.5205 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5206 +      new_path="$input_path"
  1.5207 +    fi
  1.5208 +  fi
  1.5209 +
  1.5210 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5211 +  if test "x$test_cygdrive_prefix" = x; then
  1.5212 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5213 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5214 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5215 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5216 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5217 +    fi
  1.5218 +  fi
  1.5219 +
  1.5220 +
  1.5221 +  if test "x$path" != "x$new_path"; then
  1.5222 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5223 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5224 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5225 +  fi
  1.5226 +
  1.5227 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5228 +
  1.5229 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5230 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5231 +  new_path="$path"
  1.5232 +  if test "x$has_colon" = x; then
  1.5233 +    # Not in mixed or Windows style, start by that.
  1.5234 +    new_path=`cmd //c echo $path`
  1.5235 +  fi
  1.5236 +
  1.5237 +
  1.5238 +  input_path="$new_path"
  1.5239 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5240 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5241 +  # take no chances and rewrite it.
  1.5242 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5243 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5244 +  if test "x$has_forbidden_chars" != x; then
  1.5245 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5246 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5247 +  fi
  1.5248 +
  1.5249 +
  1.5250 +  windows_path="$new_path"
  1.5251 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5252 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5253 +    new_path="$unix_path"
  1.5254 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5255 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5256 +    new_path="$unix_path"
  1.5257 +  fi
  1.5258 +
  1.5259 +  if test "x$path" != "x$new_path"; then
  1.5260 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5261 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5262 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5263 +  fi
  1.5264 +
  1.5265 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5266 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5267 +
  1.5268 +  else
  1.5269 +    # We're on a posix platform. Hooray! :)
  1.5270 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5271 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5272 +    if test "x$has_space" != x; then
  1.5273 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5274 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5275 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5276 +    fi
  1.5277 +
  1.5278 +    # Use eval to expand a potential ~
  1.5279 +    eval path="$path"
  1.5280 +    if test ! -f "$path" && test ! -d "$path"; then
  1.5281 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.5282 +    fi
  1.5283 +
  1.5284 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.5285 +  fi
  1.5286 +
  1.5287 +
  1.5288 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5289 +
  1.5290 +  # Input might be given as Windows format, start by converting to
  1.5291 +  # unix format.
  1.5292 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5293 +  new_path=`$CYGPATH -u "$path"`
  1.5294 +
  1.5295 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5296 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5297 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5298 +  # "foo.exe" is OK but "foo" is an error.
  1.5299 +  #
  1.5300 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5301 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5302 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5303 +  if test "x$test_shortpath" = x; then
  1.5304 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5305 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5306 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.5307 +  fi
  1.5308 +
  1.5309 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5310 +  # If so, the updated path is stored in $new_path.
  1.5311 +
  1.5312 +  input_path="$new_path"
  1.5313 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5314 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5315 +  # take no chances and rewrite it.
  1.5316 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5317 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5318 +  if test "x$has_forbidden_chars" != x; then
  1.5319 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5320 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5321 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5322 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5323 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5324 +      # case insensitive, let's make it lowercase to improve readability.
  1.5325 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5326 +      # Now convert it back to Unix-stile (cygpath)
  1.5327 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5328 +      new_path="$input_path"
  1.5329 +    fi
  1.5330 +  fi
  1.5331 +
  1.5332 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5333 +  if test "x$test_cygdrive_prefix" = x; then
  1.5334 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5335 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5336 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5337 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5338 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5339 +    fi
  1.5340 +  fi
  1.5341 +
  1.5342 +
  1.5343 +  if test "x$path" != "x$new_path"; then
  1.5344 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5345 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5346 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5347 +  fi
  1.5348 +
  1.5349 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5350 +
  1.5351 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5352 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5353 +  new_path="$path"
  1.5354 +  if test "x$has_colon" = x; then
  1.5355 +    # Not in mixed or Windows style, start by that.
  1.5356 +    new_path=`cmd //c echo $path`
  1.5357 +  fi
  1.5358 +
  1.5359 +
  1.5360 +  input_path="$new_path"
  1.5361 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5362 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5363 +  # take no chances and rewrite it.
  1.5364 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5365 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5366 +  if test "x$has_forbidden_chars" != x; then
  1.5367 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5368 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5369 +  fi
  1.5370 +
  1.5371 +
  1.5372 +  windows_path="$new_path"
  1.5373 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5374 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5375 +    new_path="$unix_path"
  1.5376 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5377 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5378 +    new_path="$unix_path"
  1.5379 +  fi
  1.5380 +
  1.5381 +  if test "x$path" != "x$new_path"; then
  1.5382 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5383 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5384 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5385 +  fi
  1.5386 +
  1.5387 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5388 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5389 +
  1.5390 +  else
  1.5391 +    # We're on a posix platform. Hooray! :)
  1.5392 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5393 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5394 +    if test "x$has_space" != x; then
  1.5395 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5396 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5397 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5398 +    fi
  1.5399 +
  1.5400 +    # Use eval to expand a potential ~
  1.5401 +    eval path="$path"
  1.5402 +    if test ! -f "$path" && test ! -d "$path"; then
  1.5403 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.5404 +    fi
  1.5405 +
  1.5406 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.5407 +  fi
  1.5408 +
  1.5409 +
  1.5410 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5411 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.5412 +$as_echo_n "checking for freetype includes... " >&6; }
  1.5413 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.5414 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.5415 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5416 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.5417 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.5418 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.5419 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.5420 +  fi
  1.5421 +
  1.5422 +          if test "x$FOUND_FREETYPE" != xyes; then
  1.5423 +            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
  1.5424 +
  1.5425 +  windows_path="$FREETYPE_BASE_DIR"
  1.5426 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5427 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5428 +    FREETYPE_BASE_DIR="$unix_path"
  1.5429 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5430 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5431 +    FREETYPE_BASE_DIR="$unix_path"
  1.5432 +  fi
  1.5433 +
  1.5434 +
  1.5435 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.5436 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  1.5437 +  METHOD="well-known location"
  1.5438 +
  1.5439 +  # First check if the files exists.
  1.5440 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.5441 +    # We found an arbitrary include file. That's a good sign.
  1.5442 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.5443 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.5444 +    FOUND_FREETYPE=yes
  1.5445 +
  1.5446 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.5447 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.5448 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.5449 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.5450 +      FOUND_FREETYPE=no
  1.5451 +    else
  1.5452 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.5453 +        # On Windows, we will need both .lib and .dll file.
  1.5454 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.5455 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.5456 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.5457 +          FOUND_FREETYPE=no
  1.5458 +        fi
  1.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
  1.5460 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.5461 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.5462 +      fi
  1.5463 +    fi
  1.5464 +  fi
  1.5465 +
  1.5466 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.5467 +
  1.5468 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5469 +
  1.5470 +  # Input might be given as Windows format, start by converting to
  1.5471 +  # unix format.
  1.5472 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5473 +  new_path=`$CYGPATH -u "$path"`
  1.5474 +
  1.5475 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5476 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5477 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5478 +  # "foo.exe" is OK but "foo" is an error.
  1.5479 +  #
  1.5480 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5481 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5482 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5483 +  if test "x$test_shortpath" = x; then
  1.5484 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5485 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5486 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.5487 +  fi
  1.5488 +
  1.5489 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5490 +  # If so, the updated path is stored in $new_path.
  1.5491 +
  1.5492 +  input_path="$new_path"
  1.5493 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5494 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5495 +  # take no chances and rewrite it.
  1.5496 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5497 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5498 +  if test "x$has_forbidden_chars" != x; then
  1.5499 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5500 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5501 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5502 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5503 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5504 +      # case insensitive, let's make it lowercase to improve readability.
  1.5505 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5506 +      # Now convert it back to Unix-stile (cygpath)
  1.5507 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5508 +      new_path="$input_path"
  1.5509 +    fi
  1.5510 +  fi
  1.5511 +
  1.5512 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5513 +  if test "x$test_cygdrive_prefix" = x; then
  1.5514 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5515 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5516 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5517 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5518 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5519 +    fi
  1.5520 +  fi
  1.5521 +
  1.5522 +
  1.5523 +  if test "x$path" != "x$new_path"; then
  1.5524 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5525 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5526 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5527 +  fi
  1.5528 +
  1.5529 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5530 +
  1.5531 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5532 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5533 +  new_path="$path"
  1.5534 +  if test "x$has_colon" = x; then
  1.5535 +    # Not in mixed or Windows style, start by that.
  1.5536 +    new_path=`cmd //c echo $path`
  1.5537 +  fi
  1.5538 +
  1.5539 +
  1.5540 +  input_path="$new_path"
  1.5541 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5542 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5543 +  # take no chances and rewrite it.
  1.5544 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5545 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5546 +  if test "x$has_forbidden_chars" != x; then
  1.5547 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5548 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5549 +  fi
  1.5550 +
  1.5551 +
  1.5552 +  windows_path="$new_path"
  1.5553 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5554 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5555 +    new_path="$unix_path"
  1.5556 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5557 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5558 +    new_path="$unix_path"
  1.5559 +  fi
  1.5560 +
  1.5561 +  if test "x$path" != "x$new_path"; then
  1.5562 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5563 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5564 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5565 +  fi
  1.5566 +
  1.5567 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5568 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5569 +
  1.5570 +  else
  1.5571 +    # We're on a posix platform. Hooray! :)
  1.5572 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5573 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5574 +    if test "x$has_space" != x; then
  1.5575 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5576 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5577 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5578 +    fi
  1.5579 +
  1.5580 +    # Use eval to expand a potential ~
  1.5581 +    eval path="$path"
  1.5582 +    if test ! -f "$path" && test ! -d "$path"; then
  1.5583 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.5584 +    fi
  1.5585 +
  1.5586 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.5587 +  fi
  1.5588 +
  1.5589 +
  1.5590 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5591 +
  1.5592 +  # Input might be given as Windows format, start by converting to
  1.5593 +  # unix format.
  1.5594 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5595 +  new_path=`$CYGPATH -u "$path"`
  1.5596 +
  1.5597 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5598 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5599 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5600 +  # "foo.exe" is OK but "foo" is an error.
  1.5601 +  #
  1.5602 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5603 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5604 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5605 +  if test "x$test_shortpath" = x; then
  1.5606 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5607 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5608 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.5609 +  fi
  1.5610 +
  1.5611 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5612 +  # If so, the updated path is stored in $new_path.
  1.5613 +
  1.5614 +  input_path="$new_path"
  1.5615 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5616 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5617 +  # take no chances and rewrite it.
  1.5618 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5619 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5620 +  if test "x$has_forbidden_chars" != x; then
  1.5621 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5622 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5623 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5624 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5625 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5626 +      # case insensitive, let's make it lowercase to improve readability.
  1.5627 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5628 +      # Now convert it back to Unix-stile (cygpath)
  1.5629 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5630 +      new_path="$input_path"
  1.5631 +    fi
  1.5632 +  fi
  1.5633 +
  1.5634 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5635 +  if test "x$test_cygdrive_prefix" = x; then
  1.5636 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5637 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5638 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5639 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5640 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5641 +    fi
  1.5642 +  fi
  1.5643 +
  1.5644 +
  1.5645 +  if test "x$path" != "x$new_path"; then
  1.5646 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5647 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5648 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5649 +  fi
  1.5650 +
  1.5651 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5652 +
  1.5653 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5654 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5655 +  new_path="$path"
  1.5656 +  if test "x$has_colon" = x; then
  1.5657 +    # Not in mixed or Windows style, start by that.
  1.5658 +    new_path=`cmd //c echo $path`
  1.5659 +  fi
  1.5660 +
  1.5661 +
  1.5662 +  input_path="$new_path"
  1.5663 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5664 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5665 +  # take no chances and rewrite it.
  1.5666 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5667 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5668 +  if test "x$has_forbidden_chars" != x; then
  1.5669 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5670 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5671 +  fi
  1.5672 +
  1.5673 +
  1.5674 +  windows_path="$new_path"
  1.5675 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5676 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5677 +    new_path="$unix_path"
  1.5678 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5679 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5680 +    new_path="$unix_path"
  1.5681 +  fi
  1.5682 +
  1.5683 +  if test "x$path" != "x$new_path"; then
  1.5684 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5685 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5686 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5687 +  fi
  1.5688 +
  1.5689 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5690 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5691 +
  1.5692 +  else
  1.5693 +    # We're on a posix platform. Hooray! :)
  1.5694 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5695 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5696 +    if test "x$has_space" != x; then
  1.5697 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5698 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5699 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5700 +    fi
  1.5701 +
  1.5702 +    # Use eval to expand a potential ~
  1.5703 +    eval path="$path"
  1.5704 +    if test ! -f "$path" && test ! -d "$path"; then
  1.5705 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.5706 +    fi
  1.5707 +
  1.5708 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.5709 +  fi
  1.5710 +
  1.5711 +
  1.5712 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5713 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.5714 +$as_echo_n "checking for freetype includes... " >&6; }
  1.5715 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.5716 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.5717 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5718 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.5719 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.5720 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.5721 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.5722 +  fi
  1.5723 +
  1.5724 +          fi
  1.5725 +        else
  1.5726 +          if test "x$SYS_ROOT" = "x/"; then
  1.5727 +            FREETYPE_ROOT=
  1.5728 +          else
  1.5729 +            FREETYPE_ROOT="$SYS_ROOT"
  1.5730 +          fi
  1.5731 +          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
  1.5732 +
  1.5733 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.5734 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  1.5735 +  METHOD="well-known location"
  1.5736 +
  1.5737 +  # First check if the files exists.
  1.5738 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.5739 +    # We found an arbitrary include file. That's a good sign.
  1.5740 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.5741 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.5742 +    FOUND_FREETYPE=yes
  1.5743 +
  1.5744 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.5745 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.5746 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.5747 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.5748 +      FOUND_FREETYPE=no
  1.5749 +    else
  1.5750 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.5751 +        # On Windows, we will need both .lib and .dll file.
  1.5752 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.5753 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.5754 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.5755 +          FOUND_FREETYPE=no
  1.5756 +        fi
  1.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
  1.5758 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.5759 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.5760 +      fi
  1.5761 +    fi
  1.5762 +  fi
  1.5763 +
  1.5764 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.5765 +
  1.5766 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5767 +
  1.5768 +  # Input might be given as Windows format, start by converting to
  1.5769 +  # unix format.
  1.5770 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5771 +  new_path=`$CYGPATH -u "$path"`
  1.5772 +
  1.5773 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5774 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5775 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5776 +  # "foo.exe" is OK but "foo" is an error.
  1.5777 +  #
  1.5778 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5779 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5780 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5781 +  if test "x$test_shortpath" = x; then
  1.5782 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5783 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5784 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.5785 +  fi
  1.5786 +
  1.5787 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5788 +  # If so, the updated path is stored in $new_path.
  1.5789 +
  1.5790 +  input_path="$new_path"
  1.5791 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5792 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5793 +  # take no chances and rewrite it.
  1.5794 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5795 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5796 +  if test "x$has_forbidden_chars" != x; then
  1.5797 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5798 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5799 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5800 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5801 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5802 +      # case insensitive, let's make it lowercase to improve readability.
  1.5803 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5804 +      # Now convert it back to Unix-stile (cygpath)
  1.5805 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5806 +      new_path="$input_path"
  1.5807 +    fi
  1.5808 +  fi
  1.5809 +
  1.5810 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5811 +  if test "x$test_cygdrive_prefix" = x; then
  1.5812 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5813 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5814 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5815 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5816 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5817 +    fi
  1.5818 +  fi
  1.5819 +
  1.5820 +
  1.5821 +  if test "x$path" != "x$new_path"; then
  1.5822 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5823 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5824 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5825 +  fi
  1.5826 +
  1.5827 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5828 +
  1.5829 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5830 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5831 +  new_path="$path"
  1.5832 +  if test "x$has_colon" = x; then
  1.5833 +    # Not in mixed or Windows style, start by that.
  1.5834 +    new_path=`cmd //c echo $path`
  1.5835 +  fi
  1.5836 +
  1.5837 +
  1.5838 +  input_path="$new_path"
  1.5839 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5840 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5841 +  # take no chances and rewrite it.
  1.5842 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5843 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5844 +  if test "x$has_forbidden_chars" != x; then
  1.5845 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5846 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5847 +  fi
  1.5848 +
  1.5849 +
  1.5850 +  windows_path="$new_path"
  1.5851 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5852 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5853 +    new_path="$unix_path"
  1.5854 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5855 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5856 +    new_path="$unix_path"
  1.5857 +  fi
  1.5858 +
  1.5859 +  if test "x$path" != "x$new_path"; then
  1.5860 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.5861 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.5862 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.5863 +  fi
  1.5864 +
  1.5865 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5866 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5867 +
  1.5868 +  else
  1.5869 +    # We're on a posix platform. Hooray! :)
  1.5870 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.5871 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5872 +    if test "x$has_space" != x; then
  1.5873 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.5874 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5875 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5876 +    fi
  1.5877 +
  1.5878 +    # Use eval to expand a potential ~
  1.5879 +    eval path="$path"
  1.5880 +    if test ! -f "$path" && test ! -d "$path"; then
  1.5881 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.5882 +    fi
  1.5883 +
  1.5884 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.5885 +  fi
  1.5886 +
  1.5887 +
  1.5888 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5889 +
  1.5890 +  # Input might be given as Windows format, start by converting to
  1.5891 +  # unix format.
  1.5892 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5893 +  new_path=`$CYGPATH -u "$path"`
  1.5894 +
  1.5895 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.5896 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.5897 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.5898 +  # "foo.exe" is OK but "foo" is an error.
  1.5899 +  #
  1.5900 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.5901 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.5902 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.5903 +  if test "x$test_shortpath" = x; then
  1.5904 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5905 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5906 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.5907 +  fi
  1.5908 +
  1.5909 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.5910 +  # If so, the updated path is stored in $new_path.
  1.5911 +
  1.5912 +  input_path="$new_path"
  1.5913 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5914 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5915 +  # take no chances and rewrite it.
  1.5916 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5917 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.5918 +  if test "x$has_forbidden_chars" != x; then
  1.5919 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5920 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.5921 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.5922 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.5923 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.5924 +      # case insensitive, let's make it lowercase to improve readability.
  1.5925 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5926 +      # Now convert it back to Unix-stile (cygpath)
  1.5927 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.5928 +      new_path="$input_path"
  1.5929 +    fi
  1.5930 +  fi
  1.5931 +
  1.5932 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.5933 +  if test "x$test_cygdrive_prefix" = x; then
  1.5934 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.5935 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.5936 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.5937 +      # a path prefixed by /cygdrive for fixpath to work.
  1.5938 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.5939 +    fi
  1.5940 +  fi
  1.5941 +
  1.5942 +
  1.5943 +  if test "x$path" != "x$new_path"; then
  1.5944 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5945 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5946 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5947 +  fi
  1.5948 +
  1.5949 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5950 +
  1.5951 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5952 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.5953 +  new_path="$path"
  1.5954 +  if test "x$has_colon" = x; then
  1.5955 +    # Not in mixed or Windows style, start by that.
  1.5956 +    new_path=`cmd //c echo $path`
  1.5957 +  fi
  1.5958 +
  1.5959 +
  1.5960 +  input_path="$new_path"
  1.5961 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.5962 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.5963 +  # take no chances and rewrite it.
  1.5964 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.5965 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.5966 +  if test "x$has_forbidden_chars" != x; then
  1.5967 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.5968 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.5969 +  fi
  1.5970 +
  1.5971 +
  1.5972 +  windows_path="$new_path"
  1.5973 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.5974 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.5975 +    new_path="$unix_path"
  1.5976 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.5977 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.5978 +    new_path="$unix_path"
  1.5979 +  fi
  1.5980 +
  1.5981 +  if test "x$path" != "x$new_path"; then
  1.5982 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.5983 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.5984 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.5985 +  fi
  1.5986 +
  1.5987 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.5988 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.5989 +
  1.5990 +  else
  1.5991 +    # We're on a posix platform. Hooray! :)
  1.5992 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.5993 +    has_space=`$ECHO "$path" | $GREP " "`
  1.5994 +    if test "x$has_space" != x; then
  1.5995 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.5996 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.5997 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.5998 +    fi
  1.5999 +
  1.6000 +    # Use eval to expand a potential ~
  1.6001 +    eval path="$path"
  1.6002 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6003 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6004 +    fi
  1.6005 +
  1.6006 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6007 +  fi
  1.6008 +
  1.6009 +
  1.6010 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6011 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.6012 +$as_echo_n "checking for freetype includes... " >&6; }
  1.6013 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.6014 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.6015 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6016 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.6017 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.6018 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.6019 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.6020 +  fi
  1.6021 +
  1.6022 +
  1.6023 +          if test "x$FOUND_FREETYPE" != xyes; then
  1.6024 +            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
  1.6025 +
  1.6026 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.6027 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
  1.6028 +  METHOD="well-known location"
  1.6029 +
  1.6030 +  # First check if the files exists.
  1.6031 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.6032 +    # We found an arbitrary include file. That's a good sign.
  1.6033 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.6034 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.6035 +    FOUND_FREETYPE=yes
  1.6036 +
  1.6037 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.6038 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.6039 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.6040 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.6041 +      FOUND_FREETYPE=no
  1.6042 +    else
  1.6043 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.6044 +        # On Windows, we will need both .lib and .dll file.
  1.6045 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.6046 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.6047 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.6048 +          FOUND_FREETYPE=no
  1.6049 +        fi
  1.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
  1.6051 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.6052 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.6053 +      fi
  1.6054 +    fi
  1.6055 +  fi
  1.6056 +
  1.6057 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.6058 +
  1.6059 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6060 +
  1.6061 +  # Input might be given as Windows format, start by converting to
  1.6062 +  # unix format.
  1.6063 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6064 +  new_path=`$CYGPATH -u "$path"`
  1.6065 +
  1.6066 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6067 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6068 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6069 +  # "foo.exe" is OK but "foo" is an error.
  1.6070 +  #
  1.6071 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6072 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6073 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6074 +  if test "x$test_shortpath" = x; then
  1.6075 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6076 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6077 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.6078 +  fi
  1.6079 +
  1.6080 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6081 +  # If so, the updated path is stored in $new_path.
  1.6082 +
  1.6083 +  input_path="$new_path"
  1.6084 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6085 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6086 +  # take no chances and rewrite it.
  1.6087 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6088 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6089 +  if test "x$has_forbidden_chars" != x; then
  1.6090 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6091 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6092 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6093 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6094 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6095 +      # case insensitive, let's make it lowercase to improve readability.
  1.6096 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6097 +      # Now convert it back to Unix-stile (cygpath)
  1.6098 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6099 +      new_path="$input_path"
  1.6100 +    fi
  1.6101 +  fi
  1.6102 +
  1.6103 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6104 +  if test "x$test_cygdrive_prefix" = x; then
  1.6105 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6106 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6107 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6108 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6109 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6110 +    fi
  1.6111 +  fi
  1.6112 +
  1.6113 +
  1.6114 +  if test "x$path" != "x$new_path"; then
  1.6115 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6116 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6117 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6118 +  fi
  1.6119 +
  1.6120 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6121 +
  1.6122 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6123 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6124 +  new_path="$path"
  1.6125 +  if test "x$has_colon" = x; then
  1.6126 +    # Not in mixed or Windows style, start by that.
  1.6127 +    new_path=`cmd //c echo $path`
  1.6128 +  fi
  1.6129 +
  1.6130 +
  1.6131 +  input_path="$new_path"
  1.6132 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6133 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6134 +  # take no chances and rewrite it.
  1.6135 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6136 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6137 +  if test "x$has_forbidden_chars" != x; then
  1.6138 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6139 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6140 +  fi
  1.6141 +
  1.6142 +
  1.6143 +  windows_path="$new_path"
  1.6144 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6145 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6146 +    new_path="$unix_path"
  1.6147 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6148 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6149 +    new_path="$unix_path"
  1.6150 +  fi
  1.6151 +
  1.6152 +  if test "x$path" != "x$new_path"; then
  1.6153 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6154 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6155 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6156 +  fi
  1.6157 +
  1.6158 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6159 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6160 +
  1.6161 +  else
  1.6162 +    # We're on a posix platform. Hooray! :)
  1.6163 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6164 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6165 +    if test "x$has_space" != x; then
  1.6166 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6167 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6168 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6169 +    fi
  1.6170 +
  1.6171 +    # Use eval to expand a potential ~
  1.6172 +    eval path="$path"
  1.6173 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6174 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6175 +    fi
  1.6176 +
  1.6177 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6178 +  fi
  1.6179 +
  1.6180 +
  1.6181 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6182 +
  1.6183 +  # Input might be given as Windows format, start by converting to
  1.6184 +  # unix format.
  1.6185 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6186 +  new_path=`$CYGPATH -u "$path"`
  1.6187 +
  1.6188 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6189 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6190 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6191 +  # "foo.exe" is OK but "foo" is an error.
  1.6192 +  #
  1.6193 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6194 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6195 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6196 +  if test "x$test_shortpath" = x; then
  1.6197 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6198 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6199 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.6200 +  fi
  1.6201 +
  1.6202 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6203 +  # If so, the updated path is stored in $new_path.
  1.6204 +
  1.6205 +  input_path="$new_path"
  1.6206 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6207 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6208 +  # take no chances and rewrite it.
  1.6209 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6210 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6211 +  if test "x$has_forbidden_chars" != x; then
  1.6212 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6213 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6214 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6215 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6216 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6217 +      # case insensitive, let's make it lowercase to improve readability.
  1.6218 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6219 +      # Now convert it back to Unix-stile (cygpath)
  1.6220 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6221 +      new_path="$input_path"
  1.6222 +    fi
  1.6223 +  fi
  1.6224 +
  1.6225 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6226 +  if test "x$test_cygdrive_prefix" = x; then
  1.6227 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6228 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6229 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6230 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6231 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6232 +    fi
  1.6233 +  fi
  1.6234 +
  1.6235 +
  1.6236 +  if test "x$path" != "x$new_path"; then
  1.6237 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6238 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6239 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6240 +  fi
  1.6241 +
  1.6242 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6243 +
  1.6244 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6245 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6246 +  new_path="$path"
  1.6247 +  if test "x$has_colon" = x; then
  1.6248 +    # Not in mixed or Windows style, start by that.
  1.6249 +    new_path=`cmd //c echo $path`
  1.6250 +  fi
  1.6251 +
  1.6252 +
  1.6253 +  input_path="$new_path"
  1.6254 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6255 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6256 +  # take no chances and rewrite it.
  1.6257 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6258 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6259 +  if test "x$has_forbidden_chars" != x; then
  1.6260 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6261 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6262 +  fi
  1.6263 +
  1.6264 +
  1.6265 +  windows_path="$new_path"
  1.6266 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6267 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6268 +    new_path="$unix_path"
  1.6269 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6270 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6271 +    new_path="$unix_path"
  1.6272 +  fi
  1.6273 +
  1.6274 +  if test "x$path" != "x$new_path"; then
  1.6275 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6276 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6277 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6278 +  fi
  1.6279 +
  1.6280 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6281 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6282 +
  1.6283 +  else
  1.6284 +    # We're on a posix platform. Hooray! :)
  1.6285 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6286 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6287 +    if test "x$has_space" != x; then
  1.6288 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6289 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6290 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6291 +    fi
  1.6292 +
  1.6293 +    # Use eval to expand a potential ~
  1.6294 +    eval path="$path"
  1.6295 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6296 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6297 +    fi
  1.6298 +
  1.6299 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6300 +  fi
  1.6301 +
  1.6302 +
  1.6303 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6304 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.6305 +$as_echo_n "checking for freetype includes... " >&6; }
  1.6306 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.6307 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.6308 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6309 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.6310 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.6311 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.6312 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.6313 +  fi
  1.6314 +
  1.6315 +          fi
  1.6316 +
  1.6317 +          if test "x$FOUND_FREETYPE" != xyes; then
  1.6318 +            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
  1.6319 +            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
  1.6320 +
  1.6321 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.6322 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
  1.6323 +  METHOD="well-known location"
  1.6324 +
  1.6325 +  # First check if the files exists.
  1.6326 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.6327 +    # We found an arbitrary include file. That's a good sign.
  1.6328 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.6329 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.6330 +    FOUND_FREETYPE=yes
  1.6331 +
  1.6332 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.6333 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.6334 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.6335 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.6336 +      FOUND_FREETYPE=no
  1.6337 +    else
  1.6338 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.6339 +        # On Windows, we will need both .lib and .dll file.
  1.6340 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.6341 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.6342 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.6343 +          FOUND_FREETYPE=no
  1.6344 +        fi
  1.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
  1.6346 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.6347 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.6348 +      fi
  1.6349 +    fi
  1.6350 +  fi
  1.6351 +
  1.6352 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.6353 +
  1.6354 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6355 +
  1.6356 +  # Input might be given as Windows format, start by converting to
  1.6357 +  # unix format.
  1.6358 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6359 +  new_path=`$CYGPATH -u "$path"`
  1.6360 +
  1.6361 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6362 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6363 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6364 +  # "foo.exe" is OK but "foo" is an error.
  1.6365 +  #
  1.6366 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6367 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6368 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6369 +  if test "x$test_shortpath" = x; then
  1.6370 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6371 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6372 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.6373 +  fi
  1.6374 +
  1.6375 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6376 +  # If so, the updated path is stored in $new_path.
  1.6377 +
  1.6378 +  input_path="$new_path"
  1.6379 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6380 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6381 +  # take no chances and rewrite it.
  1.6382 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6383 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6384 +  if test "x$has_forbidden_chars" != x; then
  1.6385 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6386 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6387 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6388 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6389 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6390 +      # case insensitive, let's make it lowercase to improve readability.
  1.6391 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6392 +      # Now convert it back to Unix-stile (cygpath)
  1.6393 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6394 +      new_path="$input_path"
  1.6395 +    fi
  1.6396 +  fi
  1.6397 +
  1.6398 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6399 +  if test "x$test_cygdrive_prefix" = x; then
  1.6400 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6401 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6402 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6403 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6404 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6405 +    fi
  1.6406 +  fi
  1.6407 +
  1.6408 +
  1.6409 +  if test "x$path" != "x$new_path"; then
  1.6410 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6411 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6412 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6413 +  fi
  1.6414 +
  1.6415 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6416 +
  1.6417 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6418 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6419 +  new_path="$path"
  1.6420 +  if test "x$has_colon" = x; then
  1.6421 +    # Not in mixed or Windows style, start by that.
  1.6422 +    new_path=`cmd //c echo $path`
  1.6423 +  fi
  1.6424 +
  1.6425 +
  1.6426 +  input_path="$new_path"
  1.6427 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6428 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6429 +  # take no chances and rewrite it.
  1.6430 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6431 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6432 +  if test "x$has_forbidden_chars" != x; then
  1.6433 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6434 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6435 +  fi
  1.6436 +
  1.6437 +
  1.6438 +  windows_path="$new_path"
  1.6439 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6440 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6441 +    new_path="$unix_path"
  1.6442 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6443 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6444 +    new_path="$unix_path"
  1.6445 +  fi
  1.6446 +
  1.6447 +  if test "x$path" != "x$new_path"; then
  1.6448 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6449 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6450 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6451 +  fi
  1.6452 +
  1.6453 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6454 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6455 +
  1.6456 +  else
  1.6457 +    # We're on a posix platform. Hooray! :)
  1.6458 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6459 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6460 +    if test "x$has_space" != x; then
  1.6461 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6462 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6463 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6464 +    fi
  1.6465 +
  1.6466 +    # Use eval to expand a potential ~
  1.6467 +    eval path="$path"
  1.6468 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6469 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6470 +    fi
  1.6471 +
  1.6472 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6473 +  fi
  1.6474 +
  1.6475 +
  1.6476 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6477 +
  1.6478 +  # Input might be given as Windows format, start by converting to
  1.6479 +  # unix format.
  1.6480 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6481 +  new_path=`$CYGPATH -u "$path"`
  1.6482 +
  1.6483 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6484 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6485 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6486 +  # "foo.exe" is OK but "foo" is an error.
  1.6487 +  #
  1.6488 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6489 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6490 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6491 +  if test "x$test_shortpath" = x; then
  1.6492 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6493 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6494 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.6495 +  fi
  1.6496 +
  1.6497 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6498 +  # If so, the updated path is stored in $new_path.
  1.6499 +
  1.6500 +  input_path="$new_path"
  1.6501 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6502 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6503 +  # take no chances and rewrite it.
  1.6504 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6505 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6506 +  if test "x$has_forbidden_chars" != x; then
  1.6507 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6508 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6509 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6510 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6511 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6512 +      # case insensitive, let's make it lowercase to improve readability.
  1.6513 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6514 +      # Now convert it back to Unix-stile (cygpath)
  1.6515 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6516 +      new_path="$input_path"
  1.6517 +    fi
  1.6518 +  fi
  1.6519 +
  1.6520 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6521 +  if test "x$test_cygdrive_prefix" = x; then
  1.6522 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6523 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6524 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6525 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6526 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6527 +    fi
  1.6528 +  fi
  1.6529 +
  1.6530 +
  1.6531 +  if test "x$path" != "x$new_path"; then
  1.6532 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6533 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6534 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6535 +  fi
  1.6536 +
  1.6537 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6538 +
  1.6539 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6540 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6541 +  new_path="$path"
  1.6542 +  if test "x$has_colon" = x; then
  1.6543 +    # Not in mixed or Windows style, start by that.
  1.6544 +    new_path=`cmd //c echo $path`
  1.6545 +  fi
  1.6546 +
  1.6547 +
  1.6548 +  input_path="$new_path"
  1.6549 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6550 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6551 +  # take no chances and rewrite it.
  1.6552 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6553 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6554 +  if test "x$has_forbidden_chars" != x; then
  1.6555 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6556 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6557 +  fi
  1.6558 +
  1.6559 +
  1.6560 +  windows_path="$new_path"
  1.6561 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6562 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6563 +    new_path="$unix_path"
  1.6564 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6565 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6566 +    new_path="$unix_path"
  1.6567 +  fi
  1.6568 +
  1.6569 +  if test "x$path" != "x$new_path"; then
  1.6570 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6571 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6572 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6573 +  fi
  1.6574 +
  1.6575 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6576 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6577 +
  1.6578 +  else
  1.6579 +    # We're on a posix platform. Hooray! :)
  1.6580 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6581 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6582 +    if test "x$has_space" != x; then
  1.6583 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6584 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6585 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6586 +    fi
  1.6587 +
  1.6588 +    # Use eval to expand a potential ~
  1.6589 +    eval path="$path"
  1.6590 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6591 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6592 +    fi
  1.6593 +
  1.6594 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6595 +  fi
  1.6596 +
  1.6597 +
  1.6598 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6599 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.6600 +$as_echo_n "checking for freetype includes... " >&6; }
  1.6601 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.6602 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.6603 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6604 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.6605 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.6606 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.6607 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.6608 +  fi
  1.6609 +
  1.6610 +            else
  1.6611 +
  1.6612 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.6613 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
  1.6614 +  METHOD="well-known location"
  1.6615 +
  1.6616 +  # First check if the files exists.
  1.6617 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.6618 +    # We found an arbitrary include file. That's a good sign.
  1.6619 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.6620 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.6621 +    FOUND_FREETYPE=yes
  1.6622 +
  1.6623 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.6624 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.6625 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.6626 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.6627 +      FOUND_FREETYPE=no
  1.6628 +    else
  1.6629 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.6630 +        # On Windows, we will need both .lib and .dll file.
  1.6631 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.6632 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.6633 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.6634 +          FOUND_FREETYPE=no
  1.6635 +        fi
  1.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
  1.6637 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.6638 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.6639 +      fi
  1.6640 +    fi
  1.6641 +  fi
  1.6642 +
  1.6643 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.6644 +
  1.6645 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6646 +
  1.6647 +  # Input might be given as Windows format, start by converting to
  1.6648 +  # unix format.
  1.6649 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6650 +  new_path=`$CYGPATH -u "$path"`
  1.6651 +
  1.6652 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6653 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6654 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6655 +  # "foo.exe" is OK but "foo" is an error.
  1.6656 +  #
  1.6657 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6658 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6659 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6660 +  if test "x$test_shortpath" = x; then
  1.6661 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6662 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6663 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.6664 +  fi
  1.6665 +
  1.6666 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6667 +  # If so, the updated path is stored in $new_path.
  1.6668 +
  1.6669 +  input_path="$new_path"
  1.6670 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6671 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6672 +  # take no chances and rewrite it.
  1.6673 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6674 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6675 +  if test "x$has_forbidden_chars" != x; then
  1.6676 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6677 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6678 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6679 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6680 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6681 +      # case insensitive, let's make it lowercase to improve readability.
  1.6682 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6683 +      # Now convert it back to Unix-stile (cygpath)
  1.6684 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6685 +      new_path="$input_path"
  1.6686 +    fi
  1.6687 +  fi
  1.6688 +
  1.6689 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6690 +  if test "x$test_cygdrive_prefix" = x; then
  1.6691 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6692 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6693 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6694 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6695 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6696 +    fi
  1.6697 +  fi
  1.6698 +
  1.6699 +
  1.6700 +  if test "x$path" != "x$new_path"; then
  1.6701 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6702 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6703 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6704 +  fi
  1.6705 +
  1.6706 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6707 +
  1.6708 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6709 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6710 +  new_path="$path"
  1.6711 +  if test "x$has_colon" = x; then
  1.6712 +    # Not in mixed or Windows style, start by that.
  1.6713 +    new_path=`cmd //c echo $path`
  1.6714 +  fi
  1.6715 +
  1.6716 +
  1.6717 +  input_path="$new_path"
  1.6718 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6719 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6720 +  # take no chances and rewrite it.
  1.6721 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6722 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6723 +  if test "x$has_forbidden_chars" != x; then
  1.6724 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6725 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6726 +  fi
  1.6727 +
  1.6728 +
  1.6729 +  windows_path="$new_path"
  1.6730 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6731 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6732 +    new_path="$unix_path"
  1.6733 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6734 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6735 +    new_path="$unix_path"
  1.6736 +  fi
  1.6737 +
  1.6738 +  if test "x$path" != "x$new_path"; then
  1.6739 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6740 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6741 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6742 +  fi
  1.6743 +
  1.6744 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6745 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6746 +
  1.6747 +  else
  1.6748 +    # We're on a posix platform. Hooray! :)
  1.6749 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6750 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6751 +    if test "x$has_space" != x; then
  1.6752 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6753 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6754 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6755 +    fi
  1.6756 +
  1.6757 +    # Use eval to expand a potential ~
  1.6758 +    eval path="$path"
  1.6759 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6760 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6761 +    fi
  1.6762 +
  1.6763 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6764 +  fi
  1.6765 +
  1.6766 +
  1.6767 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6768 +
  1.6769 +  # Input might be given as Windows format, start by converting to
  1.6770 +  # unix format.
  1.6771 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6772 +  new_path=`$CYGPATH -u "$path"`
  1.6773 +
  1.6774 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6775 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6776 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6777 +  # "foo.exe" is OK but "foo" is an error.
  1.6778 +  #
  1.6779 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6780 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6781 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6782 +  if test "x$test_shortpath" = x; then
  1.6783 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6784 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6785 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.6786 +  fi
  1.6787 +
  1.6788 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6789 +  # If so, the updated path is stored in $new_path.
  1.6790 +
  1.6791 +  input_path="$new_path"
  1.6792 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6793 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6794 +  # take no chances and rewrite it.
  1.6795 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6796 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6797 +  if test "x$has_forbidden_chars" != x; then
  1.6798 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6799 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6800 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6801 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6802 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6803 +      # case insensitive, let's make it lowercase to improve readability.
  1.6804 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6805 +      # Now convert it back to Unix-stile (cygpath)
  1.6806 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6807 +      new_path="$input_path"
  1.6808 +    fi
  1.6809 +  fi
  1.6810 +
  1.6811 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6812 +  if test "x$test_cygdrive_prefix" = x; then
  1.6813 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6814 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6815 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6816 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6817 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6818 +    fi
  1.6819 +  fi
  1.6820 +
  1.6821 +
  1.6822 +  if test "x$path" != "x$new_path"; then
  1.6823 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6824 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6825 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6826 +  fi
  1.6827 +
  1.6828 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6829 +
  1.6830 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6831 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.6832 +  new_path="$path"
  1.6833 +  if test "x$has_colon" = x; then
  1.6834 +    # Not in mixed or Windows style, start by that.
  1.6835 +    new_path=`cmd //c echo $path`
  1.6836 +  fi
  1.6837 +
  1.6838 +
  1.6839 +  input_path="$new_path"
  1.6840 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6841 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6842 +  # take no chances and rewrite it.
  1.6843 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6844 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.6845 +  if test "x$has_forbidden_chars" != x; then
  1.6846 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6847 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6848 +  fi
  1.6849 +
  1.6850 +
  1.6851 +  windows_path="$new_path"
  1.6852 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6853 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.6854 +    new_path="$unix_path"
  1.6855 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6856 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.6857 +    new_path="$unix_path"
  1.6858 +  fi
  1.6859 +
  1.6860 +  if test "x$path" != "x$new_path"; then
  1.6861 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.6862 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.6863 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.6864 +  fi
  1.6865 +
  1.6866 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.6867 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.6868 +
  1.6869 +  else
  1.6870 +    # We're on a posix platform. Hooray! :)
  1.6871 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6872 +    has_space=`$ECHO "$path" | $GREP " "`
  1.6873 +    if test "x$has_space" != x; then
  1.6874 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.6875 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6876 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.6877 +    fi
  1.6878 +
  1.6879 +    # Use eval to expand a potential ~
  1.6880 +    eval path="$path"
  1.6881 +    if test ! -f "$path" && test ! -d "$path"; then
  1.6882 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.6883 +    fi
  1.6884 +
  1.6885 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.6886 +  fi
  1.6887 +
  1.6888 +
  1.6889 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6890 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.6891 +$as_echo_n "checking for freetype includes... " >&6; }
  1.6892 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.6893 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.6894 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.6895 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.6896 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.6897 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.6898 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.6899 +  fi
  1.6900 +
  1.6901 +              if test "x$FOUND_FREETYPE" != xyes; then
  1.6902 +
  1.6903 +  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
  1.6904 +  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
  1.6905 +  METHOD="well-known location"
  1.6906 +
  1.6907 +  # First check if the files exists.
  1.6908 +  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
  1.6909 +    # We found an arbitrary include file. That's a good sign.
  1.6910 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
  1.6911 +$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
  1.6912 +    FOUND_FREETYPE=yes
  1.6913 +
  1.6914 +    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
  1.6915 +    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
  1.6916 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
  1.6917 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
  1.6918 +      FOUND_FREETYPE=no
  1.6919 +    else
  1.6920 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.6921 +        # On Windows, we will need both .lib and .dll file.
  1.6922 +        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
  1.6923 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
  1.6924 +$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
  1.6925 +          FOUND_FREETYPE=no
  1.6926 +        fi
  1.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
  1.6928 +        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
  1.6929 +        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
  1.6930 +      fi
  1.6931 +    fi
  1.6932 +  fi
  1.6933 +
  1.6934 +  if test "x$FOUND_FREETYPE" = xyes; then
  1.6935 +
  1.6936 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.6937 +
  1.6938 +  # Input might be given as Windows format, start by converting to
  1.6939 +  # unix format.
  1.6940 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.6941 +  new_path=`$CYGPATH -u "$path"`
  1.6942 +
  1.6943 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.6944 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.6945 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.6946 +  # "foo.exe" is OK but "foo" is an error.
  1.6947 +  #
  1.6948 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.6949 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.6950 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.6951 +  if test "x$test_shortpath" = x; then
  1.6952 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.6953 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.6954 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.6955 +  fi
  1.6956 +
  1.6957 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.6958 +  # If so, the updated path is stored in $new_path.
  1.6959 +
  1.6960 +  input_path="$new_path"
  1.6961 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.6962 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.6963 +  # take no chances and rewrite it.
  1.6964 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.6965 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.6966 +  if test "x$has_forbidden_chars" != x; then
  1.6967 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.6968 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.6969 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.6970 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.6971 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.6972 +      # case insensitive, let's make it lowercase to improve readability.
  1.6973 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.6974 +      # Now convert it back to Unix-stile (cygpath)
  1.6975 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.6976 +      new_path="$input_path"
  1.6977 +    fi
  1.6978 +  fi
  1.6979 +
  1.6980 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.6981 +  if test "x$test_cygdrive_prefix" = x; then
  1.6982 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.6983 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.6984 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.6985 +      # a path prefixed by /cygdrive for fixpath to work.
  1.6986 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.6987 +    fi
  1.6988 +  fi
  1.6989 +
  1.6990 +
  1.6991 +  if test "x$path" != "x$new_path"; then
  1.6992 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.6993 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.6994 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.6995 +  fi
  1.6996 +
  1.6997 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.6998 +
  1.6999 +  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.7000 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.7001 +  new_path="$path"
  1.7002 +  if test "x$has_colon" = x; then
  1.7003 +    # Not in mixed or Windows style, start by that.
  1.7004 +    new_path=`cmd //c echo $path`
  1.7005 +  fi
  1.7006 +
  1.7007 +
  1.7008 +  input_path="$new_path"
  1.7009 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7010 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7011 +  # take no chances and rewrite it.
  1.7012 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7013 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.7014 +  if test "x$has_forbidden_chars" != x; then
  1.7015 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7016 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7017 +  fi
  1.7018 +
  1.7019 +
  1.7020 +  windows_path="$new_path"
  1.7021 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7022 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.7023 +    new_path="$unix_path"
  1.7024 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7025 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.7026 +    new_path="$unix_path"
  1.7027 +  fi
  1.7028 +
  1.7029 +  if test "x$path" != "x$new_path"; then
  1.7030 +    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
  1.7031 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.7032 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.7033 +  fi
  1.7034 +
  1.7035 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.7036 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.7037 +
  1.7038 +  else
  1.7039 +    # We're on a posix platform. Hooray! :)
  1.7040 +    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.7041 +    has_space=`$ECHO "$path" | $GREP " "`
  1.7042 +    if test "x$has_space" != x; then
  1.7043 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.7044 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7045 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.7046 +    fi
  1.7047 +
  1.7048 +    # Use eval to expand a potential ~
  1.7049 +    eval path="$path"
  1.7050 +    if test ! -f "$path" && test ! -d "$path"; then
  1.7051 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.7052 +    fi
  1.7053 +
  1.7054 +    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.7055 +  fi
  1.7056 +
  1.7057 +
  1.7058 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7059 +
  1.7060 +  # Input might be given as Windows format, start by converting to
  1.7061 +  # unix format.
  1.7062 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.7063 +  new_path=`$CYGPATH -u "$path"`
  1.7064 +
  1.7065 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.7066 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.7067 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.7068 +  # "foo.exe" is OK but "foo" is an error.
  1.7069 +  #
  1.7070 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.7071 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.7072 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.7073 +  if test "x$test_shortpath" = x; then
  1.7074 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.7075 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7076 +    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
  1.7077 +  fi
  1.7078 +
  1.7079 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.7080 +  # If so, the updated path is stored in $new_path.
  1.7081 +
  1.7082 +  input_path="$new_path"
  1.7083 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7084 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7085 +  # take no chances and rewrite it.
  1.7086 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7087 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.7088 +  if test "x$has_forbidden_chars" != x; then
  1.7089 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7090 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.7091 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.7092 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.7093 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.7094 +      # case insensitive, let's make it lowercase to improve readability.
  1.7095 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7096 +      # Now convert it back to Unix-stile (cygpath)
  1.7097 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.7098 +      new_path="$input_path"
  1.7099 +    fi
  1.7100 +  fi
  1.7101 +
  1.7102 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.7103 +  if test "x$test_cygdrive_prefix" = x; then
  1.7104 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.7105 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.7106 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.7107 +      # a path prefixed by /cygdrive for fixpath to work.
  1.7108 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.7109 +    fi
  1.7110 +  fi
  1.7111 +
  1.7112 +
  1.7113 +  if test "x$path" != "x$new_path"; then
  1.7114 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.7115 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.7116 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.7117 +  fi
  1.7118 +
  1.7119 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7120 +
  1.7121 +  path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.7122 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.7123 +  new_path="$path"
  1.7124 +  if test "x$has_colon" = x; then
  1.7125 +    # Not in mixed or Windows style, start by that.
  1.7126 +    new_path=`cmd //c echo $path`
  1.7127 +  fi
  1.7128 +
  1.7129 +
  1.7130 +  input_path="$new_path"
  1.7131 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7132 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7133 +  # take no chances and rewrite it.
  1.7134 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7135 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.7136 +  if test "x$has_forbidden_chars" != x; then
  1.7137 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7138 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7139 +  fi
  1.7140 +
  1.7141 +
  1.7142 +  windows_path="$new_path"
  1.7143 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7144 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.7145 +    new_path="$unix_path"
  1.7146 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7147 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.7148 +    new_path="$unix_path"
  1.7149 +  fi
  1.7150 +
  1.7151 +  if test "x$path" != "x$new_path"; then
  1.7152 +    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
  1.7153 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.7154 +$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.7155 +  fi
  1.7156 +
  1.7157 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.7158 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.7159 +
  1.7160 +  else
  1.7161 +    # We're on a posix platform. Hooray! :)
  1.7162 +    path="$POTENTIAL_FREETYPE_LIB_PATH"
  1.7163 +    has_space=`$ECHO "$path" | $GREP " "`
  1.7164 +    if test "x$has_space" != x; then
  1.7165 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.7166 +$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7167 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.7168 +    fi
  1.7169 +
  1.7170 +    # Use eval to expand a potential ~
  1.7171 +    eval path="$path"
  1.7172 +    if test ! -f "$path" && test ! -d "$path"; then
  1.7173 +      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.7174 +    fi
  1.7175 +
  1.7176 +    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.7177 +  fi
  1.7178 +
  1.7179 +
  1.7180 +    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
  1.7181 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
  1.7182 +$as_echo_n "checking for freetype includes... " >&6; }
  1.7183 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
  1.7184 +$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
  1.7185 +    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
  1.7186 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
  1.7187 +$as_echo_n "checking for freetype libraries... " >&6; }
  1.7188 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
  1.7189 +$as_echo "$FREETYPE_LIB_PATH" >&6; }
  1.7190 +  fi
  1.7191 +
  1.7192 +              fi
  1.7193 +            fi
  1.7194 +          fi
  1.7195 +        fi
  1.7196 +      fi # end check in well-known locations
  1.7197 +
  1.7198 +      if test "x$FOUND_FREETYPE" != xyes; then
  1.7199 +
  1.7200 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.7201 +  # freetype is the help tag: freetype, cups, pulse, alsa etc
  1.7202 +  MISSING_DEPENDENCY=freetype
  1.7203 +
  1.7204 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7205 +    cygwin_help $MISSING_DEPENDENCY
  1.7206 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7207 +    msys_help $MISSING_DEPENDENCY
  1.7208 +  else
  1.7209 +    PKGHANDLER_COMMAND=
  1.7210 +
  1.7211 +    case $PKGHANDLER in
  1.7212 +      apt-get)
  1.7213 +        apt_help     $MISSING_DEPENDENCY ;;
  1.7214 +      yum)
  1.7215 +        yum_help     $MISSING_DEPENDENCY ;;
  1.7216 +      port)
  1.7217 +        port_help    $MISSING_DEPENDENCY ;;
  1.7218 +      pkgutil)
  1.7219 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.7220 +      pkgadd)
  1.7221 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.7222 +      * )
  1.7223 +        break ;;
  1.7224 +    esac
  1.7225 +
  1.7226 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.7227 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.7228 +    fi
  1.7229 +  fi
  1.7230 +
  1.7231 +        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
  1.7232 +      fi
  1.7233 +    fi # end user specified settings
  1.7234 +
  1.7235 +    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
  1.7236 +    if test "x$FREETYPE_CFLAGS" = x; then
  1.7237 +
  1.7238 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7239 +
  1.7240 +  # Input might be given as Windows format, start by converting to
  1.7241 +  # unix format.
  1.7242 +  path="$FREETYPE_INCLUDE_PATH"
  1.7243 +  new_path=`$CYGPATH -u "$path"`
  1.7244 +
  1.7245 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.7246 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.7247 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.7248 +  # "foo.exe" is OK but "foo" is an error.
  1.7249 +  #
  1.7250 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.7251 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.7252 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.7253 +  if test "x$test_shortpath" = x; then
  1.7254 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.7255 +$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7256 +    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
  1.7257 +  fi
  1.7258 +
  1.7259 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.7260 +  # If so, the updated path is stored in $new_path.
  1.7261 +
  1.7262 +  input_path="$new_path"
  1.7263 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7264 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7265 +  # take no chances and rewrite it.
  1.7266 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7267 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.7268 +  if test "x$has_forbidden_chars" != x; then
  1.7269 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7270 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.7271 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.7272 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.7273 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.7274 +      # case insensitive, let's make it lowercase to improve readability.
  1.7275 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7276 +      # Now convert it back to Unix-stile (cygpath)
  1.7277 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.7278 +      new_path="$input_path"
  1.7279 +    fi
  1.7280 +  fi
  1.7281 +
  1.7282 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.7283 +  if test "x$test_cygdrive_prefix" = x; then
  1.7284 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.7285 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.7286 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.7287 +      # a path prefixed by /cygdrive for fixpath to work.
  1.7288 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.7289 +    fi
  1.7290 +  fi
  1.7291 +
  1.7292 +
  1.7293 +  if test "x$path" != "x$new_path"; then
  1.7294 +    FREETYPE_INCLUDE_PATH="$new_path"
  1.7295 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.7296 +$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.7297 +  fi
  1.7298 +
  1.7299 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7300 +
  1.7301 +  path="$FREETYPE_INCLUDE_PATH"
  1.7302 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.7303 +  new_path="$path"
  1.7304 +  if test "x$has_colon" = x; then
  1.7305 +    # Not in mixed or Windows style, start by that.
  1.7306 +    new_path=`cmd //c echo $path`
  1.7307 +  fi
  1.7308 +
  1.7309 +
  1.7310 +  input_path="$new_path"
  1.7311 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7312 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7313 +  # take no chances and rewrite it.
  1.7314 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7315 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.7316 +  if test "x$has_forbidden_chars" != x; then
  1.7317 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7318 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7319 +  fi
  1.7320 +
  1.7321 +
  1.7322 +  windows_path="$new_path"
  1.7323 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7324 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.7325 +    new_path="$unix_path"
  1.7326 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7327 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.7328 +    new_path="$unix_path"
  1.7329 +  fi
  1.7330 +
  1.7331 +  if test "x$path" != "x$new_path"; then
  1.7332 +    FREETYPE_INCLUDE_PATH="$new_path"
  1.7333 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
  1.7334 +$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
  1.7335 +  fi
  1.7336 +
  1.7337 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.7338 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.7339 +
  1.7340 +  else
  1.7341 +    # We're on a posix platform. Hooray! :)
  1.7342 +    path="$FREETYPE_INCLUDE_PATH"
  1.7343 +    has_space=`$ECHO "$path" | $GREP " "`
  1.7344 +    if test "x$has_space" != x; then
  1.7345 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
  1.7346 +$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7347 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.7348 +    fi
  1.7349 +
  1.7350 +    # Use eval to expand a potential ~
  1.7351 +    eval path="$path"
  1.7352 +    if test ! -f "$path" && test ! -d "$path"; then
  1.7353 +      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.7354 +    fi
  1.7355 +
  1.7356 +    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.7357 +  fi
  1.7358 +
  1.7359 +      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
  1.7360 +        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
  1.7361 +      else
  1.7362 +        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
  1.7363 +      fi
  1.7364 +    fi
  1.7365 +
  1.7366 +    if test "x$FREETYPE_LIBS" = x; then
  1.7367 +
  1.7368 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7369 +
  1.7370 +  # Input might be given as Windows format, start by converting to
  1.7371 +  # unix format.
  1.7372 +  path="$FREETYPE_LIB_PATH"
  1.7373 +  new_path=`$CYGPATH -u "$path"`
  1.7374 +
  1.7375 +  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
  1.7376 +  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
  1.7377 +  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
  1.7378 +  # "foo.exe" is OK but "foo" is an error.
  1.7379 +  #
  1.7380 +  # This test is therefore slightly more accurate than "test -f" to check for file precense.
  1.7381 +  # It is also a way to make sure we got the proper file name for the real test later on.
  1.7382 +  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
  1.7383 +  if test "x$test_shortpath" = x; then
  1.7384 +    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.7385 +$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7386 +    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
  1.7387 +  fi
  1.7388 +
  1.7389 +  # Call helper function which possibly converts this using DOS-style short mode.
  1.7390 +  # If so, the updated path is stored in $new_path.
  1.7391 +
  1.7392 +  input_path="$new_path"
  1.7393 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7394 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7395 +  # take no chances and rewrite it.
  1.7396 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7397 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
  1.7398 +  if test "x$has_forbidden_chars" != x; then
  1.7399 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7400 +    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
  1.7401 +    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
  1.7402 +    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
  1.7403 +      # Going to short mode and back again did indeed matter. Since short mode is
  1.7404 +      # case insensitive, let's make it lowercase to improve readability.
  1.7405 +      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7406 +      # Now convert it back to Unix-stile (cygpath)
  1.7407 +      input_path=`$CYGPATH -u "$shortmode_path"`
  1.7408 +      new_path="$input_path"
  1.7409 +    fi
  1.7410 +  fi
  1.7411 +
  1.7412 +  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
  1.7413 +  if test "x$test_cygdrive_prefix" = x; then
  1.7414 +    # As a simple fix, exclude /usr/bin since it's not a real path.
  1.7415 +    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
  1.7416 +      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
  1.7417 +      # a path prefixed by /cygdrive for fixpath to work.
  1.7418 +      new_path="$CYGWIN_ROOT_PATH$input_path"
  1.7419 +    fi
  1.7420 +  fi
  1.7421 +
  1.7422 +
  1.7423 +  if test "x$path" != "x$new_path"; then
  1.7424 +    FREETYPE_LIB_PATH="$new_path"
  1.7425 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.7426 +$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.7427 +  fi
  1.7428 +
  1.7429 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7430 +
  1.7431 +  path="$FREETYPE_LIB_PATH"
  1.7432 +  has_colon=`$ECHO $path | $GREP ^.:`
  1.7433 +  new_path="$path"
  1.7434 +  if test "x$has_colon" = x; then
  1.7435 +    # Not in mixed or Windows style, start by that.
  1.7436 +    new_path=`cmd //c echo $path`
  1.7437 +  fi
  1.7438 +
  1.7439 +
  1.7440 +  input_path="$new_path"
  1.7441 +  # Check if we need to convert this using DOS-style short mode. If the path
  1.7442 +  # contains just simple characters, use it. Otherwise (spaces, weird characters),
  1.7443 +  # take no chances and rewrite it.
  1.7444 +  # Note: m4 eats our [], so we need to use [ and ] instead.
  1.7445 +  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
  1.7446 +  if test "x$has_forbidden_chars" != x; then
  1.7447 +    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
  1.7448 +    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  1.7449 +  fi
  1.7450 +
  1.7451 +
  1.7452 +  windows_path="$new_path"
  1.7453 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7454 +    unix_path=`$CYGPATH -u "$windows_path"`
  1.7455 +    new_path="$unix_path"
  1.7456 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7457 +    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
  1.7458 +    new_path="$unix_path"
  1.7459 +  fi
  1.7460 +
  1.7461 +  if test "x$path" != "x$new_path"; then
  1.7462 +    FREETYPE_LIB_PATH="$new_path"
  1.7463 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
  1.7464 +$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
  1.7465 +  fi
  1.7466 +
  1.7467 +  # Save the first 10 bytes of this path to the storage, so fixpath can work.
  1.7468 +  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
  1.7469 +
  1.7470 +  else
  1.7471 +    # We're on a posix platform. Hooray! :)
  1.7472 +    path="$FREETYPE_LIB_PATH"
  1.7473 +    has_space=`$ECHO "$path" | $GREP " "`
  1.7474 +    if test "x$has_space" != x; then
  1.7475 +      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
  1.7476 +$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
  1.7477 +      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
  1.7478 +    fi
  1.7479 +
  1.7480 +    # Use eval to expand a potential ~
  1.7481 +    eval path="$path"
  1.7482 +    if test ! -f "$path" && test ! -d "$path"; then
  1.7483 +      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
  1.7484 +    fi
  1.7485 +
  1.7486 +    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
  1.7487 +  fi
  1.7488 +
  1.7489 +      if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.7490 +        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
  1.7491 +      else
  1.7492 +        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
  1.7493 +      fi
  1.7494 +    fi
  1.7495 +
  1.7496 +    # Try to compile it
  1.7497 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
  1.7498 +$as_echo_n "checking if we can compile and link with freetype... " >&6; }
  1.7499 +    ac_ext=cpp
  1.7500 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.7501 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.7502 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.7503 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.7504 +
  1.7505 +    PREV_CXXCFLAGS="$CXXFLAGS"
  1.7506 +    PREV_LDFLAGS="$LDFLAGS"
  1.7507 +    PREV_CXX="$CXX"
  1.7508 +    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
  1.7509 +    LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
  1.7510 +    CXX="$FIXPATH $CXX"
  1.7511 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.7512 +/* end confdefs.h.  */
  1.7513 +
  1.7514 +          #include<ft2build.h>
  1.7515 +          #include FT_FREETYPE_H
  1.7516 +          int main () {
  1.7517 +            FT_Init_FreeType(NULL);
  1.7518 +            return 0;
  1.7519 +          }
  1.7520 +
  1.7521 +_ACEOF
  1.7522 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.7523 +
  1.7524 +          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.7525 +$as_echo "yes" >&6; }
  1.7526 +
  1.7527 +else
  1.7528 +
  1.7529 +          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.7530 +$as_echo "no" >&6; }
  1.7531 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
  1.7532 +$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
  1.7533 +          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
  1.7534 +$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
  1.7535 +
  1.7536 +
  1.7537 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.7538 +  # freetype is the help tag: freetype, cups, pulse, alsa etc
  1.7539 +  MISSING_DEPENDENCY=freetype
  1.7540 +
  1.7541 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7542 +    cygwin_help $MISSING_DEPENDENCY
  1.7543 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7544 +    msys_help $MISSING_DEPENDENCY
  1.7545 +  else
  1.7546 +    PKGHANDLER_COMMAND=
  1.7547 +
  1.7548 +    case $PKGHANDLER in
  1.7549 +      apt-get)
  1.7550 +        apt_help     $MISSING_DEPENDENCY ;;
  1.7551 +      yum)
  1.7552 +        yum_help     $MISSING_DEPENDENCY ;;
  1.7553 +      port)
  1.7554 +        port_help    $MISSING_DEPENDENCY ;;
  1.7555 +      pkgutil)
  1.7556 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.7557 +      pkgadd)
  1.7558 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.7559 +      * )
  1.7560 +        break ;;
  1.7561 +    esac
  1.7562 +
  1.7563 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.7564 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.7565 +    fi
  1.7566 +  fi
  1.7567 +
  1.7568 +
  1.7569 +          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
  1.7570 +
  1.7571 +
  1.7572 +fi
  1.7573 +rm -f core conftest.err conftest.$ac_objext \
  1.7574 +    conftest$ac_exeext conftest.$ac_ext
  1.7575 +    CXXCFLAGS="$PREV_CXXFLAGS"
  1.7576 +    LDFLAGS="$PREV_LDFLAGS"
  1.7577 +    CXX="$PREV_CXX"
  1.7578 +    ac_ext=cpp
  1.7579 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.7580 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.7581 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.7582 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.7583 +
  1.7584 +
  1.7585 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
  1.7586 +$as_echo_n "checking if we should bundle freetype... " >&6; }
  1.7587 +    if test "x$BUNDLE_FREETYPE" = xyes; then
  1.7588 +      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
  1.7589 +    fi
  1.7590 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
  1.7591 +$as_echo "$BUNDLE_FREETYPE" >&6; }
  1.7592 +
  1.7593 +  fi # end freetype needed
  1.7594 +
  1.7595 +
  1.7596 +
  1.7597 +
  1.7598 +
  1.7599 +
  1.7600 +
  1.7601 +  ###############################################################################
  1.7602 +  #
  1.7603 +  # Check for alsa headers and libraries. Used on Linux/GNU systems.
  1.7604 +  #
  1.7605 +
  1.7606 +# Check whether --with-alsa was given.
  1.7607 +if test "${with_alsa+set}" = set; then :
  1.7608 +  withval=$with_alsa;
  1.7609 +fi
  1.7610 +
  1.7611 +
  1.7612 +# Check whether --with-alsa-include was given.
  1.7613 +if test "${with_alsa_include+set}" = set; then :
  1.7614 +  withval=$with_alsa_include;
  1.7615 +fi
  1.7616 +
  1.7617 +
  1.7618 +# Check whether --with-alsa-lib was given.
  1.7619 +if test "${with_alsa_lib+set}" = set; then :
  1.7620 +  withval=$with_alsa_lib;
  1.7621 +fi
  1.7622 +
  1.7623 +
  1.7624 +  if test "x$ALSA_NOT_NEEDED" = xyes; then
  1.7625 +    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
  1.7626 +      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
  1.7627 +$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
  1.7628 +    fi
  1.7629 +    ALSA_CFLAGS=
  1.7630 +    ALSA_LIBS=
  1.7631 +  else
  1.7632 +    ALSA_FOUND=no
  1.7633 +
  1.7634 +    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
  1.7635 +      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
  1.7636 +    fi
  1.7637 +
  1.7638 +    if test "x${with_alsa}" != x; then
  1.7639 +      ALSA_LIBS="-L${with_alsa}/lib -lalsa"
  1.7640 +      ALSA_CFLAGS="-I${with_alsa}/include"
  1.7641 +      ALSA_FOUND=yes
  1.7642 +    fi
  1.7643 +    if test "x${with_alsa_include}" != x; then
  1.7644 +      ALSA_CFLAGS="-I${with_alsa_include}"
  1.7645 +      ALSA_FOUND=yes
  1.7646 +    fi
  1.7647 +    if test "x${with_alsa_lib}" != x; then
  1.7648 +      ALSA_LIBS="-L${with_alsa_lib} -lalsa"
  1.7649 +      ALSA_FOUND=yes
  1.7650 +    fi
  1.7651 +    if test "x$ALSA_FOUND" = xno; then
  1.7652 +
  1.7653 +
  1.7654 +  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
  1.7655 +    # Source the builddeps file again, to make sure it uses the latest variables!
  1.7656 +    . $builddepsfile
  1.7657 +    # Look for a target and build machine specific resource!
  1.7658 +    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
  1.7659 +    if test "x$resource" = x; then
  1.7660 +      # Ok, lets instead look for a target specific resource
  1.7661 +      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
  1.7662 +    fi
  1.7663 +    if test "x$resource" = x; then
  1.7664 +      # Ok, lets instead look for a build specific resource
  1.7665 +      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
  1.7666 +    fi
  1.7667 +    if test "x$resource" = x; then
  1.7668 +      # Ok, lets instead look for a generic resource
  1.7669 +      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
  1.7670 +      resource=${builddep_alsa}
  1.7671 +    fi
  1.7672 +    if test "x$resource" != x; then
  1.7673 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
  1.7674 +$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
  1.7675 +      # If the resource in the builddeps.conf file is an existing directory,
  1.7676 +      # for example /java/linux/cups
  1.7677 +      if test -d ${resource}; then
  1.7678 +        depdir=${resource}
  1.7679 +      else
  1.7680 +
  1.7681 +  # alsa is for example mymodule
  1.7682 +  # $resource is for example libs/general/libmymod_1_2_3.zip
  1.7683 +  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
  1.7684 +  # $with_builddeps_dir is for example /localhome/builddeps
  1.7685 +  # depdir is the name of the variable into which we store the depdir, eg MYMOD
  1.7686 +  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
  1.7687 +  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
  1.7688 +  filename=`basename $resource`
  1.7689 +  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
  1.7690 +  filebase=${filename%%.*}
  1.7691 +  extension=${filename#*.}
  1.7692 +  installdir=$with_builddeps_dir/$filebase
  1.7693 +  if test ! -f $installdir/$filename.unpacked; then
  1.7694 +    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
  1.7695 +$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
  1.7696 +    if test ! -d $installdir; then
  1.7697 +      mkdir -p $installdir
  1.7698 +    fi
  1.7699 +    if test ! -d $installdir; then
  1.7700 +      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
  1.7701 +    fi
  1.7702 +    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
  1.7703 +    touch $tmpfile
  1.7704 +    if test ! -f $tmpfile; then
  1.7705 +      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
  1.7706 +    fi
  1.7707 +
  1.7708 +  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
  1.7709 +  # $tmpfile is the local file name for the downloaded file.
  1.7710 +  VALID_TOOL=no
  1.7711 +  if test "x$BDEPS_FTP" = xwget; then
  1.7712 +    VALID_TOOL=yes
  1.7713 +    wget -O $tmpfile $with_builddeps_server/$resource
  1.7714 +  fi
  1.7715 +  if test "x$BDEPS_FTP" = xlftp; then
  1.7716 +    VALID_TOOL=yes
  1.7717 +    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
  1.7718 +  fi
  1.7719 +  if test "x$BDEPS_FTP" = xftp; then
  1.7720 +    VALID_TOOL=yes
  1.7721 +    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
  1.7722 +    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
  1.7723 +    FTPUSERPWD=${FTPSERVER%%@*}
  1.7724 +    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
  1.7725 +      FTPUSER=${userpwd%%:*}
  1.7726 +      FTPPWD=${userpwd#*@}
  1.7727 +      FTPSERVER=${FTPSERVER#*@}
  1.7728 +    else
  1.7729 +      FTPUSER=ftp
  1.7730 +      FTPPWD=ftp
  1.7731 +    fi
  1.7732 +    # the "pass" command does not work on some
  1.7733 +    # ftp clients (read ftp.exe) but if it works,
  1.7734 +    # passive mode is better!
  1.7735 +    ( \
  1.7736 +        echo "user $FTPUSER $FTPPWD"        ; \
  1.7737 +        echo "pass"                         ; \
  1.7738 +        echo "bin"                          ; \
  1.7739 +        echo "get $FTPPATH $tmpfile"              ; \
  1.7740 +    ) | ftp -in $FTPSERVER
  1.7741 +  fi
  1.7742 +  if test "x$VALID_TOOL" != xyes; then
  1.7743 +    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
  1.7744 +  fi
  1.7745 +
  1.7746 +    mv $tmpfile $installdir/$filename
  1.7747 +    if test ! -s $installdir/$filename; then
  1.7748 +      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
  1.7749 +    fi
  1.7750 +    case "$extension" in
  1.7751 +      zip)  echo "Unzipping $installdir/$filename..."
  1.7752 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
  1.7753 +        ;;
  1.7754 +      tar.gz) echo "Untaring $installdir/$filename..."
  1.7755 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.7756 +        ;;
  1.7757 +      tgz) echo "Untaring $installdir/$filename..."
  1.7758 +        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
  1.7759 +        ;;
  1.7760 +      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
  1.7761 +        ;;
  1.7762 +    esac
  1.7763 +  fi
  1.7764 +  if test -f $installdir/$filename.unpacked; then
  1.7765 +    depdir=$installdir
  1.7766 +  fi
  1.7767 +
  1.7768 +      fi
  1.7769 +      # Source the builddeps file again, because in the previous command, the depdir
  1.7770 +      # was updated to point at the current build dependency install directory.
  1.7771 +      . $builddepsfile
  1.7772 +      # Now extract variables from the builddeps.conf files.
  1.7773 +      theroot=${builddep_alsa_ROOT}
  1.7774 +      thecflags=${builddep_alsa_CFLAGS}
  1.7775 +      thelibs=${builddep_alsa_LIBS}
  1.7776 +      if test "x$depdir" = x; then
  1.7777 +        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
  1.7778 +      fi
  1.7779 +      ALSA=$depdir
  1.7780 +      if test "x$theroot" != x; then
  1.7781 +        ALSA="$theroot"
  1.7782 +      fi
  1.7783 +      if test "x$thecflags" != x; then
  1.7784 +        ALSA_CFLAGS="$thecflags"
  1.7785 +      fi
  1.7786 +      if test "x$thelibs" != x; then
  1.7787 +        ALSA_LIBS="$thelibs"
  1.7788 +      fi
  1.7789 +      ALSA_FOUND=yes
  1.7790 +      else ALSA_FOUND=no
  1.7791 +
  1.7792 +    fi
  1.7793 +    else ALSA_FOUND=no
  1.7794 +
  1.7795 +  fi
  1.7796 +
  1.7797 +    fi
  1.7798 +    if test "x$ALSA_FOUND" = xno; then
  1.7799 +
  1.7800 +pkg_failed=no
  1.7801 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
  1.7802 +$as_echo_n "checking for ALSA... " >&6; }
  1.7803 +
  1.7804 +if test -n "$ALSA_CFLAGS"; then
  1.7805 +    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
  1.7806 + elif test -n "$PKG_CONFIG"; then
  1.7807 +    if test -n "$PKG_CONFIG" && \
  1.7808 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
  1.7809 +  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
  1.7810 +  ac_status=$?
  1.7811 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.7812 +  test $ac_status = 0; }; then
  1.7813 +  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
  1.7814 +else
  1.7815 +  pkg_failed=yes
  1.7816 +fi
  1.7817 + else
  1.7818 +    pkg_failed=untried
  1.7819 +fi
  1.7820 +if test -n "$ALSA_LIBS"; then
  1.7821 +    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
  1.7822 + elif test -n "$PKG_CONFIG"; then
  1.7823 +    if test -n "$PKG_CONFIG" && \
  1.7824 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
  1.7825 +  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
  1.7826 +  ac_status=$?
  1.7827 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.7828 +  test $ac_status = 0; }; then
  1.7829 +  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
  1.7830 +else
  1.7831 +  pkg_failed=yes
  1.7832 +fi
  1.7833 + else
  1.7834 +    pkg_failed=untried
  1.7835 +fi
  1.7836 +
  1.7837 +
  1.7838 +
  1.7839 +if test $pkg_failed = yes; then
  1.7840 +
  1.7841 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.7842 +        _pkg_short_errors_supported=yes
  1.7843 +else
  1.7844 +        _pkg_short_errors_supported=no
  1.7845 +fi
  1.7846 +        if test $_pkg_short_errors_supported = yes; then
  1.7847 +	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
  1.7848 +        else
  1.7849 +	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
  1.7850 +        fi
  1.7851 +	# Put the nasty error message in config.log where it belongs
  1.7852 +	echo "$ALSA_PKG_ERRORS" >&5
  1.7853 +
  1.7854 +	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.7855 +$as_echo "no" >&6; }
  1.7856 +                ALSA_FOUND=no
  1.7857 +elif test $pkg_failed = untried; then
  1.7858 +	ALSA_FOUND=no
  1.7859 +else
  1.7860 +	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
  1.7861 +	ALSA_LIBS=$pkg_cv_ALSA_LIBS
  1.7862 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.7863 +$as_echo "yes" >&6; }
  1.7864 +	ALSA_FOUND=yes
  1.7865 +fi
  1.7866 +    fi
  1.7867 +    if test "x$ALSA_FOUND" = xno; then
  1.7868 +      for ac_header in alsa/asoundlib.h
  1.7869 +do :
  1.7870 +  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
  1.7871 +if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
  1.7872 +  cat >>confdefs.h <<_ACEOF
  1.7873 +#define HAVE_ALSA_ASOUNDLIB_H 1
  1.7874 +_ACEOF
  1.7875 +
  1.7876 +            ALSA_FOUND=yes
  1.7877 +            ALSA_CFLAGS=-Iignoreme
  1.7878 +            ALSA_LIBS=-lasound
  1.7879 +            DEFAULT_ALSA=yes
  1.7880 +
  1.7881 +else
  1.7882 +  ALSA_FOUND=no
  1.7883 +fi
  1.7884 +
  1.7885 +done
  1.7886 +
  1.7887 +    fi
  1.7888 +    if test "x$ALSA_FOUND" = xno; then
  1.7889 +
  1.7890 +  # Print a helpful message on how to acquire the necessary build dependency.
  1.7891 +  # alsa is the help tag: freetype, cups, pulse, alsa etc
  1.7892 +  MISSING_DEPENDENCY=alsa
  1.7893 +
  1.7894 +  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
  1.7895 +    cygwin_help $MISSING_DEPENDENCY
  1.7896 +  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
  1.7897 +    msys_help $MISSING_DEPENDENCY
  1.7898 +  else
  1.7899 +    PKGHANDLER_COMMAND=
  1.7900 +
  1.7901 +    case $PKGHANDLER in
  1.7902 +      apt-get)
  1.7903 +        apt_help     $MISSING_DEPENDENCY ;;
  1.7904 +      yum)
  1.7905 +        yum_help     $MISSING_DEPENDENCY ;;
  1.7906 +      port)
  1.7907 +        port_help    $MISSING_DEPENDENCY ;;
  1.7908 +      pkgutil)
  1.7909 +        pkgutil_help $MISSING_DEPENDENCY ;;
  1.7910 +      pkgadd)
  1.7911 +        pkgadd_help  $MISSING_DEPENDENCY ;;
  1.7912 +      * )
  1.7913 +        break ;;
  1.7914 +    esac
  1.7915 +
  1.7916 +    if test "x$PKGHANDLER_COMMAND" != x; then
  1.7917 +      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
  1.7918 +    fi
  1.7919 +  fi
  1.7920 +
  1.7921 +      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
  1.7922 +    fi
  1.7923 +  fi
  1.7924 +
  1.7925 +
  1.7926 +
  1.7927 +
  1.7928 +
  1.7929 +
  1.7930 +  ###############################################################################
  1.7931 +  #
  1.7932 +  # Check for the jpeg library
  1.7933 +  #
  1.7934 +
  1.7935 +  USE_EXTERNAL_LIBJPEG=true
  1.7936 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
  1.7937 +$as_echo_n "checking for main in -ljpeg... " >&6; }
  1.7938 +if ${ac_cv_lib_jpeg_main+:} false; then :
  1.7939 +  $as_echo_n "(cached) " >&6
  1.7940 +else
  1.7941 +  ac_check_lib_save_LIBS=$LIBS
  1.7942 +LIBS="-ljpeg  $LIBS"
  1.7943 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.7944 +/* end confdefs.h.  */
  1.7945 +
  1.7946 +
  1.7947 +int
  1.7948 +main ()
  1.7949 +{
  1.7950 +return main ();
  1.7951 +  ;
  1.7952 +  return 0;
  1.7953 +}
  1.7954 +_ACEOF
  1.7955 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.7956 +  ac_cv_lib_jpeg_main=yes
  1.7957 +else
  1.7958 +  ac_cv_lib_jpeg_main=no
  1.7959 +fi
  1.7960 +rm -f core conftest.err conftest.$ac_objext \
  1.7961 +    conftest$ac_exeext conftest.$ac_ext
  1.7962 +LIBS=$ac_check_lib_save_LIBS
  1.7963 +fi
  1.7964 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
  1.7965 +$as_echo "$ac_cv_lib_jpeg_main" >&6; }
  1.7966 +if test "x$ac_cv_lib_jpeg_main" = xyes; then :
  1.7967 +  cat >>confdefs.h <<_ACEOF
  1.7968 +#define HAVE_LIBJPEG 1
  1.7969 +_ACEOF
  1.7970 +
  1.7971 +  LIBS="-ljpeg $LIBS"
  1.7972 +
  1.7973 +else
  1.7974 +   USE_EXTERNAL_LIBJPEG=false
  1.7975 +      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
  1.7976 +$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
  1.7977 +
  1.7978 +fi
  1.7979 +
  1.7980 +
  1.7981 +
  1.7982 +  ###############################################################################
  1.7983 +  #
  1.7984 +  # Check for the gif library
  1.7985 +  #
  1.7986 +
  1.7987 +
  1.7988 +# Check whether --with-giflib was given.
  1.7989 +if test "${with_giflib+set}" = set; then :
  1.7990 +  withval=$with_giflib;
  1.7991 +fi
  1.7992 +
  1.7993 +
  1.7994 +
  1.7995 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
  1.7996 +$as_echo_n "checking for which giflib to use... " >&6; }
  1.7997 +
  1.7998 +  # default is bundled
  1.7999 +  DEFAULT_GIFLIB=bundled
  1.8000 +
  1.8001 +  #
  1.8002 +  # if user didn't specify, use DEFAULT_GIFLIB
  1.8003 +  #
  1.8004 +  if test "x${with_giflib}" = "x"; then
  1.8005 +    with_giflib=${DEFAULT_GIFLIB}
  1.8006 +  fi
  1.8007 +
  1.8008 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
  1.8009 +$as_echo "${with_giflib}" >&6; }
  1.8010 +
  1.8011 +  if test "x${with_giflib}" = "xbundled"; then
  1.8012 +    USE_EXTERNAL_LIBGIF=false
  1.8013 +  elif test "x${with_giflib}" = "xsystem"; then
  1.8014 +    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
  1.8015 +if test "x$ac_cv_header_gif_lib_h" = xyes; then :
  1.8016 +
  1.8017 +else
  1.8018 +   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
  1.8019 +fi
  1.8020 +
  1.8021 +
  1.8022 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
  1.8023 +$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
  1.8024 +if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
  1.8025 +  $as_echo_n "(cached) " >&6
  1.8026 +else
  1.8027 +  ac_check_lib_save_LIBS=$LIBS
  1.8028 +LIBS="-lgif  $LIBS"
  1.8029 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8030 +/* end confdefs.h.  */
  1.8031 +
  1.8032 +/* Override any GCC internal prototype to avoid an error.
  1.8033 +   Use char because int might match the return type of a GCC
  1.8034 +   builtin and then its argument prototype would still apply.  */
  1.8035 +#ifdef __cplusplus
  1.8036 +extern "C"
  1.8037 +#endif
  1.8038 +char DGifGetCode ();
  1.8039 +int
  1.8040 +main ()
  1.8041 +{
  1.8042 +return DGifGetCode ();
  1.8043 +  ;
  1.8044 +  return 0;
  1.8045 +}
  1.8046 +_ACEOF
  1.8047 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8048 +  ac_cv_lib_gif_DGifGetCode=yes
  1.8049 +else
  1.8050 +  ac_cv_lib_gif_DGifGetCode=no
  1.8051 +fi
  1.8052 +rm -f core conftest.err conftest.$ac_objext \
  1.8053 +    conftest$ac_exeext conftest.$ac_ext
  1.8054 +LIBS=$ac_check_lib_save_LIBS
  1.8055 +fi
  1.8056 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
  1.8057 +$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
  1.8058 +if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
  1.8059 +  cat >>confdefs.h <<_ACEOF
  1.8060 +#define HAVE_LIBGIF 1
  1.8061 +_ACEOF
  1.8062 +
  1.8063 +  LIBS="-lgif $LIBS"
  1.8064 +
  1.8065 +else
  1.8066 +   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
  1.8067 +fi
  1.8068 +
  1.8069 +
  1.8070 +    USE_EXTERNAL_LIBGIF=true
  1.8071 +  else
  1.8072 +    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
  1.8073 +  fi
  1.8074 +
  1.8075 +
  1.8076 +  ###############################################################################
  1.8077 +  #
  1.8078 +  # Check for the zlib library
  1.8079 +  #
  1.8080 +
  1.8081 +
  1.8082 +# Check whether --with-zlib was given.
  1.8083 +if test "${with_zlib+set}" = set; then :
  1.8084 +  withval=$with_zlib;
  1.8085 +fi
  1.8086 +
  1.8087 +
  1.8088 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
  1.8089 +$as_echo_n "checking for compress in -lz... " >&6; }
  1.8090 +if ${ac_cv_lib_z_compress+:} false; then :
  1.8091 +  $as_echo_n "(cached) " >&6
  1.8092 +else
  1.8093 +  ac_check_lib_save_LIBS=$LIBS
  1.8094 +LIBS="-lz  $LIBS"
  1.8095 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8096 +/* end confdefs.h.  */
  1.8097 +
  1.8098 +/* Override any GCC internal prototype to avoid an error.
  1.8099 +   Use char because int might match the return type of a GCC
  1.8100 +   builtin and then its argument prototype would still apply.  */
  1.8101 +#ifdef __cplusplus
  1.8102 +extern "C"
  1.8103 +#endif
  1.8104 +char compress ();
  1.8105 +int
  1.8106 +main ()
  1.8107 +{
  1.8108 +return compress ();
  1.8109 +  ;
  1.8110 +  return 0;
  1.8111 +}
  1.8112 +_ACEOF
  1.8113 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8114 +  ac_cv_lib_z_compress=yes
  1.8115 +else
  1.8116 +  ac_cv_lib_z_compress=no
  1.8117 +fi
  1.8118 +rm -f core conftest.err conftest.$ac_objext \
  1.8119 +    conftest$ac_exeext conftest.$ac_ext
  1.8120 +LIBS=$ac_check_lib_save_LIBS
  1.8121 +fi
  1.8122 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
  1.8123 +$as_echo "$ac_cv_lib_z_compress" >&6; }
  1.8124 +if test "x$ac_cv_lib_z_compress" = xyes; then :
  1.8125 +   ZLIB_FOUND=yes
  1.8126 +else
  1.8127 +   ZLIB_FOUND=no
  1.8128 +fi
  1.8129 +
  1.8130 +
  1.8131 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
  1.8132 +$as_echo_n "checking for which zlib to use... " >&6; }
  1.8133 +
  1.8134 +  DEFAULT_ZLIB=bundled
  1.8135 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  1.8136 +    #
  1.8137 +    # On macosx default is system...on others default is
  1.8138 +    #
  1.8139 +    DEFAULT_ZLIB=system
  1.8140 +  fi
  1.8141 +
  1.8142 +  if test "x${ZLIB_FOUND}" != "xyes"; then
  1.8143 +    #
  1.8144 +    # If we don't find any system...set default to bundled
  1.8145 +    #
  1.8146 +    DEFAULT_ZLIB=bundled
  1.8147 +  fi
  1.8148 +
  1.8149 +  #
  1.8150 +  # If user didn't specify, use DEFAULT_ZLIB
  1.8151 +  #
  1.8152 +  if test "x${with_zlib}" = "x"; then
  1.8153 +    with_zlib=${DEFAULT_ZLIB}
  1.8154 +  fi
  1.8155 +
  1.8156 +  if test "x${with_zlib}" = "xbundled"; then
  1.8157 +    USE_EXTERNAL_LIBZ=false
  1.8158 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
  1.8159 +$as_echo "bundled" >&6; }
  1.8160 +  elif test "x${with_zlib}" = "xsystem"; then
  1.8161 +    if test "x${ZLIB_FOUND}" = "xyes"; then
  1.8162 +      USE_EXTERNAL_LIBZ=true
  1.8163 +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
  1.8164 +$as_echo "system" >&6; }
  1.8165 +    else
  1.8166 +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
  1.8167 +$as_echo "system not found" >&6; }
  1.8168 +      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
  1.8169 +    fi
  1.8170 +  else
  1.8171 +    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
  1.8172 +  fi
  1.8173 +
  1.8174 +
  1.8175 +
  1.8176 +  ###############################################################################
  1.8177 +  LIBZIP_CAN_USE_MMAP=true
  1.8178 +
  1.8179 +
  1.8180 +
  1.8181 +  ###############################################################################
  1.8182 +  #
  1.8183 +  # Check if altzone exists in time.h
  1.8184 +  #
  1.8185 +
  1.8186 +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8187 +/* end confdefs.h.  */
  1.8188 +#include <time.h>
  1.8189 +int
  1.8190 +main ()
  1.8191 +{
  1.8192 +return (int)altzone;
  1.8193 +  ;
  1.8194 +  return 0;
  1.8195 +}
  1.8196 +_ACEOF
  1.8197 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8198 +  has_altzone=yes
  1.8199 +else
  1.8200 +  has_altzone=no
  1.8201 +fi
  1.8202 +rm -f core conftest.err conftest.$ac_objext \
  1.8203 +    conftest$ac_exeext conftest.$ac_ext
  1.8204 +  if test "x$has_altzone" = xyes; then
  1.8205 +
  1.8206 +$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
  1.8207 +
  1.8208 +  fi
  1.8209 +
  1.8210 +  ###############################################################################
  1.8211 +  #
  1.8212 +  # Check the maths library
  1.8213 +  #
  1.8214 +
  1.8215 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
  1.8216 +$as_echo_n "checking for cos in -lm... " >&6; }
  1.8217 +if ${ac_cv_lib_m_cos+:} false; then :
  1.8218 +  $as_echo_n "(cached) " >&6
  1.8219 +else
  1.8220 +  ac_check_lib_save_LIBS=$LIBS
  1.8221 +LIBS="-lm  $LIBS"
  1.8222 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8223 +/* end confdefs.h.  */
  1.8224 +
  1.8225 +/* Override any GCC internal prototype to avoid an error.
  1.8226 +   Use char because int might match the return type of a GCC
  1.8227 +   builtin and then its argument prototype would still apply.  */
  1.8228 +#ifdef __cplusplus
  1.8229 +extern "C"
  1.8230 +#endif
  1.8231 +char cos ();
  1.8232 +int
  1.8233 +main ()
  1.8234 +{
  1.8235 +return cos ();
  1.8236 +  ;
  1.8237 +  return 0;
  1.8238 +}
  1.8239 +_ACEOF
  1.8240 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8241 +  ac_cv_lib_m_cos=yes
  1.8242 +else
  1.8243 +  ac_cv_lib_m_cos=no
  1.8244 +fi
  1.8245 +rm -f core conftest.err conftest.$ac_objext \
  1.8246 +    conftest$ac_exeext conftest.$ac_ext
  1.8247 +LIBS=$ac_check_lib_save_LIBS
  1.8248 +fi
  1.8249 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
  1.8250 +$as_echo "$ac_cv_lib_m_cos" >&6; }
  1.8251 +if test "x$ac_cv_lib_m_cos" = xyes; then :
  1.8252 +  cat >>confdefs.h <<_ACEOF
  1.8253 +#define HAVE_LIBM 1
  1.8254 +_ACEOF
  1.8255 +
  1.8256 +  LIBS="-lm $LIBS"
  1.8257 +
  1.8258 +else
  1.8259 +
  1.8260 +        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
  1.8261 +$as_echo "$as_me: Maths library was not found" >&6;}
  1.8262 +
  1.8263 +
  1.8264 +fi
  1.8265 +
  1.8266 +
  1.8267 +
  1.8268 +  ###############################################################################
  1.8269 +  #
  1.8270 +  # Check for libdl.so
  1.8271 +
  1.8272 +  save_LIBS="$LIBS"
  1.8273 +  LIBS=""
  1.8274 +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
  1.8275 +$as_echo_n "checking for dlopen in -ldl... " >&6; }
  1.8276 +if ${ac_cv_lib_dl_dlopen+:} false; then :
  1.8277 +  $as_echo_n "(cached) " >&6
  1.8278 +else
  1.8279 +  ac_check_lib_save_LIBS=$LIBS
  1.8280 +LIBS="-ldl  $LIBS"
  1.8281 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8282 +/* end confdefs.h.  */
  1.8283 +
  1.8284 +/* Override any GCC internal prototype to avoid an error.
  1.8285 +   Use char because int might match the return type of a GCC
  1.8286 +   builtin and then its argument prototype would still apply.  */
  1.8287 +#ifdef __cplusplus
  1.8288 +extern "C"
  1.8289 +#endif
  1.8290 +char dlopen ();
  1.8291 +int
  1.8292 +main ()
  1.8293 +{
  1.8294 +return dlopen ();
  1.8295 +  ;
  1.8296 +  return 0;
  1.8297 +}
  1.8298 +_ACEOF
  1.8299 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8300 +  ac_cv_lib_dl_dlopen=yes
  1.8301 +else
  1.8302 +  ac_cv_lib_dl_dlopen=no
  1.8303 +fi
  1.8304 +rm -f core conftest.err conftest.$ac_objext \
  1.8305 +    conftest$ac_exeext conftest.$ac_ext
  1.8306 +LIBS=$ac_check_lib_save_LIBS
  1.8307 +fi
  1.8308 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
  1.8309 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
  1.8310 +if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
  1.8311 +  cat >>confdefs.h <<_ACEOF
  1.8312 +#define HAVE_LIBDL 1
  1.8313 +_ACEOF
  1.8314 +
  1.8315 +  LIBS="-ldl $LIBS"
  1.8316 +
  1.8317 +fi
  1.8318 +
  1.8319 +  LIBDL="$LIBS"
  1.8320 +
  1.8321 +  LIBS="$save_LIBS"
  1.8322 +
  1.8323 +
  1.8324 +  ###############################################################################
  1.8325 +  #
  1.8326 +  # statically link libstdc++ before C++ ABI is stablized on Linux unless
  1.8327 +  # dynamic build is configured on command line.
  1.8328 +  #
  1.8329 +
  1.8330 +# Check whether --with-stdc++lib was given.
  1.8331 +if test "${with_stdc__lib+set}" = set; then :
  1.8332 +  withval=$with_stdc__lib;
  1.8333 +        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
  1.8334 +                && test "x$with_stdc__lib" != xdefault; then
  1.8335 +          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
  1.8336 +        fi
  1.8337 +
  1.8338 +else
  1.8339 +  with_stdc__lib=default
  1.8340 +
  1.8341 +fi
  1.8342 +
  1.8343 +
  1.8344 +  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.8345 +    # Test if -lstdc++ works.
  1.8346 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
  1.8347 +$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
  1.8348 +    ac_ext=cpp
  1.8349 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.8350 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.8351 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.8352 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.8353 +
  1.8354 +    OLD_CXXFLAGS="$CXXFLAGS"
  1.8355 +    CXXFLAGS="$CXXFLAGS -lstdc++"
  1.8356 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8357 +/* end confdefs.h.  */
  1.8358 +
  1.8359 +int
  1.8360 +main ()
  1.8361 +{
  1.8362 +return 0;
  1.8363 +  ;
  1.8364 +  return 0;
  1.8365 +}
  1.8366 +_ACEOF
  1.8367 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8368 +  has_dynamic_libstdcxx=yes
  1.8369 +else
  1.8370 +  has_dynamic_libstdcxx=no
  1.8371 +fi
  1.8372 +rm -f core conftest.err conftest.$ac_objext \
  1.8373 +    conftest$ac_exeext conftest.$ac_ext
  1.8374 +    CXXFLAGS="$OLD_CXXFLAGS"
  1.8375 +    ac_ext=cpp
  1.8376 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.8377 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.8378 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.8379 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.8380 +
  1.8381 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
  1.8382 +$as_echo "$has_dynamic_libstdcxx" >&6; }
  1.8383 +
  1.8384 +    # Test if stdc++ can be linked statically.
  1.8385 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
  1.8386 +$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
  1.8387 +    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
  1.8388 +    ac_ext=cpp
  1.8389 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.8390 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.8391 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.8392 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.8393 +
  1.8394 +    OLD_LIBS="$LIBS"
  1.8395 +    OLD_CXX="$CXX"
  1.8396 +    LIBS="$STATIC_STDCXX_FLAGS"
  1.8397 +    CXX="$CC"
  1.8398 +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1.8399 +/* end confdefs.h.  */
  1.8400 +
  1.8401 +int
  1.8402 +main ()
  1.8403 +{
  1.8404 +return 0;
  1.8405 +  ;
  1.8406 +  return 0;
  1.8407 +}
  1.8408 +_ACEOF
  1.8409 +if ac_fn_cxx_try_link "$LINENO"; then :
  1.8410 +  has_static_libstdcxx=yes
  1.8411 +else
  1.8412 +  has_static_libstdcxx=no
  1.8413 +fi
  1.8414 +rm -f core conftest.err conftest.$ac_objext \
  1.8415 +    conftest$ac_exeext conftest.$ac_ext
  1.8416 +    LIBS="$OLD_LIBS"
  1.8417 +    CXX="$OLD_CXX"
  1.8418 +    ac_ext=cpp
  1.8419 +ac_cpp='$CXXCPP $CPPFLAGS'
  1.8420 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1.8421 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1.8422 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  1.8423 +
  1.8424 +    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
  1.8425 +$as_echo "$has_static_libstdcxx" >&6; }
  1.8426 +
  1.8427 +    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
  1.8428 +      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
  1.8429 +    fi
  1.8430 +
  1.8431 +    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
  1.8432 +      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
  1.8433 +    fi
  1.8434 +
  1.8435 +    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
  1.8436 +      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
  1.8437 +    fi
  1.8438 +
  1.8439 +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
  1.8440 +$as_echo_n "checking how to link with libstdc++... " >&6; }
  1.8441 +    # If dynamic was requested, it's available since it would fail above otherwise.
  1.8442 +    # If dynamic wasn't requested, go with static unless it isn't available.
  1.8443 +    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.8444 +      LIBCXX="$LIBCXX -lstdc++"
  1.8445 +      LDCXX="$CXX"
  1.8446 +      STATIC_CXX_SETTING="STATIC_CXX=false"
  1.8447 +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
  1.8448 +$as_echo "dynamic" >&6; }
  1.8449 +    else
  1.8450 +      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
  1.8451 +      LDCXX="$CC"
  1.8452 +      STATIC_CXX_SETTING="STATIC_CXX=true"
  1.8453 +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
  1.8454 +$as_echo "static" >&6; }
  1.8455 +    fi
  1.8456 +  fi
  1.8457 +
  1.8458 +
  1.8459 +  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.8460 +    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
  1.8461 +
  1.8462 +pkg_failed=no
  1.8463 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
  1.8464 +$as_echo_n "checking for LIBFFI... " >&6; }
  1.8465 +
  1.8466 +if test -n "$LIBFFI_CFLAGS"; then
  1.8467 +    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
  1.8468 + elif test -n "$PKG_CONFIG"; then
  1.8469 +    if test -n "$PKG_CONFIG" && \
  1.8470 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  1.8471 +  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  1.8472 +  ac_status=$?
  1.8473 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.8474 +  test $ac_status = 0; }; then
  1.8475 +  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
  1.8476 +else
  1.8477 +  pkg_failed=yes
  1.8478 +fi
  1.8479 + else
  1.8480 +    pkg_failed=untried
  1.8481 +fi
  1.8482 +if test -n "$LIBFFI_LIBS"; then
  1.8483 +    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
  1.8484 + elif test -n "$PKG_CONFIG"; then
  1.8485 +    if test -n "$PKG_CONFIG" && \
  1.8486 +    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
  1.8487 +  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
  1.8488 +  ac_status=$?
  1.8489 +  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  1.8490 +  test $ac_status = 0; }; then
  1.8491 +  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
  1.8492 +else
  1.8493 +  pkg_failed=yes
  1.8494 +fi
  1.8495 + else
  1.8496 +    pkg_failed=untried
  1.8497 +fi
  1.8498 +
  1.8499 +
  1.8500 +
  1.8501 +if test $pkg_failed = yes; then
  1.8502 +
  1.8503 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1.8504 +        _pkg_short_errors_supported=yes
  1.8505 +else
  1.8506 +        _pkg_short_errors_supported=no
  1.8507 +fi
  1.8508 +        if test $_pkg_short_errors_supported = yes; then
  1.8509 +	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
  1.8510 +        else
  1.8511 +	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
  1.8512 +        fi
  1.8513 +	# Put the nasty error message in config.log where it belongs
  1.8514 +	echo "$LIBFFI_PKG_ERRORS" >&5
  1.8515 +
  1.8516 +	as_fn_error $? "Package requirements (libffi) were not met:
  1.8517 +
  1.8518 +$LIBFFI_PKG_ERRORS
  1.8519 +
  1.8520 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1.8521 +installed software in a non-standard prefix.
  1.8522 +
  1.8523 +Alternatively, you may set the environment variables LIBFFI_CFLAGS
  1.8524 +and LIBFFI_LIBS to avoid the need to call pkg-config.
  1.8525 +See the pkg-config man page for more details.
  1.8526 +" "$LINENO" 5
  1.8527 +elif test $pkg_failed = untried; then
  1.8528 +	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
  1.8529 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
  1.8530 +as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
  1.8531 +is in your PATH or set the PKG_CONFIG environment variable to the full
  1.8532 +path to pkg-config.
  1.8533 +
  1.8534 +Alternatively, you may set the environment variables LIBFFI_CFLAGS
  1.8535 +and LIBFFI_LIBS to avoid the need to call pkg-config.
  1.8536 +See the pkg-config man page for more details.
  1.8537 +
  1.8538 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.
  1.8539 +See \`config.log' for more details" "$LINENO" 5; }
  1.8540 +else
  1.8541 +	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
  1.8542 +	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
  1.8543 +        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
  1.8544 +$as_echo "yes" >&6; }
  1.8545 +	:
  1.8546 +fi
  1.8547 +
  1.8548 +  fi
  1.8549 +
  1.8550 +  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
  1.8551 +    # Extract the first word of "llvm-config", so it can be a program name with args.
  1.8552 +set dummy llvm-config; ac_word=$2
  1.8553 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  1.8554 +$as_echo_n "checking for $ac_word... " >&6; }
  1.8555 +if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
  1.8556 +  $as_echo_n "(cached) " >&6
  1.8557 +else
  1.8558 +  if test -n "$LLVM_CONFIG"; then
  1.8559 +  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
  1.8560 +else
  1.8561 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  1.8562 +for as_dir in $PATH
  1.8563 +do
  1.8564 +  IFS=$as_save_IFS
  1.8565 +  test -z "$as_dir" && as_dir=.
  1.8566 +    for ac_exec_ext in '' $ac_executable_extensions; do
  1.8567 +  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  1.8568 +    ac_cv_prog_LLVM_CONFIG="llvm-config"
  1.8569 +    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  1.8570 +    break 2
  1.8571 +  fi
  1.8572 +done
  1.8573 +  done
  1.8574 +IFS=$as_save_IFS
  1.8575 +
  1.8576 +fi
  1.8577 +fi
  1.8578 +LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
  1.8579 +if test -n "$LLVM_CONFIG"; then
  1.8580 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
  1.8581 +$as_echo "$LLVM_CONFIG" >&6; }
  1.8582 +else
  1.8583 +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  1.8584 +$as_echo "no" >&6; }
  1.8585 +fi
  1.8586 +
  1.8587 +
  1.8588 +
  1.8589 +    if test "x$LLVM_CONFIG" != xllvm-config; then
  1.8590 +      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
  1.8591 +    fi
  1.8592 +
  1.8593 +    llvm_components="jit mcjit engine nativecodegen native"
  1.8594 +    unset LLVM_CFLAGS
  1.8595 +    for flag in $("$LLVM_CONFIG" --cxxflags); do
  1.8596 +      if echo "${flag}" | grep -q '^-[ID]'; then
  1.8597 +        if test "${flag}" != "-D_DEBUG" ; then
  1.8598 +          if test "${LLVM_CFLAGS}" != "" ; then
  1.8599 +            LLVM_CFLAGS="${LLVM_CFLAGS} "
  1.8600 +          fi
  1.8601 +          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
  1.8602 +        fi
  1.8603 +      fi
  1.8604 +    done
  1.8605 +    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
  1.8606 +    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
  1.8607 +
  1.8608 +    unset LLVM_LDFLAGS
  1.8609 +    for flag in $("${LLVM_CONFIG}" --ldflags); do
  1.8610 +      if echo "${flag}" | grep -q '^-L'; then
  1.8611 +        if test "${LLVM_LDFLAGS}" != ""; then
  1.8612 +          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
  1.8613 +        fi
  1.8614 +        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
  1.8615 +      fi
  1.8616 +    done
  1.8617 +
  1.8618 +    unset LLVM_LIBS
  1.8619 +    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
  1.8620 +      if echo "${flag}" | grep -q '^-l'; then
  1.8621 +        if test "${LLVM_LIBS}" != ""; then
  1.8622 +          LLVM_LIBS="${LLVM_LIBS} "
  1.8623 +        fi
  1.8624 +        LLVM_LIBS="${LLVM_LIBS}${flag}"
  1.8625 +      fi
  1.8626 +    done
  1.8627 +
  1.8628 +
  1.8629 +
  1.8630 +
  1.8631 +  fi
  1.8632 +
  1.8633 +  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
  1.8634 +  if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
  1.8635 +    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
  1.8636 +  fi
  1.8637 +
  1.8638 +  # TODO better (platform agnostic) test
  1.8639 +  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
  1.8640 +    LIBCXX="-lstdc++"
  1.8641 +  fi
  1.8642 +
  1.8643 +
  1.8644 +
  1.8645 +
  1.8646 +
  1.8647  ###############################################################################
  1.8648  #
  1.8649  # We need to do some final tweaking, when everything else is done.
  1.8650 @@ -34949,7 +37400,7 @@
  1.8651      printf "$CCACHE_HELP_MSG\n"
  1.8652  
  1.8653    # Print a helpful message on how to acquire the necessary build dependency.
  1.8654 -  # ccache is the help tag: freetyp2, cups, pulse, alsa etc
  1.8655 +  # ccache is the help tag: freetype, cups, pulse, alsa etc
  1.8656    MISSING_DEPENDENCY=ccache
  1.8657  
  1.8658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then

mercurial